forked from derickc/Fountainhead
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFountainhead.sublime-syntax
168 lines (167 loc) · 3.63 KB
/
Fountainhead.sublime-syntax
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
%YAML 1.2
---
name: Fountain
file_extensions:
- fountain
scope: text.fountain
contexts:
main:
- include: comments
- include: templates
- scope: keyword.conditional
match: ^\s*if\b
- scope: keyword.conditional
match: ^\s*elif\b
- scope: keyword.conditional
match: ^\s*\bfi\b
- scope: keyword.conditional
match: ^\s*repeat\b
- scope: keyword.conditional
match: ^\s*until\b
- scope: keyword.control
match: (^ {16}CHOICES:)
- scope: keyword.control
match: (^ {16}ACTIONS:)
- scope: string
match: (^ {16}[A-Z][A-Z0-9_]*\b)
- scope: keyword.control
match: (^ {12}\[[A-Z]:)
- scope: keyword.control
match: (^ {12}END OF [A-Z]\]:)
- match: '(^ {4}([A-Z])( (->) ([^\n#:]+))?: +([^\n#\[]*))'
captures:
2: keyword.control
4: keyword.operator
- scope: entity.name.function
match: (^ {4}@[A-Za-z0-9]+$)
- scope: variable.parameter
match: ^ {4}IMAGE\b
- scope: variable.parameter
match: ^ {4}COLLECTIBLE\b
- match: ^ {4}$
push: blank_line
- match: ^ {4}
push: inline_markdown
- match: ^ {1,3}
scope: invalid
- scope: entity.name.function
match: (^[A-Z][A-Z0-9_]*\s+joins\b)
- scope: entity.name.function
match: (^[A-Z][A-Z0-9_]*\s+leaves\b)
- scope: markup.heading
match: (^Chapter \d+)
- scope: punctuation
match: \(
- scope: punctuation
match: \)
- scope: punctuation
match: \[+
- scope: punctuation
match: \]+
- scope: punctuation
match: ':'
- scope: punctuation
match: ','
- scope: keyword.operator
match: ==
- scope: keyword.operator
match: '!='
- scope: keyword.operator
match: '='
- scope: keyword.operator
match: \+=
- scope: keyword.operator
match: -=
- scope: keyword.operator
match: \+
- scope: keyword.operator
match: '-'
- scope: keyword.operator
match: \*
- scope: keyword.operator
match: /
- scope: keyword.operator
match: '%'
- scope: keyword.operator
match: '>'
- scope: keyword.operator
match: <
- scope: keyword.operator.word
match: \band\b
- scope: keyword.operator.word
match: \bor\b
- scope: keyword.operator.word
match: \bnot\b
- scope: constant.numeric
match: (\d+)
- scope: markup.raw
match: ("[^\n\"]*")
- scope: keyword.control
match: \bhref\b
- scope: keyword.control
match: \bweight\b
- scope: variable.name
match: \b[A-Za-z_][A-Za-z0-9_.]*\b
blank_line:
- meta_content_scope: markup.raw
- match: ^
pop: true
inline_markdown:
- meta_scope: text
- include: templates
- match: __
push: italic
- match: \*\*
push: bold
- match: '`'
push: monospace
- match: $
pop: true
italic:
- meta_scope: markup.italic
- include: comments
- include: templates
- match: \*\*
push: bold
- match: __
pop: true
bold:
- meta_content_scope: markup.bold
- include: comments
- include: templates
- match: __
push: italic
- match: \*\*
pop: true
monospace:
- meta_content_scope: markup.raw.inline
- include: comments
- include: templates
- match: '`'
pop: true
comments:
- scope: comment
match: \#.*$
templates:
- scope: entity.name.tag
match: \{%\s+macro\b
- scope: entity.name.tag
match: \{%\s+endmacro\b
- scope: entity.name.tag
match: \{%\s+for
- scope: entity.name.tag
match: \{%\sendfor
- scope: entity.name.tag
match: \{%\s+if
- scope: entity.name.tag
match: \{%\s+endif
- scope: entity.name.tag
match: \{%\s+set
- scope: entity.name.tag
match: \{%
- scope: entity.name.tag
match: '%\}'
- scope: entity.name.tag
match: \{\{
- scope: entity.name.tag
match: \}\}