Added break statements

This commit is contained in:
2024-05-04 18:57:35 -05:00
parent 3f1b8fd316
commit cd53a21e8f
13 changed files with 138 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export default {
if (word = stream.match(/^[a-zA-Z_$][a-zA-Z0-9_$]*/)) {
// This is either a keyword or an identifier.
// All the keywords are valid names, so, check that:
if (word[0].match(/^fn|var|new|static|asm|return|if|while|repeat|global|const|peek|poke$/)) {
if (word[0].match(/^fn|var|new|static|asm|return|if|while|repeat|global|const|peek|poke|break$/)) {
if (word[0] === 'asm') {
state.asm = true
} // This is the start of an asm control structure