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

127 lines
2.7 KiB
Plaintext
Raw Normal View History

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