2021-02-04 21:25:49 -05:00
|
|
|
%YAML 1.2
|
|
|
|
---
|
|
|
|
# See http://www.sublimetext.com/docs/3/syntax.html
|
|
|
|
name: Uxn Assembly
|
|
|
|
scopeName: usm.
|
|
|
|
fileTypes: [usm]
|
|
|
|
file_extensions:
|
|
|
|
- usm
|
|
|
|
scope: source.usm
|
|
|
|
|
|
|
|
contexts:
|
|
|
|
main:
|
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
|
2021-04-22 22:57:47 -04:00
|
|
|
|
|
|
|
# templated
|
|
|
|
|
|
|
|
- match: '(\S+)\^\!\s?'
|
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\~\!\s?'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\*\!\s?'
|
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\=\!\s?'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
|
|
|
|
- match: '(\S+)\^\s?'
|
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\~\s?'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\*\s?'
|
|
|
|
scope: entity.name.type.typedef
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\=\s?'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|
|
|
|
|
|
|
|
|
|
|
|
- match: '(\S+)\?\s?'
|
|
|
|
scope: storage.type
|
|
|
|
pop: true
|
|
|
|
- match: '(\S+)\!\s?'
|
|
|
|
scope: constant.numeric
|
|
|
|
pop: true
|