-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtl-python-injection.tmLanguage.json
More file actions
86 lines (86 loc) · 3.69 KB
/
Copy pathrtl-python-injection.tmLanguage.json
File metadata and controls
86 lines (86 loc) · 3.69 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
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "RTL in Python strings",
"scopeName": "inline.rtl-python",
"injectionSelector": "L:source.python -comment -string",
"patterns": [
{ "include": "#compile-triple-double" },
{ "include": "#compile-triple-single" },
{ "include": "#compile-single-double" },
{ "include": "#compile-single-single" }
],
"repository": {
"compile-triple-double": {
"comment": "RtlCompiler.compile(\"\"\" ... \"\"\") — triple-double-quoted string on the same line as compile(",
"begin": "\\b(RtlCompiler)\\s*(\\.)\\s*(compile)\\s*(\\()\\s*([rR]?)(\"\"\")",
"beginCaptures": {
"1": { "name": "support.type.class.python" },
"2": { "name": "punctuation.separator.period.python" },
"3": { "name": "meta.function-call.python" },
"4": { "name": "punctuation.definition.arguments.begin.python" },
"5": { "name": "storage.type.string.python" },
"6": { "name": "punctuation.definition.string.begin.python" }
},
"end": "\"\"\"",
"endCaptures": {
"0": { "name": "punctuation.definition.string.end.python" }
},
"contentName": "meta.embedded.block.rtl",
"patterns": [ { "include": "source.rtl" } ]
},
"compile-triple-single": {
"comment": "RtlCompiler.compile(''' ... ''')",
"begin": "\\b(RtlCompiler)\\s*(\\.)\\s*(compile)\\s*(\\()\\s*([rR]?)(''')",
"beginCaptures": {
"1": { "name": "support.type.class.python" },
"2": { "name": "punctuation.separator.period.python" },
"3": { "name": "meta.function-call.python" },
"4": { "name": "punctuation.definition.arguments.begin.python" },
"5": { "name": "storage.type.string.python" },
"6": { "name": "punctuation.definition.string.begin.python" }
},
"end": "'''",
"endCaptures": {
"0": { "name": "punctuation.definition.string.end.python" }
},
"contentName": "meta.embedded.block.rtl",
"patterns": [ { "include": "source.rtl" } ]
},
"compile-single-double": {
"comment": "RtlCompiler.compile(\"...\") — single-line double-quoted string",
"begin": "\\b(RtlCompiler)\\s*(\\.)\\s*(compile)\\s*(\\()\\s*([rR]?)(\")",
"beginCaptures": {
"1": { "name": "support.type.class.python" },
"2": { "name": "punctuation.separator.period.python" },
"3": { "name": "meta.function-call.python" },
"4": { "name": "punctuation.definition.arguments.begin.python" },
"5": { "name": "storage.type.string.python" },
"6": { "name": "punctuation.definition.string.begin.python" }
},
"end": "(?<!\\\\)\"",
"endCaptures": {
"0": { "name": "punctuation.definition.string.end.python" }
},
"contentName": "meta.embedded.line.rtl",
"patterns": [ { "include": "source.rtl" } ]
},
"compile-single-single": {
"comment": "RtlCompiler.compile('...') — single-line single-quoted string",
"begin": "\\b(RtlCompiler)\\s*(\\.)\\s*(compile)\\s*(\\()\\s*([rR]?)(')",
"beginCaptures": {
"1": { "name": "support.type.class.python" },
"2": { "name": "punctuation.separator.period.python" },
"3": { "name": "meta.function-call.python" },
"4": { "name": "punctuation.definition.arguments.begin.python" },
"5": { "name": "storage.type.string.python" },
"6": { "name": "punctuation.definition.string.begin.python" }
},
"end": "(?<!\\\\)'",
"endCaptures": {
"0": { "name": "punctuation.definition.string.end.python" }
},
"contentName": "meta.embedded.line.rtl",
"patterns": [ { "include": "source.rtl" } ]
}
}
}