Skip to content

Adds support for references#106

Merged
cfroystad merged 1 commit intotree-sitter:masterfrom
cfroystad:references2.0
Sep 1, 2021
Merged

Adds support for references#106
cfroystad merged 1 commit intotree-sitter:masterfrom
cfroystad:references2.0

Conversation

@cfroystad
Copy link
Collaborator

@cfroystad cfroystad commented Aug 27, 2021

Adds support for references by combining two approaches:

  1. Where anything included in _callable_variable is used directly, we wrap it in by_ref
  2. Where there is a wrapping container already (or where by_ref simply doesn't make sense, like function returns) we apply the reference_modifier field

One new conflict has been added to disambiguate array creation and array destructing.

Also: Fixes float without decimal parts (but with trailing .)

Checklist:

  • All tests pass in CI
  • There are sufficient tests for the new fix/feature
  • Grammar rules have not been renamed unless absolutely necessary (0 rules renamed)
  • The conflicts section hasn't grown too much (1 new conflicts)
  • The parser size hasn't grown too much (master: 2595, PR: 2624)

@cfroystad
Copy link
Collaborator Author

@maxbrunsfeld Requesting review due to new conflict related to array creation and array destructing. They use the same syntax but in different contexts. I don't understand why the conflict is needed (due to the different contexts), but it was the only way I could make it work.

@cfroystad cfroystad mentioned this pull request Aug 31, 2021
32 tasks
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally ok with adding one new conflict.

@cfroystad cfroystad merged commit 9b3b8d7 into tree-sitter:master Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Float without decimal part causes parse error

2 participants