uxn/etc/usm.sublime-syntax

81 lines
1.5 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
scopeName: usm.
fileTypes: [usm]
file_extensions:
- usm
scope: source.usm
contexts:
main:
2021-02-28 17:40:19 +00:00
# pointer
- match: '\@(\S+)\s?'
2021-02-05 02:25:49 +00:00
scope: string.control
pop: true
2021-02-28 17:40:19 +00:00
# jump
- match: '\|(\S+)\s?'
scope: variable.control
pop: true
# variables
2021-02-05 02:25:49 +00:00
- match: '\;(\S+)\s?'
scope: string.control
pop: true
2021-02-28 17:40:19 +00:00
# constants
- match: '\:(\S+)\s?'
2021-02-05 18:51:45 +00:00
scope: string.control
pop: true
2021-02-28 17:40:19 +00:00
# structs
2021-02-23 06:15:02 +00:00
- match: '\&(\S+)\s?'
scope: string.control
pop: true
2021-02-28 17:40:19 +00: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-05 02:25:49 +00:00
- match: '\,(\S+)\s?'
scope: keyword.control
pop: true
2021-02-13 00:18:52 +00:00
- match: '\#(\S+)\s?'
scope: keyword.control
pop: true
2021-02-05 02:25:49 +00:00
- match: '\.(\S+)\s?'
scope: keyword.control
2021-02-28 17:40:19 +00:00
- match: '\+(\S+)\s?'
scope: string.control
2021-02-05 02:25:49 +00:00
pop: true
2021-02-28 17:40:19 +00:00
- match: '\-(\S+)\s?'
scope: string.control
# Blocks
- 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: '\('
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
2021-02-05 02:25:49 +00:00
- match: '\)'
pop: true
2021-02-28 17:40:19 +00:00
- match: '\['
scope: keyword
push:
- meta_scope: keyword.line
- match: '\]'
pop: true