diff --git a/Syntaxes/EDAsm.sublime-syntax b/Syntaxes/EDAsm.sublime-syntax index f1c554a..8ddaa67 100644 --- a/Syntaxes/EDAsm.sublime-syntax +++ b/Syntaxes/EDAsm.sublime-syntax @@ -23,7 +23,7 @@ contexts: - match: '^{{ident}}' scope: entity.name.label - - match: ^[*]|; + - match: ^[*;] push: - meta_scope: comment.line - match: \n @@ -79,16 +79,16 @@ contexts: operand-on-off: - match: \b(?i:ON|OFF)\b scope: constant.language - - match: \S - scope: invalid.illegal.operand + set: expect-comment + - include: expect-comment operand-lst: - match: \b(?i:ON|OFF)\b scope: constant.language - match: \b(?i:NO)?(?i:CYC|GEN|WARN|UNASM|ASYM|VSYM|SIXUP|EXP)\b scope: constant.language - - match: '[^, \t]' - scope: invalid.illegal.operand + - match: ',' + - include: expect-comment operand-path: - match: ([^; \n\t]+) @@ -106,10 +106,12 @@ contexts: comment: - - match: ;[^\n]* - scope: comment.line.partial - - match: \n - pop: true + - match: ; + push: + - meta_scope: comment.line + - match: \n + pop: true + - include: eol numbers: - match: \d+ diff --git a/Syntaxes/Macross.sublime-syntax b/Syntaxes/Macross.sublime-syntax index a7451b3..2fc0911 100644 --- a/Syntaxes/Macross.sublime-syntax +++ b/Syntaxes/Macross.sublime-syntax @@ -129,15 +129,16 @@ contexts: string: - match: '"' - scope: string + scope: punctuation.definition.string.begin push: - meta_include_prototype: false - - meta_scope: string + - meta_scope: string.quoted.double - match: '\n' pop: true scope: invalid.illegal.newline - match: '[^"\n]|\\.' - match: '"' + scope: punctuation.definition.string.end pop: true comments: diff --git a/Syntaxes/Merlin.sublime-syntax b/Syntaxes/Merlin.sublime-syntax index 3cf17dd..15630eb 100644 --- a/Syntaxes/Merlin.sublime-syntax +++ b/Syntaxes/Merlin.sublime-syntax @@ -147,8 +147,8 @@ contexts: operand-hex: - match: '[0-9A-Fa-f]{2}' scope: constant.numeric.hex - - match: '[^ \t,]' - scope: invalid.illegal.operand + - match: ',' + - include: expect-comment operand-path: @@ -161,8 +161,8 @@ contexts: - include: strings - match: '[0-9A-Fa-f]{2}' scope: constant.numeric.hex - - match: '[^ \t,]' - scope: invalid.illegal.operand + - match: ',' + - include: expect-comment diff --git a/Syntaxes/NinjaForce assembler.sublime-syntax b/Syntaxes/NinjaForce assembler.sublime-syntax index e475fdc..a2d7220 100644 --- a/Syntaxes/NinjaForce assembler.sublime-syntax +++ b/Syntaxes/NinjaForce assembler.sublime-syntax @@ -28,7 +28,7 @@ contexts: - match: '^]?{{ident}}' scope: entity.name.label - - match: ^[*]|; + - match: ^[*;] push: - meta_scope: comment.line - match: \n @@ -80,30 +80,42 @@ contexts: operand-string: - include: strings + - include: expect-comment - - match: \S - scope: invalid.illegal.operand operand-hex: - match: '[0-9A-Fa-f]{1,2}' scope: constant.numeric.hex - - match: '[^ \t,]' - scope: invalid.illegal.operand + set: expect-comment + - include: expect-comment + operand-on-off: - match: \b(?i:ON|OFF)\b scope: constant.language - - match: \S - scope: invalid.illegal.operand + set: expect-comment + - include: expect-comment + expect-comment: + - include: comment + - match: \S + scope: invalid.illegal.expect.comment + comment: - - match: ;[^\n]* - scope: comment.line.partial - - match: \n + - match: ; + push: + - meta_scope: comment.line + - match: \n + pop: true + - include: eol + + eol: + - match: '$' pop: true + mnemonics-65816-alt: - match: \b(?i:BLT|BGE)\b scope: keyword.mnemonic.65816.alt @@ -133,8 +145,3 @@ contexts: - match: '\n' scope: invalid.illegal.newline.asm pop: true - - - eol: - - match: '$' - pop: true