a couple more tweaks...

This commit is contained in:
Kelvin Sherlock 2017-09-17 15:32:25 -04:00
parent 4cf6a12954
commit 1633dea6b1
4 changed files with 40 additions and 30 deletions

View File

@ -23,7 +23,7 @@ contexts:
- match: '^{{ident}}' - match: '^{{ident}}'
scope: entity.name.label scope: entity.name.label
- match: ^[*]|; - match: ^[*;]
push: push:
- meta_scope: comment.line - meta_scope: comment.line
- match: \n - match: \n
@ -79,16 +79,16 @@ contexts:
operand-on-off: operand-on-off:
- match: \b(?i:ON|OFF)\b - match: \b(?i:ON|OFF)\b
scope: constant.language scope: constant.language
- match: \S set: expect-comment
scope: invalid.illegal.operand - include: expect-comment
operand-lst: operand-lst:
- match: \b(?i:ON|OFF)\b - match: \b(?i:ON|OFF)\b
scope: constant.language scope: constant.language
- match: \b(?i:NO)?(?i:CYC|GEN|WARN|UNASM|ASYM|VSYM|SIXUP|EXP)\b - match: \b(?i:NO)?(?i:CYC|GEN|WARN|UNASM|ASYM|VSYM|SIXUP|EXP)\b
scope: constant.language scope: constant.language
- match: '[^, \t]' - match: ','
scope: invalid.illegal.operand - include: expect-comment
operand-path: operand-path:
- match: ([^; \n\t]+) - match: ([^; \n\t]+)
@ -106,10 +106,12 @@ contexts:
comment: comment:
- match: ;[^\n]* - match: ;
scope: comment.line.partial push:
- match: \n - meta_scope: comment.line
pop: true - match: \n
pop: true
- include: eol
numbers: numbers:
- match: \d+ - match: \d+

View File

@ -129,15 +129,16 @@ contexts:
string: string:
- match: '"' - match: '"'
scope: string scope: punctuation.definition.string.begin
push: push:
- meta_include_prototype: false - meta_include_prototype: false
- meta_scope: string - meta_scope: string.quoted.double
- match: '\n' - match: '\n'
pop: true pop: true
scope: invalid.illegal.newline scope: invalid.illegal.newline
- match: '[^"\n]|\\.' - match: '[^"\n]|\\.'
- match: '"' - match: '"'
scope: punctuation.definition.string.end
pop: true pop: true
comments: comments:

View File

@ -147,8 +147,8 @@ contexts:
operand-hex: operand-hex:
- match: '[0-9A-Fa-f]{2}' - match: '[0-9A-Fa-f]{2}'
scope: constant.numeric.hex scope: constant.numeric.hex
- match: '[^ \t,]' - match: ','
scope: invalid.illegal.operand - include: expect-comment
operand-path: operand-path:
@ -161,8 +161,8 @@ contexts:
- include: strings - include: strings
- match: '[0-9A-Fa-f]{2}' - match: '[0-9A-Fa-f]{2}'
scope: constant.numeric.hex scope: constant.numeric.hex
- match: '[^ \t,]' - match: ','
scope: invalid.illegal.operand - include: expect-comment

View File

@ -28,7 +28,7 @@ contexts:
- match: '^]?{{ident}}' - match: '^]?{{ident}}'
scope: entity.name.label scope: entity.name.label
- match: ^[*]|; - match: ^[*;]
push: push:
- meta_scope: comment.line - meta_scope: comment.line
- match: \n - match: \n
@ -80,30 +80,42 @@ contexts:
operand-string: operand-string:
- include: strings - include: strings
- include: expect-comment
- match: \S
scope: invalid.illegal.operand
operand-hex: operand-hex:
- match: '[0-9A-Fa-f]{1,2}' - match: '[0-9A-Fa-f]{1,2}'
scope: constant.numeric.hex scope: constant.numeric.hex
- match: '[^ \t,]' set: expect-comment
scope: invalid.illegal.operand - include: expect-comment
operand-on-off: operand-on-off:
- match: \b(?i:ON|OFF)\b - match: \b(?i:ON|OFF)\b
scope: constant.language scope: constant.language
- match: \S set: expect-comment
scope: invalid.illegal.operand - include: expect-comment
expect-comment:
- include: comment
- match: \S
scope: invalid.illegal.expect.comment
comment: comment:
- match: ;[^\n]* - match: ;
scope: comment.line.partial push:
- match: \n - meta_scope: comment.line
- match: \n
pop: true
- include: eol
eol:
- match: '$'
pop: true pop: true
mnemonics-65816-alt: mnemonics-65816-alt:
- match: \b(?i:BLT|BGE)\b - match: \b(?i:BLT|BGE)\b
scope: keyword.mnemonic.65816.alt scope: keyword.mnemonic.65816.alt
@ -133,8 +145,3 @@ contexts:
- match: '\n' - match: '\n'
scope: invalid.illegal.newline.asm scope: invalid.illegal.newline.asm
pop: true pop: true
eol:
- match: '$'
pop: true