Class ResolveVariableNode
- java.lang.Object
-
- com.oracle.truffle.api.nodes.Node
-
- org.pkl.core.ast.PklNode
-
- org.pkl.core.ast.ExpressionNode
-
- org.pkl.core.ast.expression.primary.ResolveVariableNode
-
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface,java.lang.Cloneable
public final class ResolveVariableNode extends ExpressionNode
Resolves a variable name, for example `foo` in `x = foo`.A variable name can refer to any of the following: - a (potentially `local`) property in the lexical scope - a method or lambda parameter in the lexical scope - a base module property - a property accessible through `this`
This node's task is to make a one-time decision between these alternatives for the call site it represents.
-
-
Field Summary
-
Fields inherited from class org.pkl.core.ast.PklNode
sourceSection
-
-
Constructor Summary
Constructors Constructor Description ResolveVariableNode(com.oracle.truffle.api.source.SourceSection sourceSection, Identifier variableName, boolean isBaseModule, boolean isCustomThisScope, ConstLevel constLevel, int constDepth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectexecuteGeneric(com.oracle.truffle.api.frame.VirtualFrame frame)-
Methods inherited from class org.pkl.core.ast.ExpressionNode
executeBoolean, executeFloat, executeInt
-
Methods inherited from class org.pkl.core.ast.PklNode
exceptionBuilder, getShortName, getSourceSection, toString
-
Methods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize
-
-
-
-
Constructor Detail
-
ResolveVariableNode
public ResolveVariableNode(com.oracle.truffle.api.source.SourceSection sourceSection, Identifier variableName, boolean isBaseModule, boolean isCustomThisScope, ConstLevel constLevel, int constDepth)
-
-
Method Detail
-
executeGeneric
public java.lang.Object executeGeneric(com.oracle.truffle.api.frame.VirtualFrame frame)
- Specified by:
executeGenericin classExpressionNode
-
-