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-04-22 23:47:23 -04:00
|
|
|
|
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'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
- match: '\;(\S+)\sLDA'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
# set
|
2021-04-22 23:47:23 -04:00
|
|
|
- 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'
|
2021-04-22 23:47:23 -04:00
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
2021-05-11 14:14:52 -04:00
|
|
|
- match: '\.(\S+)\sSTZ'
|
2021-04-22 23:47:23 -04:00
|
|
|
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-04-24 20:12:25 -04:00
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
2021-06-20 12:21:15 -04:00
|
|
|
- match: '\;(\S+)\sSTA'
|
2021-04-24 20:12:25 -04:00
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
2021-04-22 23:47:23 -04:00
|
|
|
|
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-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-04-22 22:57:47 -04:00
|
|
|
scope: variable.parameter.option
|
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
|
|
|
|
2021-06-29 15:12:18 -04:00
|
|
|
- match: '\( '
|
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
|
2021-06-29 15:12:18 -04:00
|
|
|
- match: ' \)'
|
2021-02-04 21:25:49 -05:00
|
|
|
pop: true
|