You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE: I changed ctx to ctx.parent for saving labels, I also used a walker in main and walker in goto, and now it works
I'm trying to make a parser that has GOTO as a function to go to a label, similar to MIPS Jump /Jump and link.
I am using a visitor.
1. label: foo
2. ...
3. ...
4. goto: foo
I would like to start with an infinite loop, then handle stacks of visited / stack of ignore-labels after that.
I tried doing this with a class variable saving the ctx (context) , that visits, but then ends with:
label hit
GOTO hit
label hit // from the call
How do I visit nodes that have already been visited multiple times?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
UPDATE: I changed ctx to ctx.parent for saving labels, I also used a walker in main and walker in goto, and now it works
I'm trying to make a parser that has GOTO as a function to go to a label, similar to MIPS Jump /Jump and link.
I am using a visitor.
I would like to start with an infinite loop, then handle stacks of visited / stack of ignore-labels after that.
I tried doing this with a class variable saving the ctx (context) , that visits, but then ends with:
How do I visit nodes that have already been visited multiple times?
Beta Was this translation helpful? Give feedback.
All reactions