-
Notifications
You must be signed in to change notification settings - Fork 19
/
robot.JSON-tmLanguage
70 lines (70 loc) · 2.2 KB
/
robot.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
{
"comment": "\n Robot Framework syntax highlighting for txt files.\n ",
"fileTypes": [
"txt"
],
"keyEquivalent": "^~R",
"name": "Robot Framework .txt",
"patterns": [
{
"comment": "start of a table",
"begin": "(?i)^\\*+\\s*(settings?|metadata|(user )?keywords?|test ?cases?|variables?)",
"end": "$",
"name": "string.robot.header"
},
{
"begin": "(?i)^\\s*\\[?Documentation\\]?",
"end": "^(?!\\s*+\\.\\.\\.)",
"name": "comment"
},
{
"comment": "testcase settings",
"match": "(?i)\\[(Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\\]",
"name": "storage.type.method.robot"
},
{
"begin": "(?i)\\[Tags\\]",
"comment": "test tags",
"end": "^(?!\\s*+\\.\\.\\.)",
"name": "storage.type.method.robot",
"patterns": [
{
"match": "^\\s*\\.\\.\\.",
"name": "comment"
}
]
},
{
"match": "\\b([0-9]*(\\.[0-9]+)?)\\b",
"name": "constant.numeric.robot"
},
{
"comment": "${variables}. one backslash escapes the variable, two do not",
"begin": "((?<!\\\\)|(?<=\\\\\\\\))[$@%]\\{",
"patterns": [
{ "include": "$self" },
{ "name": "entity.name.class",
"match": "."
}
],
"end": "\\}",
"name": "entity.name.class"
},
{
"begin": "(^| {2,}|\t|\\| {1,})(?<!\\\\)#",
"end": "$",
"name": "comment.robot"
},
{
"begin": "(^[^ \\t\\*\\n\\|]+)|((?<=^\\|)\\s+[^ \\t\\*\\n\\|]+)",
"end": "(?=\\s{2})|\\t|$|\\s+(?=\\|)",
"name": "keyword.control.robot"
},
{
"match": "(?i)^\\s*(Given|And|Then|When|But)",
"name": "keyword.control.robot"
}
],
"scopeName": "text.robot",
"uuid": "E54BFAB1-E5A0-4524-9FFC-FC08B20F21E4"
}