-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmcpp-toml.tmLanguage.json
More file actions
116 lines (116 loc) · 2.86 KB
/
Copy pathmcpp-toml.tmLanguage.json
File metadata and controls
116 lines (116 loc) · 2.86 KB
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
114
115
116
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "mcpp TOML",
"scopeName": "source.toml.mcpp",
"patterns": [
{
"include": "#comment"
},
{
"include": "#table"
},
{
"include": "#key"
},
{
"include": "#string"
},
{
"include": "#datetime"
},
{
"include": "#number"
},
{
"include": "#boolean"
},
{
"include": "#punctuation"
}
],
"repository": {
"comment": {
"match": "#.*$",
"name": "comment.line.number-sign.toml"
},
"table": {
"match": "^\\s*(\\[\\[?)([^\\]\\r\\n]+?)(\\]\\]?)\\s*(?=#|$)",
"captures": {
"1": {
"name": "punctuation.definition.table.begin.toml"
},
"2": {
"name": "entity.name.section.toml"
},
"3": {
"name": "punctuation.definition.table.end.toml"
}
}
},
"key": {
"match": "^\\s*((?:[A-Za-z0-9_-]+|\"[^\"]+\"|'[^']+')(?:\\s*\\.\\s*(?:[A-Za-z0-9_-]+|\"[^\"]+\"|'[^']+'))*)\\s*(=)",
"captures": {
"1": {
"name": "variable.other.key.toml"
},
"2": {
"name": "keyword.operator.assignment.toml"
}
}
},
"string": {
"patterns": [
{
"begin": "\"\"\"",
"end": "\"\"\"",
"name": "string.quoted.triple.basic.toml",
"patterns": [
{
"include": "#escape"
}
]
},
{
"begin": "'''",
"end": "'''",
"name": "string.quoted.triple.literal.toml"
},
{
"begin": "\"",
"end": "\"",
"name": "string.quoted.double.toml",
"patterns": [
{
"include": "#escape"
}
]
},
{
"begin": "'",
"end": "'",
"name": "string.quoted.single.toml"
}
]
},
"escape": {
"match": "\\\\(?:[btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})",
"name": "constant.character.escape.toml"
},
"datetime": {
"match": "(?<![A-Za-z0-9_-])(?:\\d{4}-\\d{2}-\\d{2}(?:[Tt ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[Zz]|[+-]\\d{2}:\\d{2})?)?|\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)(?![A-Za-z0-9_-])",
"name": "constant.other.datetime.toml"
},
"number": {
"match": "(?<![A-Za-z0-9_-])[-+]?(?:0x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\\d(?:_?\\d)*)(?:\\.\\d(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|inf|nan)(?![A-Za-z0-9_-])",
"name": "constant.numeric.toml"
},
"boolean": {
"match": "(?<![A-Za-z0-9_-])(?:true|false)(?![A-Za-z0-9_-])",
"name": "constant.language.boolean.toml"
},
"punctuation": {
"match": "[\\[\\]{},.]",
"name": "punctuation.separator.toml"
}
}
}