Created
July 17, 2025 00:13
-
-
Save Ismael-VC/30161e9f4f9e918ab8799e141094f293 to your computer and use it in GitHub Desktop.
Unutal Micro Syntax Highlighitng
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# thanks to makeworld for new instructions and multiline comment support | |
filetype: uxntal | |
detect: | |
filename: "\\.(tal|utl|uxn|unu|unutal|uxntal)$" | |
rules: | |
# Uxntal | |
- identifier: "[@,;.&][^\ \n\r]+" | |
- constant: "[\"#'|$][^\ \n\r]+" | |
- statement: "\\b(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)[2rk]{0,3}\\b" | |
- comment: | |
start: "\\(\\ " | |
end: "\\ \\)" | |
rules: [] | |
- symbol: "\\[|\\]" | |
# Markdown for Unu http://unu.retroforth.org | |
# Tables (Github extension) | |
- type: ".*[ :]\\|[ :].*" | |
# quotes | |
- statement: "^>.*" | |
# Emphasis | |
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)" | |
# Strong emphasis | |
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)" | |
# strike-through | |
- type: "(^|[[:space:]])~~[^ ][^~]*~~" | |
# horizontal rules | |
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$" | |
# headlines | |
- special: "^#{1,6}.*" | |
# lists | |
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. " | |
# misc | |
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))" | |
# links | |
- constant: "\\[[^]]+\\]" | |
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)" | |
# images | |
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])" | |
# urls | |
- underlined: "https?://[^ )>]+" | |
- special: "^```$" | |
- special: "(^|[^`])`[^`\n]+`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment