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
@eregon We do not have parent links between node in AST so I think this is more easily done after parsing but I don't want the parser to walk the tree after making it to look for this condition (it would slow startup to re-walk each tree). This means both Truffle and IR should detect this during the assembling their respective intermediate forms. This is a little duplication but can be done when naturally walking the tree to build our IRs.
@enebo Sounds reasonable, I actually implemented it in Truffle translator.
I was wondering whether the parser has the knowledge if it is within a block/method or not. I agree an extra traversal is not worth for this, it can be dealt with later easily.
@eregon At the time we are creating the node we have no up-pointing references to higher scope types (e.g. begin, def{sn}, module,class, etc...) so we need to walk from scopes down to look for the redo/next. We create staticScopes but they have no back references so that is not usable either.
kares
changed the title
redo and next should raise a SynaxError in methods
redo and next should raise a SyntaxError in methods
Jul 21, 2015
See dcb41d0 and the 2 previous commits.
Should it be done in the parser? (and is it reasonable?)
It seems MRI does it slightly later as
-c
or Ripper will not catch it for instance.The text was updated successfully, but these errors were encountered: