Closed aspeddro closed 1 year ago
Absolutely great! Thank you. I like that many conflicts are gone now.
Would you rebase the branch, please?
Done
Ops, a small error introduced.
'@'
(source_file [0, 0] - [1, 0]
(ERROR [0, 0] - [1, 0]
(string_fragment [0, 1] - [1, 0])))
In main branch it's is parsed.
Edit 1:
The parser look at @
an expect a decorator
rule.
Edit 2: Fixed in https://github.com/nkrkv/tree-sitter-rescript/pull/218/commits/233734f62375a4eb73a64e506d254addd6a862da
~~Highlights updated to not highlight @
in '@'
as annotation
.
https://github.com/nkrkv/tree-sitter-rescript/pull/218/commits/3353315b3973ce630d709e14302143e9382df7d7~~
The last commit https://github.com/nkrkv/tree-sitter-rescript/commit/e2af3e7e5873ed1667cf8849ebfa43c7c3c51b55 removed the workaround and fixed the error with characher '@'
.
Now the scanner will parse the start of the decorator: @
or @@
.
Brilliant! Thank you!
Move inline decorator to scanner.
Inline decorator is decorator without arguments.
Decorators with arguments can be specified in
grammar.js
. This was a limitation because TreeSitter could not determine the end of the rule.Decorators can now be treated as a comment, can appear anywhere.
This PR also removes some conflicts that were introduced due to decorators. We can also remove some tests with decorators.