2011-08-17 23:57:26 +02:00
|
|
|
# JOE syntax highlight file for CSS
|
|
|
|
# by Eric Lin
|
|
|
|
|
|
|
|
# Define colors
|
|
|
|
|
|
|
|
=Idle
|
|
|
|
=Comment green
|
2011-11-06 21:03:56 +01:00
|
|
|
=Constant cyan
|
|
|
|
=Escape bold cyan
|
|
|
|
=Keyword bold
|
|
|
|
=Bad bold red
|
|
|
|
|
2011-11-07 23:39:10 +01:00
|
|
|
=Class yellow
|
2011-11-06 20:39:24 +01:00
|
|
|
=Id red
|
|
|
|
=Tag magenta
|
2011-08-17 23:57:26 +02:00
|
|
|
=HTML
|
|
|
|
|
2011-08-17 23:58:48 +02:00
|
|
|
# from html.jsf to support <?php?>
|
|
|
|
=TagEdge green
|
|
|
|
|
2011-08-17 23:57:26 +02:00
|
|
|
:begin Idle
|
2011-11-06 20:39:24 +01:00
|
|
|
* begin noeat call=.css()
|
2011-08-17 23:57:26 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# For <style> in html
|
|
|
|
#
|
|
|
|
|
|
|
|
.subr css
|
|
|
|
|
|
|
|
:reset HTML
|
2011-11-06 20:39:24 +01:00
|
|
|
* reset
|
|
|
|
"<" maybe_done recolor=-1
|
2011-08-17 23:57:26 +02:00
|
|
|
"/" slash
|
2011-11-07 23:39:10 +01:00
|
|
|
# prevent duplicate code
|
|
|
|
"#.a-zA-Z" selector noeat
|
|
|
|
"@" command recolor=-1
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-08-17 23:58:48 +02:00
|
|
|
:maybe_done TagEdge
|
2011-11-06 20:39:24 +01:00
|
|
|
* reset_html noeat
|
|
|
|
"/" reset noeat return recolor=-2
|
2011-08-17 23:58:48 +02:00
|
|
|
.ifdef php
|
2011-11-06 20:39:24 +01:00
|
|
|
"?%" rtn_php call=php.php()
|
2011-08-17 23:58:48 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# fix needed to produce similar output without php
|
|
|
|
:reset_html HTML
|
2011-11-06 20:39:24 +01:00
|
|
|
* reset noeat recolor=-2
|
2011-08-17 23:58:48 +02:00
|
|
|
|
|
|
|
# this state allows php and perl to recolor the ?> %> or &> properly.
|
|
|
|
:rtn_php TagEdge
|
2011-11-06 20:39:24 +01:00
|
|
|
* reset noeat
|
2011-08-17 23:57:26 +02:00
|
|
|
|
|
|
|
:slash Idle
|
|
|
|
* reset noeat
|
|
|
|
"*" comment recolor=-2
|
|
|
|
|
|
|
|
:comment Comment
|
|
|
|
* comment
|
|
|
|
"*" maybe_end_comment
|
|
|
|
|
|
|
|
:maybe_end_comment Comment
|
|
|
|
* comment
|
|
|
|
"/" reset
|
|
|
|
"*" maybe_end_comment
|
|
|
|
|
2011-11-07 23:39:10 +01:00
|
|
|
:command Idle
|
|
|
|
* command
|
|
|
|
";" reset
|
|
|
|
"{" command_block
|
|
|
|
|
|
|
|
:command_block Idle
|
|
|
|
* command_block
|
|
|
|
"}" reset
|
|
|
|
|
2011-11-06 21:03:56 +01:00
|
|
|
# CSS selectors
|
2011-11-07 23:39:10 +01:00
|
|
|
:selector Idle
|
|
|
|
* selector
|
|
|
|
"#" id_sel recolor=-1
|
|
|
|
"." class_sel recolor=-1
|
|
|
|
"a-zA-Z" tag_sel recolor=-1
|
|
|
|
":" pseudo_class_sel recolor=-1
|
2011-11-06 20:39:24 +01:00
|
|
|
"{" style_block recolor=-1
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-11-07 23:39:10 +01:00
|
|
|
:id_sel Id
|
|
|
|
* selector noeat
|
|
|
|
"a-zA-Z0-9_-" id_sel
|
|
|
|
|
|
|
|
:class_sel Class
|
|
|
|
* selector noeat
|
|
|
|
"a-zA-Z0-9_-" class_sel
|
|
|
|
|
|
|
|
:tag_sel Tag
|
|
|
|
* selector noeat
|
|
|
|
"a-zA-Z0-9_-" tag_sel
|
|
|
|
"[" tag_sel_attr recolor=-1
|
|
|
|
|
|
|
|
:tag_sel_attr Idle
|
|
|
|
* tag_sel_attr
|
|
|
|
"]" selector
|
|
|
|
|
|
|
|
:pseudo_class_sel Idle
|
|
|
|
* selector noeat
|
|
|
|
"a-zA-Z0-9_-" pseudo_class_sel
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-11-06 21:03:56 +01:00
|
|
|
# everything inside "{ ... }", containing many "key: value;" pairs
|
2011-11-06 20:39:24 +01:00
|
|
|
:style_block Idle
|
|
|
|
* style_block
|
|
|
|
"}" reset
|
|
|
|
"/" maybe_style_comment
|
|
|
|
"a-zA-Z-" style_word recolor=-1
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-11-06 20:39:24 +01:00
|
|
|
:maybe_style_comment Idle
|
|
|
|
* style_block recolor=-1
|
|
|
|
"*" style_comment recolor=-2
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-11-06 20:39:24 +01:00
|
|
|
:style_comment Comment
|
|
|
|
* style_comment
|
|
|
|
"*" maybe_end_style_comment
|
2011-08-17 23:57:26 +02:00
|
|
|
|
2011-11-06 20:39:24 +01:00
|
|
|
:maybe_end_style_comment Comment
|
|
|
|
* comment
|
|
|
|
"/" style_block
|
|
|
|
"*" maybe_end_style_comment
|
|
|
|
|
2011-11-06 21:03:56 +01:00
|
|
|
# property-key
|
|
|
|
:style_word Keyword
|
|
|
|
* style_word
|
|
|
|
":" style_value recolor=-1
|
|
|
|
|
|
|
|
# property-value
|
|
|
|
:style_value Idle
|
|
|
|
* style_value
|
|
|
|
";" style_block
|
2011-11-07 23:01:06 +01:00
|
|
|
# treat } without previous ; like ;}
|
|
|
|
"}" style_block noeat
|
2011-11-06 21:03:56 +01:00
|
|
|
"#" color recolor=-1
|
2011-11-07 23:01:06 +01:00
|
|
|
"0-9" decimal recolor=-1
|
|
|
|
"." maybe_float
|
2011-11-06 21:03:56 +01:00
|
|
|
"a-zA-Z_" ident
|
|
|
|
|
|
|
|
:color Constant
|
|
|
|
* style_value noeat
|
2011-11-07 23:01:06 +01:00
|
|
|
"0-9a-fA-F" color
|
2011-11-06 21:03:56 +01:00
|
|
|
|
|
|
|
:decimal Constant
|
|
|
|
* style_value noeat
|
|
|
|
"0-9" decimal
|
2011-11-07 23:01:06 +01:00
|
|
|
"." float
|
|
|
|
"a-zA-Z%" decimal_unit
|
|
|
|
|
|
|
|
:maybe_float Constant
|
|
|
|
* style_value noeat recolor=-2
|
|
|
|
"0-9" float recolor=-2
|
|
|
|
|
|
|
|
:float Constant
|
|
|
|
* style_value noeat
|
|
|
|
"0-9" float
|
|
|
|
"a-zA-Z%" decimal_unit
|
2011-11-06 21:03:56 +01:00
|
|
|
|
|
|
|
:decimal_unit Constant
|
|
|
|
* style_value noeat
|
|
|
|
"a-zA-Z" decimal_unit
|
|
|
|
|
|
|
|
:ident Idle
|
|
|
|
* style_value noeat
|
|
|
|
"a-ZA-Z0-9_-" ident
|
|
|
|
|
2011-08-17 23:57:26 +02:00
|
|
|
.end
|