author | Lorenzo Bettini <bettini@dsi.unifi.it> | 2015年03月30日 13:39:51 +0200 |
---|---|---|
committer | Lorenzo Bettini <bettini@dsi.unifi.it> | 2015年03月30日 13:39:51 +0200 |
commit | 9aee88ada3b78dffe0774e4f79ea691819ada41e (patch) | |
tree | 946ba473e063ca24a1198737516db534bca593e4 /src | |
parent | 03c2b39609f732cc22a38f8ef9b6fbb3d2574397 (diff) | |
download | src-highlite-9aee88ada3b78dffe0774e4f79ea691819ada41e.tar.gz |
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/default.css | 9 | ||||
-rw-r--r-- | src/default.style | 11 | ||||
-rw-r--r-- | src/esc.style | 11 | ||||
-rw-r--r-- | src/esc256.style | 9 | ||||
-rw-r--r-- | src/feature.lang | 26 | ||||
-rw-r--r-- | src/lang.map | 2 |
diff --git a/src/Makefile.am b/src/Makefile.am index f537b45..7635e36 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -86,7 +86,7 @@ vbscript.lang awk.lang bat.lang clipper.lang cobol.lang d.lang \ errors.lang erlang.lang proto.lang vala.lang lisp.lang islisp.lang \ scheme.lang po.lang opa.lang javalog.lang upc.lang tml.lang \ lilypond.lang coffeescript.lang go.lang \ -r.lang s.lang zsh.lang groovy.lang json.lang +r.lang s.lang zsh.lang groovy.lang json.lang feature.lang LANGFILES_NOTTOCHECK= \ tml_formatting_all.lang tml_macrolinks.lang tml_macrosdelayed2.lang \ diff --git a/src/default.css b/src/default.css index d58bfe8..8827256 100644 --- a/src/default.css +++ b/src/default.css @@ -53,3 +53,12 @@ body { background-color: white; } /* for Oz */ .atom { color: orange; } .meta { font-style: italic; } + +/* for feature/cucumber files */ +.cuketag { color: green; } +.gherken { color: blue; } +.given { color: red; } +.when { color: cyan; } +.then { color: yellow; } +.and_but { color: pink; } +.table { color: gray; }
\ No newline at end of file diff --git a/src/default.style b/src/default.style index 24d7886..c0daf3d 100644 --- a/src/default.style +++ b/src/default.style @@ -69,4 +69,13 @@ label teal b; // for errors error purple; -warning darkgreen;
\ No newline at end of file +warning darkgreen; + +// for feature (Cucumber) files +cuketag green ; +gherken blue ; +given red ; +when cyan ; +then yellow ; +and_but pink ; +table gray ;
\ No newline at end of file diff --git a/src/esc.style b/src/esc.style index c9451d9..626659b 100644 --- a/src/esc.style +++ b/src/esc.style @@ -32,4 +32,13 @@ difflines blue; // for css selector purple; property blue; -value darkgreen i;
\ No newline at end of file +value darkgreen i; + +// for feature (Cucumber) files +cuketag green ; +gherken blue ; +given red ; +when cyan ; +then yellow ; +and_but pink ; +table white ; diff --git a/src/esc256.style b/src/esc256.style index 7b1b720..5cde492 100644 --- a/src/esc256.style +++ b/src/esc256.style @@ -40,3 +40,12 @@ value green ; // specialchar // symbol // ==== + +// for feature (Cucumber) files +cuketag green ; +gherken blue ; +given red ; +when cyan ; +then yellow ; +and_but pink ; +table gray ; diff --git a/src/feature.lang b/src/feature.lang new file mode 100644 index 0000000..ff8ddf3 --- /dev/null +++ b/src/feature.lang @@ -0,0 +1,26 @@ +# Cucumber / feature file lang definition file +# Probably can remove some definitions, since FFs are so simple + +include "number.lang" + +string delim "\"" "\"" escape "\\" +string delim "'" "'" escape "\\" +string delim "<" ">" + +keyword ="Feature|Background|Scenario|Scenario Outline|Examples" + +# type = '(\$[#]?|@@|@)([[:word:]]+|\'|\"|/)' + +include "script_comment.lang" + +# Define cucumber tables +table = '^\s*\|([^|]*)\|([^|]*)\|\s*$' + +# tags +cuketag = '(?<!\S)(@[[:word:]]+)(?!\S)' + +# The Gherken statements +given = '^\s*(Given)' +when = '^\s*(When)' +then = '^\s*(Then)' +and_but = '^\s*(And|But)' diff --git a/src/lang.map b/src/lang.map index d555c00..e84ded8 100644 --- a/src/lang.map +++ b/src/lang.map @@ -168,4 +168,4 @@ lilypond = lilypond.lang ly = lilypond.lang groovy = groovy.lang json = json.lang - +feature = feature.lang |