mirror of
https://github.com/cmur2/joe-syntax.git
synced 2024-12-22 02:54:23 +01:00
Improved Ant syntax highlighting
Features: - keyword hilite for start tag names e.g. <target ...> - subroutine 'antvar' for Ant variable references
This commit is contained in:
parent
1a314919ff
commit
2dfd716959
52
ant.jsf
52
ant.jsf
@ -19,13 +19,16 @@
|
|||||||
=CommentStart green
|
=CommentStart green
|
||||||
=CommentBody green
|
=CommentBody green
|
||||||
=CommentEnd green
|
=CommentEnd green
|
||||||
=PIStart magenta bold
|
=PIStart yellow bold
|
||||||
=PIBody magenta
|
=PIBody yellow
|
||||||
=PIEnd magenta bold
|
=PIEnd yellow bold
|
||||||
=CdataStart blue bold
|
=CdataStart blue bold
|
||||||
=CdataBody bold
|
=CdataBody bold
|
||||||
=CdataEnd blue bold
|
=CdataEnd blue bold
|
||||||
|
|
||||||
|
=Keytag bold magenta #fg_310 # brown
|
||||||
|
|
||||||
|
|
||||||
# http://www.w3.org/TR/2004/REC-xml-20040204/
|
# http://www.w3.org/TR/2004/REC-xml-20040204/
|
||||||
#
|
#
|
||||||
# NOTE: For UNICODE compatibility, the ranges
|
# NOTE: For UNICODE compatibility, the ranges
|
||||||
@ -65,7 +68,7 @@
|
|||||||
:tag Tag
|
:tag Tag
|
||||||
* error noeat recolor=-1
|
* error noeat recolor=-1
|
||||||
"/" end_tag
|
"/" end_tag
|
||||||
"A-Za-z_:" start_or_empty_tag
|
"A-Za-z_:" start_or_empty_tag buffer
|
||||||
"?" pi_start recolor=-2
|
"?" pi_start recolor=-2
|
||||||
"!" decl recolor=-2 buffer
|
"!" decl recolor=-2 buffer
|
||||||
|
|
||||||
@ -94,11 +97,21 @@
|
|||||||
|
|
||||||
# Matched: <tag
|
# Matched: <tag
|
||||||
|
|
||||||
|
# compare tag name of start/empty tags with a list
|
||||||
|
# of Ant specific keywords
|
||||||
:start_or_empty_tag Tag
|
:start_or_empty_tag Tag
|
||||||
* error noeat recolor=-1
|
* decide_tag_type noeat strings
|
||||||
|
"target" kw
|
||||||
|
done
|
||||||
"A-Za-z0-9._:-" start_or_empty_tag
|
"A-Za-z0-9._:-" start_or_empty_tag
|
||||||
|
|
||||||
|
:kw Keytag
|
||||||
|
* decide_tag_type noeat
|
||||||
|
|
||||||
|
:decide_tag_type Tag
|
||||||
|
* error noeat recolor=-1
|
||||||
"/" empty_tag
|
"/" empty_tag
|
||||||
" \t\r\n" start_or_empty_tag_sp recolor=-1
|
" \t\r\n" start_or_empty_tag_sp
|
||||||
">" content
|
">" content
|
||||||
|
|
||||||
:start_or_empty_tag_sp Idle
|
:start_or_empty_tag_sp Idle
|
||||||
@ -156,7 +169,7 @@
|
|||||||
"<" error noeat recolor=-1
|
"<" error noeat recolor=-1
|
||||||
"&" char_dq recolor=-1
|
"&" char_dq recolor=-1
|
||||||
"\"" endstring
|
"\"" endstring
|
||||||
"$" maybe_antvar_dq
|
"$" string_dq call=.antvar()
|
||||||
|
|
||||||
# ">" error noeat recolor=-1
|
# ">" error noeat recolor=-1
|
||||||
|
|
||||||
@ -166,7 +179,7 @@
|
|||||||
"<" error noeat recolor=-1
|
"<" error noeat recolor=-1
|
||||||
"&" char_sq recolor=-1
|
"&" char_sq recolor=-1
|
||||||
"'" endstring
|
"'" endstring
|
||||||
"$" maybe_antvar_sq
|
"$" string_sq call=.antvar()
|
||||||
|
|
||||||
# ">" error noeat recolor=-1
|
# ">" error noeat recolor=-1
|
||||||
|
|
||||||
@ -183,21 +196,16 @@
|
|||||||
"#" char_sq
|
"#" char_sq
|
||||||
";" string_sq
|
";" string_sq
|
||||||
|
|
||||||
:maybe_antvar_dq Constant
|
.subr antvar
|
||||||
* string_dq
|
# initial state
|
||||||
"{" antvar_dq recolor=-2
|
:maybe_antvar Constant
|
||||||
|
* NULL return
|
||||||
|
"{" antvar recolor=-2
|
||||||
|
|
||||||
:antvar_dq Escape
|
:antvar Escape
|
||||||
* antvar_dq
|
* antvar
|
||||||
"}" string_dq
|
"}" NULL return
|
||||||
|
.end
|
||||||
:maybe_antvar_sq Constant
|
|
||||||
* string_sq
|
|
||||||
"{" antvar_sq recolor=-2
|
|
||||||
|
|
||||||
:antvar_sq Escape
|
|
||||||
* antvar_sq
|
|
||||||
"}" string_sq
|
|
||||||
|
|
||||||
# Matched: <tag attr="foo"
|
# Matched: <tag attr="foo"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user