-
Notifications
You must be signed in to change notification settings - Fork 0
/
gherkin.lang
80 lines (73 loc) · 3.69 KB
/
gherkin.lang
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Author: 2011 Ransford Okpoti -->
<language id="gherkin" _name="Gherkin" version="2.0" _section="Scripts">
<metadata>
<property name="mimetypes">text/plain</property>
<property name="globs">*.feature</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="feature" _name="Feature" map-to="def:type"/>
<style id="steps_keywords" _name="Steps Keywords" map-to="def:keyword"/>
<style id="constructors" _name="Constructors" map-to="def:type"/>
<style id="variables" _name="Variables" map-to="def:comment"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="comments" _name="Comments" map-to="def:comment"/>
<style id="tag" _name="Tag" map-to="def:identifier"/>
<style id="table-border" _name="Table Border" map-to="def:special-char"/>
</styles>
<definitions>
<context id="gherkin" class="no-spell-check">
<include>
<!-- Keywords -->
<context id="steps_keywords" style-ref="steps_keywords">
<keyword>Given</keyword>
<keyword>When</keyword>
<keyword>Then</keyword>
<keyword>And</keyword>
<keyword>But</keyword>
</context>
<context id="comments" style-ref="comments" end-at-line-end="true">
<start>#</start>
<end>\n</end>
</context>
<context id="feature" style-ref="feature">
<keyword>Feature</keyword>
</context>
<context id="constructors" style-ref="constructors">
<keyword>Scenario</keyword>
<keyword>Examples</keyword>
<keyword>Outline</keyword>
<keyword>Background</keyword>
</context>
<context id="variables" style-ref="variables">
<match>(<)(\w+)(>)</match>
</context>
<context id="single-quoted-string" style-ref="string">
<match>'[^']*'</match>
</context>
<context id="double-quoted-string" style-ref="string">
<start>"</start>
<end>"</end>
</context>
<context id="tag" style-ref="tag" end-at-line-end="true">
<start>@</start>
</context>
<context id="table-border" style-ref="table-border" end-at-line-end="true">
<start>\|</start>
<end>\n</end>
<include>
<context ref="def:decimal" />
<context ref="def:float" />
<context ref="def:string" />
<context id="table_headings">
<match>\w+</match>
</context>
</include>
</context>
</include>
</context>
</definitions>
</language>