We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
You can access parts of a parse tree using indexing, but you cannot assign subtrees using the same method:
module bug::IndexedFieldAssignment syntax S = A "$"; syntax A = "a" | "A"; import ParseTree; import IO; test bool testIndexedFieldAssignment() { S s = parse(#S, "a$"); value a = s[0]; assert "<a>" == "a"; s[0] = (A)`A`; return "<s>" == "A$"; }
The assertion succeeds but the test fails with an error:
Unsupported subscript of type int on type S Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UnsupportedSubscript|
For the sake of consistency and usefulness of this feature, I think indexed assignment should be supported.
The text was updated successfully, but these errors were encountered:
jurgenvinju
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
You can access parts of a parse tree using indexing, but you cannot assign subtrees using the same method:
The assertion succeeds but the test fails with an error:
For the sake of consistency and usefulness of this feature, I think indexed assignment should be supported.
The text was updated successfully, but these errors were encountered: