-
Notifications
You must be signed in to change notification settings - Fork 0
/
teal.backup.yaml
63 lines (53 loc) · 1.71 KB
/
teal.backup.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- tl
scope: source.teal
contexts:
# The prototype context is prepended to all contexts but those setting
# meta_include_prototype: false.
prototype:
- include: comments
main:
# The main context is the initial starting point of our syntax.
# Include other contexts from here (or specify them directly).
- match: ''
push: [variable]
variable:
- match: '\b[a-zA-Z_]\w*\b'
scope: variable.other.teal
keywords:
# Keywords are if, else for and while.
# Note that blackslashes don't need to be escaped within single quoted
# strings in YAML. When using single quoted strings, only single quotes
# need to be escaped: this is done by using two single quotes next to each
# other.
- match: '\b(if|else|for|while|function|end|local)\b'
scope: keyword.control.teal
numbers:
- match: '\b(-)?[0-9.]+\b'
scope: constant.numeric.teal
strings:
# Strings begin and end with quotes, and use backslashes as an escape
# character.
- match: '"'
scope: punctuation.definition.string.begin.teal
push: inside_string
inside_string:
- meta_include_prototype: false
- meta_scope: string.quoted.double.teal
- match: '\.'
scope: constant.character.escape.teal
- match: '"'
scope: punctuation.definition.string.end.teal
pop: true
comments:
# Comments begin with a '//' and finish at the end of the line.
- match: '--'
scope: punctuation.definition.comment.teal
push:
# This is an anonymous context push for brevity.
- meta_scope: comment.line.double-slash.teal
- match: $\n?
pop: true