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

Commit

Permalink
Implement return statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugopl authored and nobodywasishere committed Dec 5, 2024
1 parent ca96eb8 commit 8c59563
Show file tree
Hide file tree
Showing 5 changed files with 18,787 additions and 17,977 deletions.
3 changes: 3 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module.exports = grammar({
$.extend,
$.abstract_def,
$.def,
$.return,
$._expression,
),

Expand Down Expand Up @@ -177,6 +178,8 @@ module.exports = grammar({
'end',
),

return: $ => seq('return', optional($._expression)),

_expression: $ =>
choice(
$.binary_operation,
Expand Down
25 changes: 25 additions & 0 deletions src/grammar.json

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

135 changes: 135 additions & 0 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 8c59563

Please sign in to comment.