-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFont.sublime-syntax
82 lines (77 loc) · 1.99 KB
/
Font.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
%YAML 1.2
---
name: Crackshell Font
file_extensions:
- fnt
scope: text.crackshell.fnt
variables:
identifier: '[A-Za-z][A-Za-z0-9]*'
number: '-?[0-9]+'
contexts:
preprocessor-expression:
- match: '\b[A-Z0-9_]+\b'
scope: entity.name.constant
- match: '(\|\||&&)'
scope: keyword.operator.logical
- match: '"'
scope: punctuation.definition.string.begin
push:
- meta_scope: string.quoted.double
- match: '"'
scope: punctuation.definition.string.end
pop: true
- match: '$'
pop: true
has-preprocessor:
- match: '^\s*(%)'
captures:
1: keyword.control.import
push:
- meta_scope: meta.preprocessor
- match: '//.*'
scope: comment.line
- match: '(?i)(if|else|endif)\b'
scope: support.function
set: preprocessor-expression
- match: '(PROFILE_START|PROFILE_STOP)\b'
scope: support.function
set:
- meta_scope: string.unquoted
- match: '$'
pop: true
- match: '[A-Za-z_][A-Za-z0-9_]+'
scope: keyword.control.import
set: preprocessor-expression
- match: '$'
pop: true
string:
- meta_scope: string.quoted.double
- match: '"'
scope: punctuation.definition.string.end
pop: true
attribute-value:
- match: '='
scope: keyword.operator.assignment
- match: '{{number}}'
scope: constant.numeric
- match: ','
scope: punctuation.separator
- match: '"'
scope: punctuation.definition.string.begin
push: string
- match: '(?=[^\s]+)'
push:
- meta_scope: string.unquoted
- match: '(?=\s)'
pop: true
- match: ''
pop: true
attribute:
- match: '\b{{identifier}}(?==)\b'
scope: variable.parameter
push: attribute-value
- match: '\b{{identifier}}(?=\s*)\b'
scope: entity.name.function
main:
- include: has-preprocessor
- include: attribute