uxn/etc/usm.sublime-syntax

111 lines
2.3 KiB
Plaintext
Raw 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:
# get/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-05-03 12:57:39 -04:00
- match: '\.(\S+)\sLDA2'
2021-04-24 20:12:25 -04:00
scope: constant.numeric
pop: true
2021-05-03 12:57:39 -04:00
- match: '\.(\S+)\sLDA'
2021-04-24 20:12:25 -04:00
scope: constant.numeric
pop: true
- match: '\.(\S+)\sDEI2'
scope: entity.name.type.typedef
pop: true
- match: '\.(\S+)\sDEI'
scope: entity.name.type.typedef
pop: true
2021-05-11 14:14:52 -04:00
- match: '\.(\S+)\sLDZ2'
scope: entity.name.type.typedef
pop: true
2021-05-11 14:14:52 -04:00
- match: '\.(\S+)\sLDZ'
scope: entity.name.type.typedef
pop: true
2021-05-03 12:57:39 -04:00
- match: '\.(\S+)\sSTA2'
2021-04-24 20:12:25 -04:00
scope: entity.name.type.typedef
pop: true
2021-05-03 12:57:39 -04:00
- match: '\.(\S+)\sSTA'
2021-04-24 20:12:25 -04:00
scope: entity.name.type.typedef
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-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
- 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-02-04 21:25:49 -05:00
- match: '\)'
pop: true