Support for parsing multiple CSS node tests.
This commit is contained in:
parent
b9a1f914bd
commit
773ff4ce45
|
@ -7,19 +7,28 @@ options no_result_var
|
||||||
|
|
||||||
rule
|
rule
|
||||||
css
|
css
|
||||||
: selectors { val[0] }
|
: expression { val[0] }
|
||||||
| /* none */ { nil }
|
| /* none */ { nil }
|
||||||
;
|
;
|
||||||
|
|
||||||
selectors
|
expression
|
||||||
: selectors selector { val[0] << val[1] }
|
: path
|
||||||
| selector { val[0] }
|
| node_test
|
||||||
;
|
;
|
||||||
|
|
||||||
selector
|
path_member
|
||||||
: node_test
|
: node_test
|
||||||
;
|
;
|
||||||
|
|
||||||
|
path_members
|
||||||
|
: path_member path_member { [val[0], val[1]] }
|
||||||
|
| path_member path_members { [val[0], *val[1]] }
|
||||||
|
;
|
||||||
|
|
||||||
|
path
|
||||||
|
: path_members { s(:path, *val[0]) }
|
||||||
|
;
|
||||||
|
|
||||||
node_test
|
node_test
|
||||||
: node_name { s(:test, *val[0]) }
|
: node_name { s(:test, *val[0]) }
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue