Package org.pkl.core.ast.builder
Class SymbolTable.Scope
java.lang.Object
org.pkl.core.ast.builder.SymbolTable.Scope
- Direct Known Subclasses:
SymbolTable.AnnotationScope,SymbolTable.CustomThisScope,SymbolTable.EntryScope,SymbolTable.LambdaScope,SymbolTable.ModuleScope,SymbolTable.ObjectScope,SymbolTable.PropertyScope,SymbolTable.TypeParameterizableScope
- Enclosing class:
- SymbolTable
-
Method Summary
Modifier and TypeMethodDescriptioncom.oracle.truffle.api.frame.FrameDescriptorintReturns the lexical depth from the current scope to the top-most scope that is const.final SymbolTable.Scopefinal IdentifiergetName()final @Nullable Identifierfinal @Nullable SymbolTable.Scopefinal StringgetTypeParameter(String name) final booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanvoidintAdds the for generator variable to the frame descriptor.final SymbolTable.Scope
-
Method Details
-
getParent
-
getName
-
getNameOrNull
-
getQualifiedName
-
buildFrameDescriptor
public com.oracle.truffle.api.frame.FrameDescriptor buildFrameDescriptor() -
getTypeParameter
-
getLexicalScope
-
getConstDepth
public int getConstDepth()Returns the lexical depth from the current scope to the top-most scope that is const. Depth is 0-indexed, and -1 means that the scope is not a const scope.A const scope is a lexical scope on the right-hand side of a const property.
const foo = new { bar { baz // <-- depth == 1 } } -
pushForGeneratorVariableContext
Adds the for generator variable to the frame descriptor.Returns
-1if a for-generator variable already exists with this name. -
popForGeneratorVariable
public void popForGeneratorVariable() -
getForGeneratorVariables
-
skipLambdaScopes
-
isModuleScope
public final boolean isModuleScope() -
isClassScope
public final boolean isClassScope() -
isClassMemberScope
public final boolean isClassMemberScope() -
isLambdaScope
public final boolean isLambdaScope() -
isCustomThisScope
public final boolean isCustomThisScope() -
isLexicalScope
public final boolean isLexicalScope() -
getConstLevel
-