update nano syntax

This commit is contained in:
Erik Osheim 2024-09-04 14:08:59 -04:00
parent a8a0c57c2d
commit c7cfeb8d18
1 changed files with 19 additions and 12 deletions

View File

@ -13,32 +13,39 @@ syntax tal ".*\.tal"
comment "( | )" comment "( | )"
# raw values # raw values
color pink "\"[^ ]+" color green "\B\"\S+"
color pink "'[^ ]" color green "\<[0-9a-f]{2}{1,2}\>"
color pink "\<[0-9a-f]{2}{1,2}\>" color green "\<_\S+"
color green "\B-\S+"
color green "\B=\S+"
# literals # literals
color bold,green "#[0-9a-f]{2}{1,2}\>" color bold,green "\B#[0-9a-f]{2}{1,2}\>"
# absolute addresses # absolute addresses
color bold,yellow "(;&?|\.)\S+" color yellow "\B;\S+"
color bold,orange ",&?\S+" color yellow "\B,\S+"
color bold,orange "/\S+" color yellow "\B\.\S+"
# relative pads # relative pads
color yellow "\$[0-9a-f]{1,4}\>" color yellow "\B\$[0-9a-f]{1,4}\>\>"
# instructions # instructions
color bold,cyan "\<(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)2?k?r?\>" color cyan "\<(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)2?k?r?\>"
# label definitions # label definitions
color bold,blue "(^|\s)(@|&)\S+" color bold,blue "(^|\s)(@|&)\S+"
# macros # macros
color bold,magenta "%\S+" color bold,magenta "\B%\S+"
# absolute pads # absolute pads
color yellow "\|[0-9a-f]{2}{1,2}\>" color yellow "\B\|[0-9a-f]{1,4}\>"
# immediate
color bold,yellow "\?\S+"
color bold,yellow "!\S+"
color bold,yellow "\B}\B"
# comments # comments
color red start="\(\s" end="\s\)" color red start="\B\(\s" end="\s\)\B"