Unwrap a few lines in the XML parser.
This commit is contained in:
parent
cfc6749556
commit
cbdaeb21f4
|
@ -164,16 +164,10 @@ attributes_
|
||||||
|
|
||||||
attribute
|
attribute
|
||||||
# x:foo="bar"
|
# x:foo="bar"
|
||||||
= T_ATTR_NS T_ATTR attribute_follow
|
= T_ATTR_NS T_ATTR attribute_follow { on_attribute(val[1], val[0], val[2]) }
|
||||||
{
|
|
||||||
on_attribute(val[1], val[0], val[2])
|
|
||||||
}
|
|
||||||
|
|
||||||
# foo="bar"
|
# foo="bar"
|
||||||
| T_ATTR attribute_follow
|
| T_ATTR attribute_follow { on_attribute(val[0], nil, val[1]) }
|
||||||
{
|
|
||||||
on_attribute(val[0], nil, val[1])
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
attribute_follow
|
attribute_follow
|
||||||
|
@ -211,18 +205,12 @@ string_squote_follow
|
||||||
;
|
;
|
||||||
|
|
||||||
string_body
|
string_body
|
||||||
= T_STRING_BODY string_body_follow
|
= T_STRING_BODY string_body_follow { val[1] ? val[0] + val[1] : val[0] }
|
||||||
{
|
|
||||||
val[1] ? val[0] + val[1] : val[0]
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
string_body_follow
|
string_body_follow
|
||||||
= T_STRING_BODY string_body_follow
|
= T_STRING_BODY string_body_follow { val[1] ? val[0] + val[1] : val[0] }
|
||||||
{
|
| _ { nil }
|
||||||
val[1] ? val[0] + val[1] : val[0]
|
|
||||||
}
|
|
||||||
| _ { nil }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
%inner
|
%inner
|
||||||
|
|
Loading…
Reference in New Issue