| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language name="Robot" |
| 4 |
version="1" |
| 5 |
kateversion="5.79" |
| 6 |
section="Scripts" |
| 7 |
extensions="*.robot" |
| 8 |
indenter="python" |
| 9 |
author="Akseli Lahtinen ([email protected])" |
| 10 |
license="MIT"> |
| 11 |
<highlighting> |
| 12 |
<list name="SettingSectionSettings"> |
| 13 |
<item>Library</item> |
| 14 |
<item>Resource</item> |
| 15 |
<item>Variables</item> |
| 16 |
<item>Metadata</item> |
| 17 |
<item>Suite Setup</item> |
| 18 |
<item>Suite Teardown</item> |
| 19 |
<item>Test Tags</item> |
| 20 |
<item>Force Tags</item> |
| 21 |
<item>Keyword Tags</item> |
| 22 |
<item>Test Setup</item> |
| 23 |
<item>Test Teardown</item> |
| 24 |
<item>Test Template</item> |
| 25 |
<item>Test Timeout</item> |
| 26 |
<item>Task Setup</item> |
| 27 |
<item>Default Tags</item> |
| 28 |
<item>Task Teardown</item> |
| 29 |
<item>Task Template</item> |
| 30 |
<item>Task Timeout</item> |
| 31 |
<!-- |
| 32 |
Documentation will go to its own regexp since its a comment |
| 33 |
--> |
| 34 |
</list> |
| 35 |
|
| 36 |
<list name="KeywordSectionSettings"> |
| 37 |
<item>Tags</item> |
| 38 |
<item>Setup</item> |
| 39 |
<item>Teardown</item> |
| 40 |
<item>Template</item> |
| 41 |
<item>Arguments</item> |
| 42 |
<item>Return</item> |
| 43 |
<item>Timeout</item> |
| 44 |
<!-- |
| 45 |
Documentation will go to its own regexp since its a comment |
| 46 |
--> |
| 47 |
</list> |
| 48 |
|
| 49 |
<list name="ControlOperators"> |
| 50 |
<item>IF</item> |
| 51 |
<item>ELSE</item> |
| 52 |
<item>END</item> |
| 53 |
<item>RETURN</item> |
| 54 |
<item>WHILE</item> |
| 55 |
<item>FOR</item> |
| 56 |
<item>BREAK</item> |
| 57 |
<item>CONTINUE</item> |
| 58 |
<item>TRY</item> |
| 59 |
<item>EXCEPT</item> |
| 60 |
<item>FINALLY</item> |
| 61 |
<item>IN</item> |
| 62 |
<item>ENUMERATE</item> |
| 63 |
<item>RANGE</item> |
| 64 |
<item>ZIP</item> |
| 65 |
</list> |
| 66 |
<contexts> |
| 67 |
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" > |
| 68 |
<StringDetect firstNonSpace="1" attribute="Setting" context="Multi-Line Comment" String="Documentation" beginRegion="RegionComment"/> |
| 69 |
<RegExpr firstNonSpace="0" attribute="Section" context="Settings Section" String="\*{3}\s{0,1}Settings\s{0,1}\*{3}"/> |
| 70 |
<RegExpr firstNonSpace="0" attribute="Section" context="#stay" String="\*{3}\s{0,1}Variables\s{0,1}\*{3}"/> |
| 71 |
<RegExpr firstNonSpace="0" attribute="Section" context="Test Cases Section" String="\*{3}\s{0,1}Test Cases\s{0,1}\*{3}"/> |
| 72 |
<RegExpr firstNonSpace="0" attribute="Section" context="Keywords Section" String="\*{3}\s{0,1}Keywords\s{0,1}\*{3}"/> |
| 73 |
<RegExpr firstNonSpace="0" attribute="Section" context="Tasks Section" String="\*{3}\s{0,1}Tasks\s{0,1}\*{3}"/> |
| 74 |
<RegExpr firstNonSpace="0" attribute="Section" context="Comments Section" String="\*{3}\s{0,1}Comments\s{0,1}\*{3}"/> |
| 75 |
<DetectChar attribute="Comment" char="#" context="Comment"/> |
| 76 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="#stay" String="[\[\]=\(\)\.\|]"/> |
| 77 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="KeywordSettings" String="\s{2,}\["/> |
| 78 |
<RegExpr firstNonSpace="0" attribute="Variable" context="#pop" String="[\$@&]\{\w*\}"/> |
| 79 |
<RegExpr firstNonSpace="0" attribute="Variable" context="#stay" String="[\$@&]\w*" /> |
| 80 |
<RegExpr firstNonSpace="0" attribute="Setting" context="#stay" String=".*BuiltIn\." /> |
| 81 |
<AnyChar attribute="String" context="String" String=""'" /> |
| 82 |
<keyword attribute="Control Flow" context="#pop" String="ControlOperators"/> |
| 83 |
</context> |
| 84 |
|
| 85 |
|
| 86 |
<context name="Comments Section" attribute="Comment" lineEndContext="#stay"> |
| 87 |
<RegExpr firstNonSpace="1" attribute="Section" context="#pop" String="^[\*].*$" lookAhead="true"/> |
| 88 |
</context> |
| 89 |
|
| 90 |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> |
| 91 |
<IncludeRules context="##Comments" /> |
| 92 |
</context> |
| 93 |
|
| 94 |
<context name="Multi-Line Comment" attribute="Comment" lineEndContext="#stay"> |
| 95 |
<RegExpr firstNonSpace="1" attribute="Comment" context="#pop" lookAhead="true" String="^\s{0,}[^\.]" endRegion="RegionComment"/> |
| 96 |
</context> |
| 97 |
|
| 98 |
<context name="Indented Multi-Line Comment" attribute="Comment" lineEndContext="#stay"> |
| 99 |
<AnyChar String="[]" attribute="Symbol" context="#stay" /> |
| 100 |
<RegExpr firstNonSpace="1" attribute="Comment" context="#stay" String="^\s{0,}[\.]{3}"/> |
| 101 |
<RegExpr firstNonSpace="1" attribute="Comment" context="#pop" lookAhead="true" String="^\s{0,}[^\.]"/> |
| 102 |
</context> |
| 103 |
|
| 104 |
<context name="Settings Section" attribute="Normal Text" lineEndContext="#stay"> |
| 105 |
<StringDetect firstNonSpace="0" attribute="Setting" context="Multi-Line Comment" String="Documentation" beginRegion="RegionComment"/> |
| 106 |
<IncludeRules context="SettingsValues" /> |
| 107 |
<RegExpr firstNonSpace="1" attribute="Section" context="#pop" String="^[\*].*$" lookAhead="true"/> |
| 108 |
<DetectChar attribute="Comment" char="#" context="Comment"/> |
| 109 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="#stay" String="[\[\]=\(\)\.\|]"/> |
| 110 |
<RegExpr firstNonSpace="0" attribute="Variable" context="#stay" String="[\$@&]\{\w*\}"/> |
| 111 |
<RegExpr firstNonSpace="0" attribute="Setting" context="#stay" String=".*BuiltIn\." /> |
| 112 |
<AnyChar attribute="String" context="String" String=""'" /> |
| 113 |
</context> |
| 114 |
|
| 115 |
<context name="Test Cases Section" attribute="Normal Text" lineEndContext="#stay"> |
| 116 |
<RegExpr firstNonSpace="1" attribute="Test Case" context="Test Case With Variable" String="^[\w]" /> |
| 117 |
<RegExpr firstNonSpace="1" attribute="Section" context="#pop" String="^[\*].*$" lookAhead="true"/> |
| 118 |
<IncludeRules context="Codeblock" /> |
| 119 |
</context> |
| 120 |
|
| 121 |
<context name="Tasks Section" attribute="Normal Text" lineEndContext="#stay"> |
| 122 |
<RegExpr firstNonSpace="1" attribute="Task" context="Task With Variable" String="^[\w]" /> |
| 123 |
<RegExpr firstNonSpace="1" attribute="Section" context="#pop" String="^[\*].*$" lookAhead="true"/> |
| 124 |
<IncludeRules context="Codeblock" /> |
| 125 |
</context> |
| 126 |
|
| 127 |
<context name="Keywords Section" attribute="Normal Text" lineEndContext="#stay"> |
| 128 |
<RegExpr firstNonSpace="1" attribute="Keyword" context="Keyword With Variable" String="^[\w]" /> |
| 129 |
<RegExpr firstNonSpace="1" attribute="Section" context="#pop" String="^[\*].*$" lookAhead="true"/> |
| 130 |
<IncludeRules context="Codeblock" /> |
| 131 |
</context> |
| 132 |
|
| 133 |
<context name="SettingsValues" attribute="Setting" lineEndContext="#pop"> |
| 134 |
<RegExpr firstNonSpace="1" attribute="Setting" String="^(Library|Resource|Variables|Metadata|Suite Setup|Suite Teardown|Test Tags|Force Tags|Keyword Tags|Test Setup|Test Teardown|Test Template|Test Timeout|Task Setup|Default Tags|Task Teardown|Task Template|Task Timeout) {0,}" context="#stay"/> |
| 135 |
</context> |
| 136 |
|
| 137 |
<context name="KeywordSettings" attribute="Normal Text" lineEndContext="#pop"> |
| 138 |
<DetectChar char="[" attribute="Symbol" context="#stay" /> |
| 139 |
<RegExpr firstNonSpace="0" attribute="Variable" context="#stay" String="[\$@&]\{{0,1}\w*\}{0,1}"/> |
| 140 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="StringAfterKeywordSettings" String="\]\s[^\$]([\w ]*)$" lookAhead="true"/> |
| 141 |
<keyword attribute="Setting" context="#stay" String="KeywordSectionSettings"/> |
| 142 |
<StringDetect firstNonSpace="0" attribute="Setting" context="Indented Multi-Line Comment" String="Documentation" insensitive="true"/> |
| 143 |
<DetectChar char="]" attribute="Symbol" context="#pop" /> |
| 144 |
</context> |
| 145 |
|
| 146 |
<context name="Codeblock" attribute="Normal Text" lineEndContext="#stay"> |
| 147 |
<keyword attribute="Control Flow" context="#stay" String="ControlOperators" /> |
| 148 |
<DetectChar attribute="Comment" char="#" context="Comment"/> |
| 149 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="#stay" String="[\[\]=\(\)\.]"/> |
| 150 |
<RegExpr firstNonSpace="0" attribute="Symbol" context="KeywordSettings" String="\s{2,}\["/> |
| 151 |
<RegExpr firstNonSpace="0" attribute="Variable" context="#stay" String="[\$@&]\{{0,1}\w*\}{0,1}"/> |
| 152 |
<AnyChar attribute="String" context="String" String=""'" /> |
| 153 |
</context> |
| 154 |
|
| 155 |
<context name="StringAfterKeywordSettings" attribute="Symbol" lineEndContext="#stay"> |
| 156 |
<StringDetect context="#stay" attribute="String" String="%1" dynamic="true"/> |
| 157 |
<RegExpr firstNonSpace="1" attribute="String" context="#stay" String="^\s{0,}[\.]{3}.*$"/> |
| 158 |
<RegExpr firstNonSpace="1" attribute="String" context="#pop" lookAhead="true" String="^\s{0,}[^\.]"/> |
| 159 |
</context> |
| 160 |
|
| 161 |
<context name="String" attribute="String" lineEndContext="#pop"> |
| 162 |
<AnyChar attribute="String" context="#pop" String=""'"/> |
| 163 |
</context> |
| 164 |
|
| 165 |
<context name="Test Case With Variable" attribute="Test Case" lineEndContext="#pop"> |
| 166 |
<RangeDetect char="$" char1="}" attribute="Variable" context="#stay" /> |
| 167 |
</context> |
| 168 |
|
| 169 |
<context name="Keyword With Variable" attribute="Keyword" lineEndContext="#pop"> |
| 170 |
<RangeDetect char="$" char1="}" attribute="Variable" context="#stay" /> |
| 171 |
</context> |
| 172 |
|
| 173 |
<context name="Task With Variable" attribute="Task" lineEndContext="#pop"> |
| 174 |
<RangeDetect char="$" char1="}" attribute="Variable" context="#stay" /> |
| 175 |
</context> |
| 176 |
|
| 177 |
</contexts> |
| 178 |
<itemDatas> |
| 179 |
<itemData name="Normal Text" defStyleNum="dsNormal" /> |
| 180 |
<itemData name="Setting" defStyleNum="dsBuiltIn" /> |
| 181 |
<itemData name="Test Case" defStyleNum="dsFunction" /> |
| 182 |
<itemData name="Keyword" defStyleNum="dsKeyword" /> |
| 183 |
<itemData name="Task" defStyleNum="dsExtension" /> |
| 184 |
<itemData name="String" defStyleNum="dsString" /> |
| 185 |
<itemData name="Section" defStyleNum="dsSpecialString" /> |
| 186 |
<itemData name="Variable" defStyleNum="dsVariable" /> |
| 187 |
<itemData name="Control Flow" defStyleNum="dsControlFlow" /> |
| 188 |
<itemData name="Comment" defStyleNum="dsComment" /> |
| 189 |
<itemData name="Symbol" defStyleNum="dsOperator" /> |
| 190 |
</itemDatas> |
| 191 |
</highlighting> |
| 192 |
|
| 193 |
<general> |
| 194 |
<comments> |
| 195 |
<comment name="singleLine" start="#"/> |
| 196 |
</comments> |
| 197 |
<keywords casesensitive="1"/> |
| 198 |
<folding indentationsensitive="1"/> |
| 199 |
</general> |
| 200 |
</language> |