From cbdaeb21f472c186b8c1214a275c942e284ee38c Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 24 Feb 2015 10:13:52 +0100 Subject: [PATCH] Unwrap a few lines in the XML parser. --- lib/oga/xml/parser.rll | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/lib/oga/xml/parser.rll b/lib/oga/xml/parser.rll index 28f65a1..d0b77da 100644 --- a/lib/oga/xml/parser.rll +++ b/lib/oga/xml/parser.rll @@ -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