Skip to content

Conversation

@adri09070
Copy link
Contributor

@adri09070 adri09070 commented Oct 7, 2022

Fixes #25

When an interpreter interpreted a method with a pragma node that has a primitive error variable (generally called ec) that is used in the body of the method, the interpreter would not recognize it.

To fix that, I changed the DASTPostOrderTreeVisitor so that it pushes the pragma node on the node stack when it creates the context. Then, it pushes the context. Then, when a primitive fails, the interpreter interprets the pragma node by defining the binding in the currentContext: primitiveErrorVariableName -> errorCode.

To get the error code, we modified DASTPrimitiveFailed so that it contains the error code when a primitive fails

@adri09070 adri09070 closed this Jun 16, 2023
@adri09070 adri09070 reopened this Jun 16, 2023
@StevenCostiou
Copy link
Contributor

There is one DAST test not passing apparently

@adri09070
Copy link
Contributor Author

Yes, it's ok, some failing tests are fixed by other PRs

@adri09070
Copy link
Contributor Author

#34 and #36

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 this pull request may close these issues.

Interpret does not recognize pragma arguments

2 participants