From c7cfeb8d1809c54c3159052ee1ef7557de341594 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Wed, 4 Sep 2024 14:08:59 -0400 Subject: [PATCH] update nano syntax --- tal.nanorc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/tal.nanorc b/tal.nanorc index 701ff2a..e4bf46c 100644 --- a/tal.nanorc +++ b/tal.nanorc @@ -13,32 +13,39 @@ syntax tal ".*\.tal" comment "( | )" # raw values -color pink "\"[^ ]+" -color pink "'[^ ]" -color pink "\<[0-9a-f]{2}{1,2}\>" +color green "\B\"\S+" +color green "\<[0-9a-f]{2}{1,2}\>" +color green "\<_\S+" +color green "\B-\S+" +color green "\B=\S+" # literals -color bold,green "#[0-9a-f]{2}{1,2}\>" +color bold,green "\B#[0-9a-f]{2}{1,2}\>" # absolute addresses -color bold,yellow "(;&?|\.)\S+" -color bold,orange ",&?\S+" -color bold,orange "/\S+" +color yellow "\B;\S+" +color yellow "\B,\S+" +color yellow "\B\.\S+" # relative pads -color yellow "\$[0-9a-f]{1,4}\>" +color yellow "\B\$[0-9a-f]{1,4}\>\>" # 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 color bold,blue "(^|\s)(@|&)\S+" # macros -color bold,magenta "%\S+" +color bold,magenta "\B%\S+" # 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 -color red start="\(\s" end="\s\)" +color red start="\B\(\s" end="\s\)\B"