Skip to content

Fixing #isTerminated #10

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixing #isTerminated #10

wants to merge 2 commits into from

Conversation

dupriezt
Copy link

@dupriezt dupriezt commented Aug 6, 2019

The current #isTerminated method does not seem to work.

Running the following in a playground raises a "#isRoot was sent to nil" exception because the execution has reached the root context and is asking whether its parent (nil) is root to decide whether the execution is terminated.

interpreter := DASTInterpreter new.
interpreter initializeWithProgram: (RBParser parseExpression: 'Point new').
[ interpreter isTerminated  ] whileFalse: [ interpreter stepInto ].

This pull request make #isTerminated simply check whether the current context is the root context. With it, the example above runs without signalling an exception.

adri09070 pushed a commit to adri09070/DebuggableASTInterpreter that referenced this pull request Sep 23, 2022
…d-because-the-AST-visitors-API-has-changed

Fixing tests because of changes in AST variable nodes, as `RBGlobalNode` doesn't exist anymore
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.

1 participant