forked from andriyko/sublime-robot-framework-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Robot.YAML-tmLanguage
52 lines (42 loc) · 1.63 KB
/
Robot.YAML-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
# [PackageDev] target_format: plist, ext: tmLanguage
name: Robot Framework syntax highlighting.
scopeName: source.robot
fileTypes: [robot]
uuid: 23650265-9dfb-4d5f-9ed0-0928ba59a796
patterns:
- comment: Robot Framework numbers, like ${1} or ${12.3}
name: constant.numeric.robot
match: \$\{(\d+|\d+\.\d*|0[bB][01]+|0[oO][0-7]+|0[xX][0-9a-fA-F]+)\}
- comment: Robot Framework environment variable, like %{USER}
name: constant.numeric.robot
match: (?i)(%\{[\w|\s]+\})
- comment: Robot Framework scalar and dictionary variables
name: entity.name.class
begin: ((?<!\\)([$&]{)|(?<=\\\\)([$&]{))
end: \}
- comment: Robot Framework list variables
name: entity.name.class
begin: ((?<!\\)(@{)|(?<=\\\\)(@{))
end: (}\[.+])|(})
- comment: Robot Framework data tables
name: string.robot.header
match: (?i)^(\*{1,3} ?)(settings?|variables?|keywords?|test cases?)( ?\*{1,3})?
- comment: Test case, keyword and settings table documentation
name: comment
begin: (?i)^\s*\[?Documentation\]?\s+
end: ^(?!\s*+\.\.\.)
- comment: Comment character
name: comment
begin: (^| {2,}|\t|\\| {1,})(?<!\\\\)#
end: $
- comment: Tests case and keyword settings
name: storage.type
match: (?i)\s+\[(Tags|Setup|Teardown|Template|Timeout|Arguments|Return)\]
- comment: Settings table settings, like Library
name: constant.language
match: (?i)^(Library|Resource|Test Timeout|Test Template|Test Teardown|Test Setup|Default
Tags|Force Tags|Metadata|Variables|Suite Setup|Suite Teardown)(?:( )|( \| ))
- comment: Keywords and test cases
name: keyword.control.robot
begin: ^[^\.{3}]\S+
end: $