Skip to content

Commit ed37505

Browse files
committed
Update tree-sitter grammar for pub(ingot), pub(super), pub(in path)
Extends the visibility rule from just 'pub' to accept the optional restriction syntax. Regenerates parser.c, grammar.json, node-types.json, and the fe-web WASM binary.
1 parent 236f537 commit ed37505

7 files changed

Lines changed: 37279 additions & 36997 deletions

File tree

-1.05 KB
Binary file not shown.

crates/tree-sitter-fe/grammar.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,18 @@ module.exports = grammar({
13341334
')',
13351335
)),
13361336

1337-
visibility: $ => 'pub',
1337+
visibility: $ => seq(
1338+
'pub',
1339+
optional(seq(
1340+
'(',
1341+
choice(
1342+
'ingot',
1343+
'super',
1344+
seq('in', $.path),
1345+
),
1346+
')',
1347+
)),
1348+
),
13381349

13391350
// ==================== LITERALS ====================
13401351

crates/tree-sitter-fe/src/grammar.json

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

crates/tree-sitter-fe/src/node-types.json

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

0 commit comments

Comments
 (0)