Skip to content

Commit

Permalink
parser: do not allow standalone labels anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Sep 23, 2024
1 parent 5d401a2 commit be56082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 1 addition & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1467,8 +1467,7 @@ module.exports = grammar({
$.button_definition,
$.run_statement,
$.enum_statement,
$.abl_statement,
prec.left(PREC.EXTRA, $.label)
$.abl_statement
)
}
});
Expand Down
15 changes: 3 additions & 12 deletions test/corpus/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@ COMMENT
(comment)
(comment))

================================================================================
LABEL
================================================================================

x:

--------------------------------------------------------------------------------

(source_code
(label
(identifier)))

================================================================================
COMMENT (long)
================================================================================
Expand Down Expand Up @@ -1726,6 +1714,7 @@ DO ON QUIT UNDO, RETURN ERROR:
QUIT.
END.

labeled:
DO ON STOP UNDO label1, LEAVE label2:
STOP.
END.
Expand All @@ -1751,6 +1740,8 @@ END.
(abl_statement
(identifier))))
(do_block
(label
(identifier))
(on_stop_phrase
(identifier)
(identifier))
Expand Down

0 comments on commit be56082

Please sign in to comment.