Interface LexicalContextNode
- All Known Subinterfaces:
BreakableNode,LexicalContextScope
- All Known Implementing Classes:
Block,ClassNode,ForNode,FunctionNode,LabelNode,LiteralNode.ArrayLiteralNode,LoopNode,SwitchNode,WhileNode,WithNode
public interface LexicalContextNode
Interface for nodes that can be part of the lexical context.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaccept(LexicalContext lc, NodeVisitor<? extends LexicalContext> visitor) Accept function for the node given a lexical context.<R> Raccept(LexicalContext lc, TranslatorNodeVisitor<? extends LexicalContext, R> visitor) default Nodeaccept(NodeVisitor<? extends LexicalContext> visitor) Helper method for accept for items of this lexical context, delegates to the subclass accept and makes sure that the node is on the context before accepting and gets popped after accepting (and that the stack is consistent in that the node has been replaced with the possible new node resulting in visitation)default <R> Raccept(TranslatorNodeVisitor<? extends LexicalContext, R> visitor)
-
Method Details
-
accept
Accept function for the node given a lexical context. It must be prepared to replace itself if present in the lexical context- Parameters:
lc- lexical contextvisitor- node visitor- Returns:
- new node or same node depending on state change
-
accept
-
accept
Helper method for accept for items of this lexical context, delegates to the subclass accept and makes sure that the node is on the context before accepting and gets popped after accepting (and that the stack is consistent in that the node has been replaced with the possible new node resulting in visitation) -
accept
-