-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
According to tree-sitter doc:
Reserved Keywords : reserved(wordset, rule) — This function will override the
global reserved word set with the one passed into the wordset parameter.
This is useful for contextual keywords, such as if in JavaScript,
hich cannot be used as a variable name in most contexts,
but can be used as a property name.
And taking tree-sitter/tree-sitter#3896 (comment) as a reference:
After commit 78ddb99 the global reserved wordset has been replaced with macros which is empty:
formal_argument: $ => reserved('macros', seq(
$.simple_identifier,
optseq('=', optchoice($.default_text, $.string_literal, $.tf_call, $.text_macro_usage, $.simple_identifier)),
)),
text_macro_identifier: $ => reserved('macros', $._identifier),
text_macro_usage: $ => prec.right(seq(
'`',
$.text_macro_identifier,
reserved('macros', optseq('(', optional($.list_of_actual_arguments), ')'))
)),However the following snippets result in parsing errors:
`module(foo)`foo(module)Metadata
Metadata
Assignees
Labels
No labels