Skip to content

Commit eaaa9b9

Browse files
authored
Create Logicode.sublime-syntax
1 parent 0ac6dc5 commit eaaa9b9

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

syntax/Logicode.sublime-syntax

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
%YAML 1.2
2+
---
3+
# See http://www.sublimetext.com/docs/3/syntax.html
4+
file_extensions:
5+
- lgc
6+
scope: source
7+
variables:
8+
identifier: ((?!\binput\b|\b__scope__\b)[a-zA-Z_$]+)
9+
contexts:
10+
main:
11+
- match: (\#)
12+
scope: punctuation.definition.comment
13+
push: comment
14+
15+
- match: \b(circ)\b
16+
scope: keyword.control
17+
push: circ
18+
19+
- match: \b(cond)\b
20+
scope: keyword.control
21+
push: cond
22+
23+
- match: \b(out)\b
24+
scope: keyword.control
25+
push: out
26+
27+
- match: \b(var)\b
28+
scope: storage.type
29+
push: var
30+
31+
- match: \b(input|__scope__)\b
32+
scope: keyword.control
33+
34+
- match: (->)
35+
scope: storage.type
36+
37+
- match: ([&|!<>$=/])
38+
scope: keyword.operator
39+
40+
- match: ({{identifier}}(?=\())
41+
scope: entity.name.function
42+
43+
- include: literal
44+
45+
literal:
46+
- match: \b([01]+)\b
47+
scope: constant.numeric
48+
49+
- match: (\?)
50+
scope: constant
51+
52+
comment:
53+
- meta_scope: comment.line
54+
- match: $
55+
pop: true
56+
57+
circ:
58+
- match: ( +)
59+
set: circ2
60+
61+
circ2:
62+
- match: \b{{identifier}}\b
63+
scope: entity.name.function
64+
set: circ3
65+
66+
circ3:
67+
- match: (\()
68+
set: arguments
69+
70+
arguments:
71+
- match: \b{{identifier}}\b
72+
scope: variable.parameter.function
73+
set: arguments_alpha
74+
- match: (\))
75+
pop: true
76+
77+
arguments_alpha:
78+
- match: (,[ \t]*)
79+
set: arguments
80+
- match: (\))
81+
pop: true
82+
83+
cond:
84+
- match: ( +)
85+
pop: true
86+
87+
out:
88+
- match: ( +)
89+
pop: true
90+
91+
var:
92+
- match: ( +)
93+
pop: true

0 commit comments

Comments
 (0)