Skip to content

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