uxn/etc/usm.sublime-syntax

80 lines
1.5 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
scopeName: usm.
fileTypes: [usm]
file_extensions:
- usm
scope: source.usm
contexts:
main:
2021-02-28 12:40:19 -05:00
# pointer
- match: '\@(\S+)\s?'
2021-02-04 21:25:49 -05:00
scope: string.control
pop: true
2021-02-28 12:40:19 -05:00
# jump
- match: '\|(\S+)\s?'
scope: variable.control
pop: true
# variables
2021-02-04 21:25:49 -05:00
- match: '\;(\S+)\s?'
scope: string.control
pop: true
2021-02-28 12:40:19 -05:00
# constants
- match: '\:(\S+)\s?'
2021-02-05 13:51:45 -05:00
scope: string.control
pop: true
2021-02-28 12:40:19 -05:00
# structs
2021-02-23 01:15:02 -05:00
- match: '\&(\S+)\s?'
scope: string.control
pop: true
2021-02-28 12:40:19 -05:00
# Special
- match: '\~(\S+)\s?'
scope: entity.name.type
pop: true
- match: '\=(\S+)\s?'
scope: entity.name.type
pop: true
# Pushing to stack
2021-02-04 21:25:49 -05:00
- match: '\,(\S+)\s?'
scope: keyword.control
pop: true
2021-03-11 15:19:59 -05:00
- match: '\.(\S+)\s?'
2021-02-12 19:18:52 -05:00
scope: keyword.control
pop: true
2021-03-11 15:19:59 -05:00
- match: '\^(\S+)\s?'
scope: keyword.control
pop: true
- match: '\#(\S+)\s?'
2021-02-04 21:25:49 -05:00
scope: keyword.control
pop: true
2021-02-28 12:40:19 -05:00
# Blocks
- 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-02-28 12:40:19 -05:00
- match: '\['
scope: keyword
push:
- meta_scope: keyword.line
- match: '\]'
pop: true