• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

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

      • Type Consistency

      • Runtime Type Casting

      • Strict Compiler Inspection

      • Integrated Runtime Library

    • 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

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

    Edit page

    Class: ScopeTypeDeclaration

    compiler.ScopeTypeDeclaration

    Represents the definition of a type such as a class or interface in a scope.

    Since

    0.11.0

    Hierarchy

    • ScopeDeclaration

      ↳ ScopeTypeDeclaration

    Table of contents

    Constructors

    • constructor

    Properties

    • _builtInType
    • _declaration
    • _universeScope

    Accessors

    • builtInStructure
    • hasValue
    • identifier
    • isBuiltIn
    • isCallable
    • isDefined
    • node
    • programCtx
    • scope
    • semanticData
    • type
    • typeValue

    Methods

    • fromBuiltInType
    • fromTypeDeclaration

    Constructors

    constructor

    • Protected new ScopeTypeDeclaration(_declaration?, _builtInType?, _universeScope?)

    Parameters

    Name Type
    _declaration? TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics>
    _builtInType? BuiltInType
    _universeScope? UniverseScope

    Overrides

    ScopeDeclaration.constructor

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:16

    Properties

    _builtInType

    • Protected Optional Readonly _builtInType: BuiltInType

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:18


    _declaration

    • Protected Optional Readonly _declaration: TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics>

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:17


    _universeScope

    • Protected Optional Readonly _universeScope: UniverseScope

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:19

    Accessors

    builtInStructure

    • get builtInStructure(): undefined | BuiltInType

    Returns the built-in structure of this declaration, if this declaration is based on one.

    Since

    0.11.0

    Returns

    undefined | BuiltInType

    Overrides

    ScopeDeclaration.builtInStructure

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:55


    hasValue

    • get hasValue(): true

    Returns whether the declaration has a value.

    As this is a type, it will always be true;

    Since

    0.11.0

    Returns

    true

    Overrides

    ScopeDeclaration.hasValue

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:122


    identifier

    • get identifier(): string

    The identifier of this type.

    Returns

    string

    Overrides

    ScopeDeclaration.identifier

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:78


    isBuiltIn

    • get isBuiltIn(): boolean

    Returns whether this type declaration is a built-in type.

    Since

    0.11.0

    Returns

    boolean

    Overrides

    ScopeDeclaration.isBuiltIn

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:47


    isCallable

    • get isCallable(): false

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

    As this is a type, it will always be false.

    Since

    0.11.0

    Returns

    false

    Overrides

    ScopeDeclaration.isCallable

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:132


    isDefined

    • get isDefined(): true

    Returns whether the declaration is defined.

    As this is a type, it will always be true;

    Since

    0.11.0

    Returns

    true

    Overrides

    ScopeDeclaration.isDefined

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:105


    node

    • get node(): undefined | TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics>

    Returns the InterfaceDeclaration or AST node this scope type declaration bases on.

    Returns

    undefined | TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics>

    Overrides

    ScopeDeclaration.node

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:71


    programCtx

    • get programCtx(): undefined | KipperProgramContext

    Fetches the program context instance for this token.

    Returns

    undefined | KipperProgramContext

    Inherited from

    ScopeDeclaration.programCtx

    Defined in

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


    scope

    • get scope(): LocalScope | ClassScope | GlobalScope | UniverseScope

    Returns the scope associated with this ScopeDeclaration.

    Returns

    LocalScope | ClassScope | GlobalScope | UniverseScope

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:112


    semanticData

    • Private get semanticData(): undefined | TypeDeclarationSemantics

    The semantic data of this declaration.

    Throws

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

    Returns

    undefined | TypeDeclarationSemantics

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:64


    type

    • get type(): ProcessedType

    The type of this type. This is always "type".

    Since

    0.11.0

    Returns

    ProcessedType

    Overrides

    ScopeDeclaration.type

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:86


    typeValue

    • get typeValue(): ProcessedType | CustomType

    The value of this type, which is the type itself i.e. what value does this type represent.

    Throws

    If this is accessed, before the type for the declaration finished.

    Since

    0.11.0

    Returns

    ProcessedType | CustomType

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:95

    Methods

    fromBuiltInType

    ▸ Static fromBuiltInType(builtInType, universeScope): ScopeTypeDeclaration

    Creates a new scope type declaration from a built-in type.

    Since

    0.11.0

    Parameters

    Name Type Description
    builtInType BuiltInType The built-in type.
    universeScope UniverseScope The universe scope this type is associated with.

    Returns

    ScopeTypeDeclaration

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:39


    fromTypeDeclaration

    ▸ Static fromTypeDeclaration(node): ScopeTypeDeclaration

    Creates a new scope type declaration from a type declaration.

    Since

    0.11.0

    Parameters

    Name Type Description
    node TypeDeclaration<TypeDeclarationSemantics, TypeDeclarationTypeSemantics> The type declaration node.

    Returns

    ScopeTypeDeclaration

    Defined in

    kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts:29

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