Skip to content
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

XmlMemberGet toSource() implementation #483

Closed
kuzjka opened this issue Oct 10, 2018 · 0 comments · Fixed by #484
Closed

XmlMemberGet toSource() implementation #483

kuzjka opened this issue Oct 10, 2018 · 0 comments · Fixed by #484

Comments

@kuzjka
Copy link
Contributor

kuzjka commented Oct 10, 2018

Rhino has support for E4X extensions, such as attribute get operator a.@b. It is parsed correctly as XmlMemberGet node, but toSource() call causes IllegalArgumentException, thrown from AstNode.operatorToString(), which is given '.' or '..' token.

Following snippet resembles this issue (default CompilerEnvirons is used):

String script = "a.@b;";
Parser parser = new Parser(environment);
AstRoot root = parser.parse(script, null, 1);
/* up to 1.7.9 following will throw IllegalArgumentException */
root.toSource();

I have prepared a pull request, it will be opened right after this issue is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant