Skip to content

Commit 89e66b6

Browse files
committed
fixes PrestonKnopp#76 allow function_definition's without a body to end with a semicolon
More of a workaround solution. Only valid for functions annotated with abstract.
1 parent a16bf06 commit 89e66b6

4 files changed

Lines changed: 31815 additions & 30802 deletions

File tree

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ module.exports = grammar({
858858
// body, there must be a newline or body_end. _return_type with generic
859859
// parameters without a newline or body_end will erroneously parse
860860
// any following lines.
861-
choice(seq(":", field("body", $.body)), $._newline, $._body_end),
861+
choice(seq(":", field("body", $.body)), ";", $._newline, $._body_end),
862862
),
863863

864864
lambda: ($) =>

src/grammar.json

Lines changed: 4 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)