Unwrap a few lines in the XML parser.

This commit is contained in:
Yorick Peterse 2015-02-24 10:13:52 +01:00
parent cfc6749556
commit cbdaeb21f4
1 changed files with 5 additions and 17 deletions

View File

@ -164,16 +164,10 @@ attributes_
attribute
# x:foo="bar"
= T_ATTR_NS T_ATTR attribute_follow
{
on_attribute(val[1], val[0], val[2])
}
= T_ATTR_NS T_ATTR attribute_follow { on_attribute(val[1], val[0], val[2]) }
# foo="bar"
| T_ATTR attribute_follow
{
on_attribute(val[0], nil, val[1])
}
| T_ATTR attribute_follow { on_attribute(val[0], nil, val[1]) }
;
attribute_follow
@ -211,18 +205,12 @@ string_squote_follow
;
string_body
= T_STRING_BODY string_body_follow
{
val[1] ? val[0] + val[1] : val[0]
}
= T_STRING_BODY string_body_follow { val[1] ? val[0] + val[1] : val[0] }
;
string_body_follow
= T_STRING_BODY string_body_follow
{
val[1] ? val[0] + val[1] : val[0]
}
| _ { nil }
= T_STRING_BODY string_body_follow { val[1] ? val[0] + val[1] : val[0] }
| _ { nil }
;
%inner