Closed andryak closed 6 months ago
This is valid Hack code that declares a module-level attribute:
<?hh <<file: SomeClass(SomeOtherClass::class)>>
Yet, the parser does not recognize the syntax:
(script (ERROR (attribute_modifier (ERROR (identifier)) (qualified_identifier (identifier)) (arguments (argument (scoped_identifier (qualified_identifier (identifier)) (identifier)))))))
Add a new test with content <<file: SomeClass(SomeOtherClass::class)>> in test/corpus/declarations.txt, then run tree-sitter test.
<<file: SomeClass(SomeOtherClass::class)>>
test/corpus/declarations.txt
tree-sitter test
No errors are reported in the syntax tree.
Describe the bug
This is valid Hack code that declares a module-level attribute:
Yet, the parser does not recognize the syntax:
Requirements
To Reproduce
Add a new test with content
<<file: SomeClass(SomeOtherClass::class)>>
intest/corpus/declarations.txt
, then runtree-sitter test
.Expected behavior
No errors are reported in the syntax tree.