Skip to content

Commit 9956623

Browse files
committed
fix: exclude : from the result field for functions
1 parent 83e2649 commit 9956623

File tree

4 files changed

+196
-191
lines changed

4 files changed

+196
-191
lines changed

Diff for: grammar.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ module.exports = grammar({
188188
"fun",
189189
field("name", $.identifier),
190190
field("parameters", $.parameter_list),
191-
field("result", optional(seq(":", $._type))),
191+
optional(seq(":", field("result", $._type))),
192192
field("body", $.asm_function_body),
193193
),
194194

@@ -254,7 +254,7 @@ module.exports = grammar({
254254
"fun",
255255
field("name", $.identifier),
256256
field("parameters", $.parameter_list),
257-
field("result", optional(seq(":", $._type))),
257+
optional(seq(":", field("result", $._type))),
258258
choice(";", field("body", alias($.block_statement, $.function_body))),
259259
),
260260

@@ -264,7 +264,7 @@ module.exports = grammar({
264264
"fun",
265265
field("name", $.identifier),
266266
field("parameters", $.parameter_list),
267-
field("result", optional(seq(":", $._type))),
267+
optional(seq(":", field("result", $._type))),
268268
),
269269

270270
_function_definition: ($) =>

Diff for: src/grammar.json

+60-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/node-types.json

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)