-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML attributes parsed in reverse order #172
Conversation
foldLeft(Null: MetaData) { (x, xs) => | ||
xs.copy(x) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the manner that the recursive data structure is reversed.
@@ -134,7 +134,7 @@ abstract class FactoryAdapter extends DefaultHandler with factory.XMLLoader[Node | |||
if (scopeStack.isEmpty) TopScope | |||
else scopeStack.top | |||
|
|||
for (i <- 0 until attributes.getLength()) { | |||
for (i <- (0 until attributes.getLength).reverse) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where it is added to the SAX parser infrastructure
@@ -340,7 +340,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests { | |||
if (!aMap.wellformed(scope)) | |||
reportSyntaxError("double attribute") | |||
|
|||
(aMap, scope) | |||
(aMap.reverse, scope) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where it is added to the constructing parser infrastructure
2bec171
to
11f9d09
Compare
11f9d09
to
4e956fa
Compare
4e956fa
to
1e3573e
Compare
1e3573e
to
f0691d3
Compare
f0691d3
to
eaf1532
Compare
This would fix #65 and scala/bug#6341