1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2025-08-31 05:13:04 +02:00

Brand new Haml highlighter

The main features of Haml can be correctly parsed according to
http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html.

There exist some limitations inherently comming from the limitations
of state machine based highlighters (without side effects)... this parsers
sucks with multiline comments, strings etc since the indent based grouping
can't be evaluated.
This commit is contained in:
cn
2011-10-19 20:34:20 +02:00
parent 0c2921e849
commit 2b59cf9e90
3 changed files with 133 additions and 1 deletions

View File

@@ -40,7 +40,11 @@
:rest Idle
* rest
"#" line_comment recolor=-1
.ifdef haml
"\n" NULL return
.else
"\n" idle
.endif
"{}" brace recolor=-1
"0" first_digit recolor=-1
"1-9" decimal recolor=-1
@@ -183,7 +187,11 @@ done
.endif
# might be TODO label
"BFHNTX" line_comment noeat call=.comment_todo()
.ifdef haml
"\n" NULL return
.else
"\n" idle
.endif
:line_comment_maybe_erb_end Comment
">" NULL recolor=-2 return