Skip to content

Commit 37a5b2d

Browse files
committed
Add sublime-syntax
1 parent a9c40bf commit 37a5b2d

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

jsonxepr.sublime-syntax

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
%YAML 1.2
2+
---
3+
name: jsonexpr
4+
scope: source.jsonexpr
5+
6+
contexts:
7+
main:
8+
- match: \b(if|else)\b
9+
scope: keyword.control.jsonexpr
10+
- match: \b(not|in|and|or)\b
11+
scope: keyword.operator.jsonexpr
12+
- match: '==|!=|>=|>|<=|<|\+|\-|\/|\*\*|\*|\%|\.'
13+
scope: keyword.operator.jsonexpr
14+
- match: '[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?'
15+
scope: constant.numeric.jsonexpr
16+
- match: \b(true|false)\b
17+
scope: constant.language.boolean.jsonexpr
18+
- match: \b(null)\b
19+
scope: constant.language.jsonexpr
20+
- match: '([a-zA-Z_]+[a-zA-Z0-9_]*)\s*(\()'
21+
scope:
22+
captures:
23+
1: variable.function.jsonexpr
24+
2: punctuation.section.group.start.jsonexpr
25+
push:
26+
- include: main
27+
- match: \,
28+
scope: punctuation.separator.jsonexpr
29+
pop: 1
30+
- match: \)
31+
scope: punctuation.section.group.end.jsonexpr
32+
pop: 1
33+
- match: \(
34+
scope: punctuation.section.group.start.jsonexpr
35+
push:
36+
- include: main
37+
- match: \)
38+
scope: punctuation.section.group.end.jsonexpr
39+
pop: 1
40+
- match: \[
41+
scope: punctuation.section.group.start.jsonexpr
42+
push:
43+
- include: main
44+
- match: '\,|\:'
45+
scope: punctuation.separator.jsonexpr
46+
- match: \]
47+
scope: punctuation.section.group.end.jsonexpr
48+
pop: 1
49+
- match: \{
50+
scope: punctuation.section.group.start.jsonexpr
51+
push:
52+
- include: main
53+
- match: '\,|\:'
54+
scope: punctuation.separator.jsonexpr
55+
- match: \}
56+
scope: punctuation.section.group.end.jsonexpr
57+
pop: 1
58+
- match: \'
59+
scope: punctuation.definition.string.begin.jsonexpr
60+
push:
61+
- meta_scope: string.quoted.single.jsonexpr
62+
- match: \\.
63+
scope: constant.character.escape.jsonexpr
64+
- match: \'
65+
scope: punctuation.definition.string.end.jsonexpr
66+
pop: 1
67+
- match: \"
68+
scope: punctuation.definition.string.begin.jsonexpr
69+
push:
70+
- meta_scope: string.quoted.double.jsonexpr
71+
- match: \\.
72+
scope: constant.character.escape.jsonexpr
73+
- match: \"
74+
scope: punctuation.definition.string.end.jsonexpr
75+
pop: 1

0 commit comments

Comments
 (0)