forked from ptweir/python-string-sql
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhighlight-sql-string.tmLanguage.json
46 lines (46 loc) · 1.65 KB
/
highlight-sql-string.tmLanguage.json
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
{
"fileTypes": [
"py"
],
"injectionSelector": "L:string.quoted.multi.python, L:string.quoted.single.python, L:meta.fstring.python - (comment.line.number-sign.python, punctuation.definition.comment.python)",
"patterns": [
{
"name": "meta.embedded.block.sql",
"begin": "\\s*((?i)(explain|alter|analyze|attach|begin|commit|create|delete|detach|drop|insert|pragma|reindex|release|rollback|savepoint|select|update|vacuum|replace|with))",
"end": ";|(?=\"\"\"|\"|--|((?i)(explain|alter|analyze|attach|begin|commit|create|delete|detach|drop|insert|pragma|reindex|release|rollback|savepoint|select|update|vacuum|replace)))",
"beginCaptures": {
"1": {
"name": "keyword.other.DML.sql"
}
},
"patterns": [
{
"include": "source.sql"
},
{
"include": "source.python#fstring-guts"
}
]
},
{
"name": "meta.embedded.block.sql",
"begin": "\\s*(--[^\"\\n\\r\\{\\}\\\\]*)",
"end": "(?=\"|\\n|\\r)",
"beginCaptures": {
"0": {
"name": "comment.line.double-dash.sql"
}
},
"patterns": [
{
"include": "source.python#fstring-guts"
},
{
"match": "[^\"\\n\\r\\{\\}\\\\]*",
"name": "comment.line.double-dash.sql"
}
]
}
],
"scopeName": "python-sql.injection"
}