Skip to content

Commit 78ddb99

Browse files
committed
Attempt overriding of global reserved word set for macro usage
1 parent b04fa60 commit 78ddb99

File tree

3 files changed

+5187
-5186
lines changed

3 files changed

+5187
-5186
lines changed

grammar.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4549,21 +4549,17 @@ const rules = {
45494549

45504550
list_of_formal_arguments: $ => commaSep1($.formal_argument),
45514551

4552-
// formal_argument: $ => seq(
4553-
// reserved('macros', $.simple_identifier),
4554-
// optseq('=', optchoice($.default_text, $.string_literal, $.tf_call, $.text_macro_usage, reserved('macros', $.simple_identifier))),
4555-
// ),
45564552
formal_argument: $ => reserved('macros', seq(
45574553
$.simple_identifier,
45584554
optseq('=', optchoice($.default_text, $.string_literal, $.tf_call, $.text_macro_usage, $.simple_identifier)),
45594555
)),
45604556

4561-
text_macro_identifier: $ => $._identifier,
4557+
text_macro_identifier: $ => reserved('macros', $._identifier),
45624558

45634559
text_macro_usage: $ => prec.right(seq(
45644560
'`',
45654561
$.text_macro_identifier,
4566-
optseq('(', optional($.list_of_actual_arguments), ')')
4562+
reserved('macros', optseq('(', optional($.list_of_actual_arguments), ')'))
45674563
)),
45684564

45694565
list_of_actual_arguments: $ => list_of_args($, 'list_of_arguments', $.actual_argument),

src/grammar.json

Lines changed: 41 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)