mirror of
https://github.com/cmur2/joe-syntax.git
synced 2024-12-22 02:54:23 +01:00
CSS: rewrite selector parser frm scratch for more modularity
This commit is contained in:
parent
78dda67321
commit
0109cc7c7d
59
css.jsf
59
css.jsf
@ -10,7 +10,7 @@
|
|||||||
=Keyword bold
|
=Keyword bold
|
||||||
=Bad bold red
|
=Bad bold red
|
||||||
|
|
||||||
=Class cyan
|
=Class yellow
|
||||||
=Id red
|
=Id red
|
||||||
=Tag magenta
|
=Tag magenta
|
||||||
=HTML
|
=HTML
|
||||||
@ -31,9 +31,9 @@
|
|||||||
* reset
|
* reset
|
||||||
"<" maybe_done recolor=-1
|
"<" maybe_done recolor=-1
|
||||||
"/" slash
|
"/" slash
|
||||||
"#" id_block recolor=-1
|
# prevent duplicate code
|
||||||
"." class_block recolor=-1
|
"#.a-zA-Z" selector noeat
|
||||||
"a-zA-Z" tag_block recolor=-1
|
"@" command recolor=-1
|
||||||
|
|
||||||
:maybe_done TagEdge
|
:maybe_done TagEdge
|
||||||
* reset_html noeat
|
* reset_html noeat
|
||||||
@ -63,31 +63,44 @@
|
|||||||
"/" reset
|
"/" reset
|
||||||
"*" maybe_end_comment
|
"*" maybe_end_comment
|
||||||
|
|
||||||
|
:command Idle
|
||||||
|
* command
|
||||||
|
";" reset
|
||||||
|
"{" command_block
|
||||||
|
|
||||||
|
:command_block Idle
|
||||||
|
* command_block
|
||||||
|
"}" reset
|
||||||
|
|
||||||
# CSS selectors
|
# CSS selectors
|
||||||
:id_block Id
|
:selector Idle
|
||||||
* id_block
|
* selector
|
||||||
" " id_block_reset
|
"#" id_sel recolor=-1
|
||||||
|
"." class_sel recolor=-1
|
||||||
|
"a-zA-Z" tag_sel recolor=-1
|
||||||
|
":" pseudo_class_sel recolor=-1
|
||||||
"{" style_block recolor=-1
|
"{" style_block recolor=-1
|
||||||
|
|
||||||
:id_block_reset Idle
|
:id_sel Id
|
||||||
* id_block
|
* selector noeat
|
||||||
"a-zA-Z" tag_block recolor=-1
|
"a-zA-Z0-9_-" id_sel
|
||||||
"." class_block recolor=-1
|
|
||||||
"#" id_block recolor=-1
|
|
||||||
"{" style_block recolor=-1
|
|
||||||
|
|
||||||
:class_block Class
|
:class_sel Class
|
||||||
* class_block
|
* selector noeat
|
||||||
" " tag_block
|
"a-zA-Z0-9_-" class_sel
|
||||||
"{" style_block recolor=-1
|
|
||||||
|
|
||||||
:tag_block Tag
|
:tag_sel Tag
|
||||||
* tag_block
|
* selector noeat
|
||||||
"{" style_block recolor=-1
|
"a-zA-Z0-9_-" tag_sel
|
||||||
"," tag_sep recolor=-1
|
"[" tag_sel_attr recolor=-1
|
||||||
|
|
||||||
:tag_sep Idle
|
:tag_sel_attr Idle
|
||||||
* tag_block recolor=-1
|
* tag_sel_attr
|
||||||
|
"]" selector
|
||||||
|
|
||||||
|
:pseudo_class_sel Idle
|
||||||
|
* selector noeat
|
||||||
|
"a-zA-Z0-9_-" pseudo_class_sel
|
||||||
|
|
||||||
# everything inside "{ ... }", containing many "key: value;" pairs
|
# everything inside "{ ... }", containing many "key: value;" pairs
|
||||||
:style_block Idle
|
:style_block Idle
|
||||||
|
Loading…
Reference in New Issue
Block a user