Skip to content

Commit

Permalink
feat: add fields in keyed_element
Browse files Browse the repository at this point in the history
  • Loading branch information
wetneb authored Sep 17, 2024
1 parent 81a11f8 commit ecc2086
Show file tree
Hide file tree
Showing 4 changed files with 19,166 additions and 19,139 deletions.
6 changes: 5 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,11 @@ module.exports = grammar({
// - a field identifier (when T is a struct), or
// - a literal_element (when T is an array).
// The first two cases cannot be distinguished without type information.
keyed_element: $ => seq($.literal_element, ':', $.literal_element),
keyed_element: $ => seq(
field('key', $.literal_element),
':',
field('value', $.literal_element),
),

func_literal: $ => seq(
'func',
Expand Down
16 changes: 12 additions & 4 deletions src/grammar.json

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

31 changes: 21 additions & 10 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 ecc2086

Please sign in to comment.