We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tree-sitter --version
0.24.6, via nixpkgs
As a poorly documented part of the rust language, there is apparently a safe keyword that can be used in extern blocks. This is valid Rust:
safe
unsafe extern "C" { safe static some_constant_external_value: [u32; 128]; safe fn some_external_function_i_promise_is_safe(); }
This is not listed in the keywords list but is described here.
(source_file (ERROR unsafe (extern_modifier extern (string_literal " (string_content) "))) (expression_statement (block { (ERROR (identifier) (static_item static name: (identifier) : type: (array_type [ element: (primitive_type) ; length: (integer_literal) ]) ;) (identifier)) (function_signature_item fn name: (identifier) parameters: (parameters ( )) ;) })))
As far as I can tell, there is no safe token in the grammar currently. (Or I'm just blind)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)0.24.6, via nixpkgs
Describe the bug
As a poorly documented part of the rust language, there is apparently a
safe
keyword that can be used in extern blocks. This is valid Rust:This is not listed in the keywords list but is described here.
Steps To Reproduce/Bad Parse Tree
(source_file
(ERROR unsafe
(extern_modifier extern
(string_literal " (string_content) ")))
(expression_statement
(block {
(ERROR (identifier)
(static_item static name: (identifier) :
type: (array_type [ element: (primitive_type) ; length: (integer_literal) ])
;)
(identifier))
(function_signature_item fn name: (identifier)
parameters: (parameters ( ))
;)
})))
Expected Behavior/Parse Tree
As far as I can tell, there is no safe token in the grammar currently. (Or I'm just blind)
Repro
The text was updated successfully, but these errors were encountered: