language-t8-assembly/grammars/t8-assembly.cson
2018-05-20 11:00:12 -05:00

128 lines
2.3 KiB
Plaintext

# If this is your first time writing a language grammar, check out:
# - https://flight-manual.atom.io/hacking-atom/sections/creating-a-grammar/
'scopeName': 'source.t8-assembly'
'name': 'T8 Assembly'
'fileTypes': [
't8'
]
'patterns': [
{
'match': '\\bLOAD\\b'
'name': 'keyword.other.t8asm.load'
},
{
'match': '\\bSTOR\\b'
'name': 'keyword.other.t8asm.stor'
},
{
'match': '\\bLOADP\\b'
'name': 'keyword.other.t8asm.loadp'
},
{
'match': '\\bSTORP\\b'
'name': 'keyword.other.t8asm.storp'
},
{
'match': '\\bLODI\\b'
'name': 'keyword.other.t8asm.lodi'
},
{
'match': '\\bLODIP\\b'
'name': 'keyword.other.t8asm.lodip'
},
{
'match': '\\bARITH\\b'
'name': 'keyword.other.t8asm.arith'
},
{
'match': '\\bARITI\\b'
'name': 'keyword.other.t8asm.ariti'
},
{
'match': '\\bMOV\\b'
'name': 'keyword.other.t8asm.mov'
},
{
'match': '\\bJMPC\\b'
'name': 'keyword.control.t8asm.jmpc'
},
{
'match': '\\bCALL\\b'
'name': 'keyword.control.t8asm.call'
},
{
'match': '\\bHLT\\b'
'name': 'keyword.control.t8asm.hlt'
},
{
'match': '\\bRET\\b'
'name': 'keyword.control.t8asm.ret'
},
{
'match': '\\bIN\\b'
'name': 'keyword.other.t8asm.in'
},
{
'match': '\\bOUT\\b'
'name': 'keyword.other.t8asm.out'
},
{
'match': '\\bPUSH\\b'
'name': 'keyword.other.t8asm.push'
},
{
'match': '\\bPOP\\b'
'name': 'keyword.other.t8asm.pop'
},
{
'match': "\\bADD\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bSUB\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bADC\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bSBB\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bCMP\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bAND\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bOR\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bNOT\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bXOR\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': '#.*'
'name': 'comment.line.number-sign'
},
{
'match': '\\b\\d+\\b'
'name': 'constant.numeric.t8asm'
},
{
'match': '\\b0x[0-9a-fA-F]+\\b'
'name': 'constant.numeric.t8asm'
}
]