Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 8c59563

Browse files
hugoplnobodywasishere
authored andcommitted
Implement return statement.
1 parent ca96eb8 commit 8c59563

File tree

5 files changed

+18787
-17977
lines changed

5 files changed

+18787
-17977
lines changed

grammar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ module.exports = grammar({
8484
$.extend,
8585
$.abstract_def,
8686
$.def,
87+
$.return,
8788
$._expression,
8889
),
8990

@@ -177,6 +178,8 @@ module.exports = grammar({
177178
'end',
178179
),
179180

181+
return: $ => seq('return', optional($._expression)),
182+
180183
_expression: $ =>
181184
choice(
182185
$.binary_operation,

src/grammar.json

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

src/node-types.json

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

0 commit comments

Comments
 (0)