added css attribute extension
This commit is contained in:
parent
be7a05d8ab
commit
48680adea3
|
@ -33,6 +33,7 @@ check-am:
|
|||
@echo "function-magic..."; ./dexter test/function-magic.dex test/function-magic.html | diff test/function-magic.json - && echo " success."
|
||||
@echo "malformed-expr..."; ./dexter test/malformed-expr.dex test/malformed-expr.html | diff test/malformed-expr.json - && echo " success."
|
||||
@echo "malformed-json..."; ./dexter test/malformed-json.dex test/malformed-json.html | diff test/malformed-json.json - && echo " success."
|
||||
@echo "css_attr..."; ./dexter -x test/css_attr.dex test/css_attr.html | diff test/css_attr.json - && echo " success."
|
||||
@echo "match..."; ./dexter -x test/match.dex test/match.xml | diff test/match.json - && echo " success."
|
||||
@echo "position..."; ./dexter test/position.dex test/position.html | diff test/position.json - && echo " success."
|
||||
@echo "remote..."; ./dexter test/remote.dex test/remote.html | diff test/remote.json - && echo " success."
|
||||
|
|
9
parser.y
9
parser.y
|
@ -409,10 +409,15 @@ NCName
|
|||
;
|
||||
|
||||
selectors_group
|
||||
: selector COMMA OptS selectors_group { $$ = astrcat4(".//", $1, "|", $4); }
|
||||
| selector { $$ = astrcat(".//", $1); }
|
||||
: attribute_extended_selector COMMA OptS selectors_group { $$ = astrcat4(".//", $1, "|", $4); }
|
||||
| attribute_extended_selector { $$ = astrcat(".//", $1); }
|
||||
;
|
||||
|
||||
attribute_extended_selector
|
||||
: selector
|
||||
| selector S AT NAME { $$ = astrcat3($1, "/@", $4); }
|
||||
;
|
||||
|
||||
selector
|
||||
: simple_selector_sequence combinator selector { $$ = astrcat3($1, $2, $3); }
|
||||
| simple_selector_sequence
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"foo": "body @foo"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<html>
|
||||
<body foo="bar"></body>
|
||||
</html>
|
|
@ -0,0 +1 @@
|
|||
{ "foo": "bar" }
|
Loading…
Reference in New Issue