js-on-sx: parser accepts labels (drops label) + optional ident on break/continue
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 27s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 27s
This commit is contained in:
@@ -1431,9 +1431,27 @@
|
||||
((jp-at? st "keyword" "for") (jp-parse-for-stmt st))
|
||||
((jp-at? st "keyword" "return") (jp-parse-return-stmt st))
|
||||
((jp-at? st "keyword" "break")
|
||||
(do (jp-advance! st) (jp-eat-semi st) (list (quote js-break))))
|
||||
(do
|
||||
(jp-advance! st)
|
||||
(cond
|
||||
((= (get (jp-peek st) :type) "ident")
|
||||
(do (jp-advance! st) (jp-eat-semi st) (list (quote js-break))))
|
||||
(else (do (jp-eat-semi st) (list (quote js-break)))))))
|
||||
((jp-at? st "keyword" "continue")
|
||||
(do (jp-advance! st) (jp-eat-semi st) (list (quote js-continue))))
|
||||
(do
|
||||
(jp-advance! st)
|
||||
(cond
|
||||
((= (get (jp-peek st) :type) "ident")
|
||||
(do (jp-advance! st) (jp-eat-semi st) (list (quote js-continue))))
|
||||
(else (do (jp-eat-semi st) (list (quote js-continue)))))))
|
||||
((and
|
||||
(= (get (jp-peek st) :type) "ident")
|
||||
(= (get (jp-peek-at st 1) :type) "punct")
|
||||
(= (get (jp-peek-at st 1) :value) ":"))
|
||||
(do
|
||||
(jp-advance! st)
|
||||
(jp-advance! st)
|
||||
(jp-parse-stmt st)))
|
||||
((jp-at? st "keyword" "class") (jp-parse-class-decl st))
|
||||
((jp-at? st "keyword" "throw") (jp-parse-throw-stmt st))
|
||||
((jp-at? st "keyword" "try") (jp-parse-try-stmt st))
|
||||
|
||||
Reference in New Issue
Block a user