-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShen.YAML-tmLanguage
113 lines (90 loc) · 2.82 KB
/
Shen.YAML-tmLanguage
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
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Shen
scopeName: source.shen
fileTypes: [shen]
uuid: 4f20d927-cddd-4fd7-a7a6-9739f008439d
patterns:
- include: '#expressions'
repository:
expressions:
patterns:
- include: '#comments'
- include: '#atoms'
- include: '#parens'
- include: '#squares'
comments:
patterns:
- name: comment.line
match: (\\\\.*$)
- name: comment.block
begin: (\\\*)
end: (\*\\)
parens:
patterns:
- name: meta.group
begin: (\()
end: (\))
patterns:
- include: '#expressions'
squares:
patterns:
- name: meta.group
begin: (\[)
end: (\])
patterns:
- include: '#expressions'
atoms:
patterns:
- comment: Multiline Strings
name: string.quoted.double
begin: (\")
end: (\")
patterns:
- match: (~A|~R|~S|~%|c#\d+;)
name: constant.character.escape
- match: (c#[^;]*;)
name: invalid.illegal
- comment: Numbers
name: constant.numeric
match: (?<=^|[\s()\[\]])[+-]*\d+\.?\d*(?=$|[\s;()\[\]])
- comment: Malformed Numbers
name: invalid.illegal
match: (?<=^|[\s()\[\]])[+-]*\d+\.?\d*[^\s;()\[\]]+(?=$|[\s;()\[\]])
- comment: Special Forms
name: keyword.control
match: (?<=\()(and|or|if|do|lambda|freeze|let|cond|cases|trap-error|where|package|defun|/.|define|defmacro|defcc|defprolog|datatype)(?=$|[\s;()\[\]{}])
- comment: Special Operators
name: keyword.control
match: (?<=^|[\s()\[\]{}])(->|<-|-->|<--|==>|<==|:=|__+)(?=$|[\s;()\[\]{}])
- comment: Standard Operators
name: keyword.operator
match: (?<=^|[\s()\[\]{}])(=|==|<|>|<=|>=|\+|-|\*|/)(?=$|[\s;()\[\]{}])
- comment: Definition Names
name: entity.name.function
match: (?<=\(define\s)([^\s()\[\]{}]*)(?=$|[\s;()\[\]{}])
- comment: Macro Names
name: entity.name.function
match: (?<=\(defmacro\s)([^\s()\[\]{}]*)(?=$|[\s;()\[\]{}])
- comment: Prolog Names
name: entity.name.function
match: (?<=\(defprolog\s)([^\s()\[\]{}]*)(?=$|[\s;()\[\]{}])
- comment: Package Names
name: entity.name.section
match: (?<=\(package\s)([^\s()\[\]{}]*)(?=$|[\s;()\[\]{}])
- comment: Data Types
name: entity.name.type
match: (?<=\(datatype\s)([^\s()\[\]{}]*)(?=$|[\s;()\[\]{}])
- comment: Local Variables
name: variable.language
match: (?<=^|[\s()\[\]{}])([A-Z][^\s()\[\];{}]*)(?=$|[\s;()\[\]{}])
- comment: Yacc Rule
name: entity.name.tag
match: (?<=^|[\s()\[\]])(<[^\s()\[\]]*>)(?=$|[\s;()\[\]])
- comment: Idle Symbols
name: constant.language
match: (?<=^|[\s)\[\]{}])([^A-Z\s()\[\]:;\|{}][^\s()\[\];{}]*)(?=$|[\s;()\[\]{}])
- comment: Empty Lists
name: constant.language
match: (\(\)|\[\])
...