Skip to content

Commit

Permalink
feat: Add more fields, roll back some overaggressive fields
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniscirpons committed Jan 13, 2025
1 parent b0608a3 commit 7db7959
Show file tree
Hide file tree
Showing 4 changed files with 10,554 additions and 10,791 deletions.
17 changes: 6 additions & 11 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ module.exports = grammar({

ellipsis: (_) => '...',

locals: ($) => seq('local', commaSep1(field('local', $.identifier))),
locals: ($) => seq('local', commaSep1($.identifier)),

call: ($) =>
prec(
Expand Down Expand Up @@ -490,8 +490,8 @@ module.exports = grammar({
),

// GAP source file location: src/read.c ReadFuncCallOption
// TODO: (reiniscirpons) Remove function_call_option node to decrease
// height and use the field selector in queries instead
// TODO: (reiniscirpons) Maybe remove function_call_option node to decrease
// height and use the field selector in queries instead?
function_call_option: ($) =>
choice($.identifier, $.parenthesized_expression, $.record_entry),

Expand Down Expand Up @@ -529,13 +529,7 @@ module.exports = grammar({

// GAP source file location: src/read.c ReadRec
record_expression: ($) =>
seq(
'rec',
'(',
commaSep(field('record_entry', $.record_entry)),
optional(','),
')',
),
seq('rec', '(', commaSep($.record_entry), optional(','), ')'),

record_entry: ($) =>
seq(
Expand Down Expand Up @@ -571,7 +565,8 @@ module.exports = grammar({
LITERAL_REGEXP.LINE_CONTINUATION,
),

qualified_identifier: ($) => seq($.qualifier, $.identifier),
qualified_identifier: ($) =>
seq(field('qualifier', $.qualifier), field('identifier', $.identifier)),

qualifier: (_) => choice('readonly', 'readwrite'),

Expand Down
48 changes: 20 additions & 28 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 41 additions & 36 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7db7959

Please sign in to comment.