BASIC.tmbundle/Syntaxes/Integer BASIC.sublime-syntax
2018-09-03 12:37:29 -04:00

53 lines
1.7 KiB
YAML

%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Integer BASIC
file_extensions: []
scope: source.integer-basic
contexts:
main:
- match: ^\d+
scope: entity.name.function.line-number
- match: \b(?i:rem).*$
scope: comment.line
- match: '"'
push:
- meta_scope: string.quoted.double
- match: '"'
pop: true
- match: '\b(?i:goto|if|then|for|to|step|next|gosub|return|pop|stop|con|end)(?![$])\b'
scope: keyword.control
- match: '\b(?i:list)(?![$])\b'
scope: keyword.control.immediate
- match: '\b(?i:poke|call|trace|notrace|dsp|nodsp)(?![$])\b'
scope: keyword.utility
- match: '\b(?i:himem|lomem):'
scope: keyword.utility.colon
- match: \b(?i:peek)(?=\()
scope: support.function.utility
- match: '\b(?i:gr|color|plot|hlin|vlin|at)(?![$])\b'
scope: keyword.graphics
- match: \b(?i:scrn)(?=\()
scope: support.function.graphics
- match: '\b(?i:tab|text|vtab|print|input)(?![$])\b'
scope: keyword.io
- match: '\b(?i:in|pr)#'
scope: keyword.io.hash
- match: \b(?i:pdl)(?=\()
scope: support.function.io
- match: '\b(?i:and|or|not)(?![$])\b'
scope: keyword.operator.logical
- match: '\b(?i:mod)(?![$])\b'
scope: keyword.operator.arithmetic
- match: '\b(?i:dim|let)(?![$])\b'
scope: keyword.variable
- match: \b(?i:abs|sgn|rnd)(?=\()
scope: support.function.arithmetic
- match: \b(?i:len|asc)(?=\()
scope: support.function.string
- match: '\b[A-Za-z][A-Za-z0-9]*[$]?'
comment: uses non-greedy *? so keywords get a first shot
scope: variable
- match: \d+
scope: constant.numeric