uxn/etc/syntax-highlight/tal.sublime-syntax

127 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2021-02-04 21:25:49 -05:00
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: Uxn Assembly
2021-05-31 17:50:36 -04:00
scopeName: tal.
fileTypes: [tal]
2021-02-04 21:25:49 -05:00
file_extensions:
2021-05-31 17:50:36 -04:00
- tal
scope: source.tal
2021-02-04 21:25:49 -05:00
contexts:
main:
2021-06-20 12:21:15 -04:00
# get
- match: '\.(\S+)\sDEI2'
scope: entity.name.type.typedef
pop: true
- match: '\.(\S+)\sDEI'
scope: entity.name.type.typedef
pop: true
- match: '\.(\S+)\sLDZ2'
scope: entity.name.type.typedef
pop: true
- match: '\.(\S+)\sLDZ'
scope: entity.name.type.typedef
pop: true
- match: '\,(\S+)\sLDR2'
scope: entity.name.type.typedef
pop: true
- match: '\,(\S+)\sLDR'
scope: entity.name.type.typedef
pop: true
- match: '\;(\S+)\sLDA2'
2021-08-28 13:30:50 -04:00
scope: entity.name.type.typedef
2021-06-20 12:21:15 -04:00
pop: true
- match: '\;(\S+)\sLDA'
2021-08-28 13:30:50 -04:00
scope: entity.name.type.typedef
2021-06-20 12:21:15 -04:00
pop: true
# set
- match: '\.(\S+)\sDEO2'
scope: constant.numeric
pop: true
- match: '\.(\S+)\sDEO'
scope: constant.numeric
pop: true
2021-05-11 14:14:52 -04:00
- match: '\.(\S+)\sSTZ2'
scope: constant.numeric
pop: true
2021-05-11 14:14:52 -04:00
- match: '\.(\S+)\sSTZ'
scope: constant.numeric
pop: true
2021-06-20 12:21:15 -04:00
- match: '\,(\S+)\sSTR2'
2021-04-24 20:12:25 -04:00
scope: constant.numeric
pop: true
2021-06-20 12:21:15 -04:00
- match: '\,(\S+)\sSTR'
2021-04-24 20:12:25 -04:00
scope: constant.numeric
pop: true
2021-06-20 12:21:15 -04:00
- match: '\;(\S+)\sSTA2'
2021-08-28 13:30:50 -04:00
scope: constant.numeric
2021-04-24 20:12:25 -04:00
pop: true
2021-06-20 12:21:15 -04:00
- match: '\;(\S+)\sSTA'
2021-08-28 13:30:50 -04:00
scope: constant.numeric
2021-04-24 20:12:25 -04:00
pop: true
2021-04-22 22:57:47 -04:00
# label
2021-02-28 12:40:19 -05:00
- match: '\@(\S+)\s?'
2021-02-04 21:25:49 -05:00
scope: string.control
pop: true
2021-04-22 22:57:47 -04:00
# sublabel
2021-04-22 14:08:06 -04:00
- match: '\&(\S+)\s?'
scope: string.control
pop: true
2021-08-28 13:30:50 -04:00
# include
- match: 'include'
scope: string.control
pop: true
2021-04-22 22:57:47 -04:00
2021-02-28 12:40:19 -05:00
# jump
- match: '\|(\S+)\s?'
2021-04-22 22:57:47 -04:00
scope: entity.name.tag.structure.any
2021-02-28 12:40:19 -05:00
pop: true
2021-04-22 22:57:47 -04:00
# pad
2021-04-20 00:33:52 -04:00
- match: '\$(\S+)\s?'
2021-04-22 22:57:47 -04:00
scope: entity.name.tag.structure.any
2021-04-22 18:57:40 -04:00
pop: true
2021-02-28 12:40:19 -05:00
# Pushing to stack
2021-04-22 14:08:06 -04:00
- match: '\"(\S+)\s?'
2021-10-21 15:27:44 -04:00
scope: constant.numeric
2021-04-22 14:08:06 -04:00
pop: true
2021-04-20 00:33:52 -04:00
# Addressing
- match: '\.(\S+)\s?' # zero-page
2021-04-22 22:57:47 -04:00
scope: variable.function.shell
2021-03-11 15:19:59 -05:00
pop: true
2021-04-20 00:33:52 -04:00
- match: '\,(\S+)\s?' # relative
2021-04-22 22:57:47 -04:00
scope: entity.name.tag.yaml
2021-04-20 00:33:52 -04:00
pop: true
- match: '\;(\S+)\s?' # absolute
2021-02-04 21:25:49 -05:00
scope: keyword.control
pop: true
2021-04-20 20:11:02 -04:00
- match: '\:(\S+)\s?' # raw
scope: keyword.control
pop: true
2021-02-28 12:40:19 -05:00
2021-04-22 22:57:47 -04:00
# Blocks
2021-04-20 13:48:55 -04:00
- match: '\[\s?'
scope: comment
pop: true
- match: '\]\s?'
scope: comment
pop: true
2021-02-28 12:40:19 -05:00
- match: '\{'
scope: variable.control
2021-02-23 01:15:02 -05:00
push:
2021-02-28 12:40:19 -05:00
- meta_scope: variable.control
- match: '\}'
2021-02-23 01:15:02 -05:00
pop: true
2021-02-04 21:25:49 -05:00
- match: '\s\(\s'
2021-02-28 12:40:19 -05:00
scope: comment
2021-02-04 21:25:49 -05:00
push:
2021-02-28 12:40:19 -05:00
- meta_scope: comment.line
2022-03-10 12:37:11 -05:00
- match: '\s\)\s'
2021-02-04 21:25:49 -05:00
pop: true