• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • 0.11.0 /
      • 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

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Comments

    • Built-in Functions

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

    Edit page

    Class: ScopeVariableDeclaration

    compiler.ScopeVariableDeclaration

    Represents a variable scope entry that may be a child of the global scope or local scope.

    Since

    0.1.0

    Hierarchy

    • ScopeDeclaration

      ↳ ScopeVariableDeclaration

    Table of contents

    Constructors

    • constructor

    Properties

    • _node
    • valueWasUpdated

    Accessors

    • hasValue
    • identifier
    • isCallable
    • isDefined
    • node
    • programCtx
    • scope
    • semanticData
    • storageType
    • type
    • typeData

    Constructors

    constructor

    • new ScopeVariableDeclaration(node)

    Parameters

    Name Type
    node VariableDeclaration

    Overrides

    ScopeDeclaration.constructor

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:24

    Properties

    _node

    • Private Readonly _node: VariableDeclaration

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:16


    valueWasUpdated

    • valueWasUpdated: boolean = false

    Returns whether the variable has been updated after its initial declaration.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:22

    Accessors

    hasValue

    • get hasValue(): boolean

    Returns whether the variable declaration has a value.

    This is different from isDefined, since this also considers variable assignments after the initial declaration.

    Since

    0.10.0

    Returns

    boolean

    Overrides

    ScopeDeclaration.hasValue

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:96


    identifier

    • get identifier(): string

    The identifier of this variable.

    Returns

    string

    Overrides

    ScopeDeclaration.identifier

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:57


    isCallable

    • get isCallable(): boolean

    Returns whether the declaration has a callable value (function).

    Since

    0.10.0

    Returns

    boolean

    Overrides

    ScopeDeclaration.isCallable

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:104


    isDefined

    • get isDefined(): boolean

    Returns whether the variable declaration is defined and has a value set during declaration.

    Returns

    boolean

    Overrides

    ScopeDeclaration.isDefined

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:85


    node

    • get node(): VariableDeclaration

    Returns the AST node this scope declaration bases on.

    Returns

    VariableDeclaration

    Overrides

    ScopeDeclaration.node

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:50


    programCtx

    • get programCtx(): KipperProgramContext

    Fetches the program context instance for this token.

    Returns

    KipperProgramContext

    Inherited from

    ScopeDeclaration.programCtx

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-declaration.ts:25


    scope

    • get scope(): Scope

    Returns the scope associated with this ScopeDeclaration.

    Returns

    Scope

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:78


    semanticData

    • Private get semanticData(): VariableDeclarationSemantics

    The semantic data of this declaration.

    Throws

    UndefinedSemanticsError If this is accessed, before semantic analysis was performed.

    Returns

    VariableDeclarationSemantics

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:34


    storageType

    • get storageType(): KipperStorageType

    The storage type of this variable.

    Returns

    KipperStorageType

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:71


    type

    • get type(): CheckedType

    The value type of this variable.

    Returns

    CheckedType

    Overrides

    ScopeDeclaration.type

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:64


    typeData

    • Private get typeData(): VariableDeclarationTypeSemantics

    The type data of this declaration.

    Throws

    UndefinedSemanticsError If this is accessed, before type checking was performed.

    Returns

    VariableDeclarationTypeSemantics

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-variable-declaration.ts:43

  • 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.