Class SymbolTable.Scope

    • Method Detail

      • getQualifiedName

        public final java.lang.String getQualifiedName()
      • buildFrameDescriptor

        public com.oracle.truffle.api.frame.FrameDescriptor buildFrameDescriptor()
      • 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

        public int pushForGeneratorVariableContext​(PklParser.ParameterContext ctx)
        Adds the for generator variable to the frame descriptor.

        Returns -1 if a for-generator variable already exists with this name.

      • popForGeneratorVariable

        public void popForGeneratorVariable()
      • getForGeneratorVariables

        public java.util.Deque<Identifier> getForGeneratorVariables()
      • 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

        public ConstLevel getConstLevel()