-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwollok.JSON-tmLanguage
89 lines (87 loc) · 2.78 KB
/
wollok.JSON-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
// [PackageDev] target_format: plist, ext: tmLanguage
{ "name": "Wollok",
"scopeName": "source.wollok",
"fileTypes": ["wlk", "wpgm", "wtest"],
"uuid": "593a7982-2830-4b6c-99e1-e7b38fe99bc0",
"repository" : {
"general" : {
"patterns" : [
{ "include": "#commentBlock" },
{ "include": "#operators" },
{ "include": "#keywords" },
{ "include": "#numbers" },
{ "include": "#stringSingleQuote" },
{ "include": "#stringDoubleQuote" }
]
},
"operators" : {
"name": "keyword.operator.source.wollok",
"match": "(\\b(and|or|not)\\b)|(\\+|-|%|#|\\*|\\/|\\^|==?|~=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.))"
},
"keywords" : {
"match": "\\b(object|class|package|program|test|describe|method|override|constructor|native|var|const|property|inherits|new|if|else|self|super|import|null|true|false|return|throw|then always|try|catch|mixed with|with|mixin|fixture)\\b",
"name": "keyword.source.wollok",
"comment": "Keywords"
},
"numbers" : {
"name": "constant.numeric.source.wollok",
"match": "(?<![\\d.])\\s0x[a-fA-F\\d]+|\\b\\d+(\\.\\d+)?([eE]-?\\d+)?|\\.\\d+([eE]-?\\d+)?"
},
"stringSingleQuote" : {
"name": "string.quoted.single.source.wollok",
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.source.wollok"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.source.wollok"
}
},
"patterns": [
{
"match": "\\\\(\\d{1,3}|.)",
"name": "constant.character.escape.source.wollok"
}
]
},
"stringDoubleQuote" : {
"name": "string.quoted.double.source.wollok",
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.source.wollok"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.source.wollok"
}
},
"patterns": [
{
"match": "\\\\(\\d{1,3}|.)",
"name": "constant.character.escape.source.wollok"
}
]
},
"commentBlock" : {
"patterns": [
{ "match": "(//).*",
"name": "comment.line.double-slash.source.wollok"
},
{ "begin": "/\\*",
"end": "\\*/",
"name": "comment.block.source.wollok"
}
]
}
},
"patterns": [
{ "include": "#general" }
]
}