• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • next /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Tangled Expression

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Or Cast Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Lambda Expression

      • Matches Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Interfaces

    • Classes

    • Comments

    • Built-in Functions

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

      • next /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    • next /
    • Kipper API /
    • Module /
    • @kipper/core /
    • compiler

    Edit page

    Class: LambdaScope

    compiler.LambdaScope

    File containing the definition for a lambda-specific scope that is bound to a LambdaExpression and not the global namespace.

    Since

    0.11.0

    Hierarchy

    • FunctionScope

      ↳ LambdaScope

    Table of contents

    Constructors

    • constructor

    Properties

    • _arguments
    • _entries
    • ctx

    Accessors

    • arguments
    • entries
    • parent

    Methods

    • addArgument
    • addFunction
    • addType
    • addVariable
    • ensureNotUsed
    • getArgument
    • getEntry
    • getEntryRecursively

    Constructors

    constructor

    • new LambdaScope(ctx)

    Parameters

    Name Type
    ctx FunctionDeclaration | LambdaPrimaryExpression | ClassMethodDeclaration | ClassConstructorDeclaration

    Inherited from

    FunctionScope.constructor

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:24

    Properties

    _arguments

    • Protected Readonly _arguments: Map<string, ScopeParameterDeclaration>

    Inherited from

    FunctionScope._arguments

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:22


    _entries

    • Protected Readonly _entries: Map<string, ScopeDeclaration>

    Inherited from

    FunctionScope._entries

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/base/scope.ts:21


    ctx

    • ctx: FunctionDeclaration | LambdaPrimaryExpression | ClassMethodDeclaration | ClassConstructorDeclaration

    Inherited from

    FunctionScope.ctx

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:25

    Accessors

    arguments

    • get arguments(): Map<string, ScopeParameterDeclaration>

    All local arguments in this scope, which were defined by the parent function.

    These are available as usual to all children scopes.

    Since

    0.10.0

    Returns

    Map<string, ScopeParameterDeclaration>

    Inherited from

    FunctionScope.arguments

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:37


    entries

    • get entries(): Map<string, ScopeDeclaration>

    Returns the entries in this scope (symbol table entries).

    Since

    0.10.0

    Returns

    Map<string, ScopeDeclaration>

    Inherited from

    FunctionScope.entries

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/base/scope.ts:37


    parent

    • get parent(): LocalScope | ClassScope | GlobalScope

    The parent scope of this local scope. This will be either a LocalScope or a GlobalScope (unique to the KipperProgramContext class).

    Since

    0.10.0

    Returns

    LocalScope | ClassScope | GlobalScope

    Inherited from

    FunctionScope.parent

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/local-scope.ts:34

    Methods

    addArgument

    ▸ addArgument(declaration): ScopeParameterDeclaration

    Adds a new argument declaration to the list of arguments.

    Since

    0.10.0

    Parameters

    Name Type Description
    declaration ParameterDeclaration The argument declaration to add.

    Returns

    ScopeParameterDeclaration

    The generated scope declaration.

    Inherited from

    FunctionScope.addArgument

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:47


    addFunction

    ▸ addFunction(declaration): ScopeFunctionDeclaration

    Parameters

    Name Type
    declaration FunctionDeclaration

    Returns

    ScopeFunctionDeclaration

    Inherited from

    FunctionScope.addFunction

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/local-scope.ts:38


    addType

    ▸ addType(declaration): ScopeTypeDeclaration

    Parameters

    Name Type
    declaration TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics>

    Returns

    ScopeTypeDeclaration

    Inherited from

    FunctionScope.addType

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/local-scope.ts:53


    addVariable

    ▸ addVariable(declaration): ScopeVariableDeclaration

    Parameters

    Name Type
    declaration VariableDeclaration

    Returns

    ScopeVariableDeclaration

    Inherited from

    FunctionScope.addVariable

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/local-scope.ts:44


    ensureNotUsed

    ▸ Private ensureNotUsed(identifier, declaration): void

    Ensures that the given declaration is not already used in the current scope.

    Since

    0.12.0

    Parameters

    Name Type Description
    identifier string The identifier to check.
    declaration Declaration<DeclarationSemantics, DeclarationTypeSemantics> The declaration to check.

    Returns

    void

    Inherited from

    FunctionScope.ensureNotUsed

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/base/user-scope.ts:22


    getArgument

    ▸ getArgument(identifier): undefined | ScopeParameterDeclaration

    Searches for an argument with the passed identifier in the current scope.

    Since

    0.10.0

    Parameters

    Name Type Description
    identifier string The identifier of the argument.

    Returns

    undefined | ScopeParameterDeclaration

    Inherited from

    FunctionScope.getArgument

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:61


    getEntry

    ▸ getEntry(identifier): undefined | ScopeDeclaration

    Parameters

    Name Type
    identifier string

    Returns

    undefined | ScopeDeclaration

    Inherited from

    FunctionScope.getEntry

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/function-scope.ts:65


    getEntryRecursively

    ▸ getEntryRecursively(identifier): undefined | ScopeDeclaration

    Parameters

    Name Type
    identifier string

    Returns

    undefined | ScopeDeclaration

    Inherited from

    FunctionScope.getEntryRecursively

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/local-scope.ts:63

  • Developed at:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2026 Luna Klatzer, 2024-2025 Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.