uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit a683375567d04105303d7aeb3770a86230279e1a
parent c268c7fd963ccfec36a847ba07c7132cf5952599
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun, 20 Jun 2021 09:21:15 -0700

Improved syntax highlight

Diffstat:
Aetc/tal.sublime-syntax | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Detc/usm.sublime-syntax | 110-------------------------------------------------------------------------------
2 files changed, 122 insertions(+), 110 deletions(-)

diff --git a/etc/tal.sublime-syntax b/etc/tal.sublime-syntax @@ -0,0 +1,122 @@ +%YAML 1.2 +--- +# See http://www.sublimetext.com/docs/3/syntax.html +name: Uxn Assembly +scopeName: tal. +fileTypes: [tal] +file_extensions: + - tal +scope: source.tal + +contexts: + main: + + # 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 + - match: '\.(\S+)\sDEO2' + scope: constant.numeric + pop: true + - match: '\.(\S+)\sDEO' + scope: constant.numeric + pop: true + - match: '\.(\S+)\sSTZ2' + scope: constant.numeric + pop: true + - match: '\.(\S+)\sSTZ' + scope: constant.numeric + pop: true + - match: '\,(\S+)\sSTR2' + scope: constant.numeric + pop: true + - match: '\,(\S+)\sSTR' + scope: constant.numeric + pop: true + - match: '\;(\S+)\sSTA2' + scope: entity.name.type.typedef + pop: true + - match: '\;(\S+)\sSTA' + scope: entity.name.type.typedef + pop: true + + # label + - match: '\@(\S+)\s?' + scope: string.control + pop: true + # sublabel + - match: '\&(\S+)\s?' + scope: string.control + pop: true + + # jump + - match: '\|(\S+)\s?' + scope: entity.name.tag.structure.any + pop: true + # pad + - match: '\$(\S+)\s?' + scope: entity.name.tag.structure.any + pop: true + + # Pushing to stack + - match: '\"(\S+)\s?' + scope: variable.parameter.option + pop: true + + # Addressing + - match: '\.(\S+)\s?' # zero-page + scope: variable.function.shell + pop: true + - match: '\,(\S+)\s?' # relative + scope: entity.name.tag.yaml + pop: true + - match: '\;(\S+)\s?' # absolute + scope: keyword.control + pop: true + - match: '\:(\S+)\s?' # raw + scope: keyword.control + pop: true + + # Blocks + - match: '\[\s?' + scope: comment + pop: true + - match: '\]\s?' + scope: comment + pop: true + + - match: '\{' + scope: variable.control + push: + - meta_scope: variable.control + - match: '\}' + pop: true + + - match: '\(' + scope: comment + push: + - meta_scope: comment.line + - match: '\)' + pop: true diff --git a/etc/usm.sublime-syntax b/etc/usm.sublime-syntax @@ -1,110 +0,0 @@ -%YAML 1.2 ---- -# See http://www.sublimetext.com/docs/3/syntax.html -name: Uxn Assembly -scopeName: tal. -fileTypes: [tal] -file_extensions: - - tal -scope: source.tal - -contexts: - main: - - # get/set - - match: '\.(\S+)\sDEO2' - scope: constant.numeric - pop: true - - match: '\.(\S+)\sDEO' - scope: constant.numeric - pop: true - - match: '\.(\S+)\sSTZ2' - scope: constant.numeric - pop: true - - match: '\.(\S+)\sSTZ' - scope: constant.numeric - pop: true - - match: '\.(\S+)\sLDA2' - scope: constant.numeric - pop: true - - match: '\.(\S+)\sLDA' - 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 - - match: '\.(\S+)\sLDZ2' - scope: entity.name.type.typedef - pop: true - - match: '\.(\S+)\sLDZ' - scope: entity.name.type.typedef - pop: true - - match: '\.(\S+)\sSTA2' - scope: entity.name.type.typedef - pop: true - - match: '\.(\S+)\sSTA' - scope: entity.name.type.typedef - pop: true - - # label - - match: '\@(\S+)\s?' - scope: string.control - pop: true - # sublabel - - match: '\&(\S+)\s?' - scope: string.control - pop: true - - # jump - - match: '\|(\S+)\s?' - scope: entity.name.tag.structure.any - pop: true - # pad - - match: '\$(\S+)\s?' - scope: entity.name.tag.structure.any - pop: true - - # Pushing to stack - - match: '\"(\S+)\s?' - scope: variable.parameter.option - pop: true - - # Addressing - - match: '\.(\S+)\s?' # zero-page - scope: variable.function.shell - pop: true - - match: '\,(\S+)\s?' # relative - scope: entity.name.tag.yaml - pop: true - - match: '\;(\S+)\s?' # absolute - scope: keyword.control - pop: true - - match: '\:(\S+)\s?' # raw - scope: keyword.control - pop: true - - # Blocks - - match: '\[\s?' - scope: comment - pop: true - - match: '\]\s?' - scope: comment - pop: true - - - match: '\{' - scope: variable.control - push: - - meta_scope: variable.control - - match: '\}' - pop: true - - - match: '\(' - scope: comment - push: - - meta_scope: comment.line - - match: '\)' - pop: true