Skip to content
New issue

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

Add missing fields in keyed_element #149

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading