• 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: KipperSemanticErrorHandler

    compiler.KipperSemanticErrorHandler

    Error handler which handles semantic errors for compilable AST nodes.

    Since

    0.8.0

    Hierarchy

    • KipperSemanticErrorHandler

      ↳ KipperSemanticsAsserter

      ↳ KipperTargetSemanticAnalyser

    Table of contents

    Constructors

    • constructor

    Properties

    • col
    • ctx
    • filePath
    • line
    • stream

    Methods

    • error
    • setTracebackData

    Constructors

    constructor

    • new KipperSemanticErrorHandler()

    Properties

    col

    • Protected col: undefined | number

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:16


    ctx

    • Protected ctx: undefined | CompilableASTNode<SemanticData, TypeData>

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:17


    filePath

    • Protected filePath: undefined | string

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:18


    line

    • Protected line: undefined | number

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:15


    stream

    • Protected stream: undefined | KipperFileStream

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:19

    Methods

    error

    ▸ Protected error(error): KipperError

    Updates the error and adds the proper traceback data, and returns it.

    This function also automatically logs the error.

    Parameters

    Name Type Description
    error KipperError The error to update.

    Returns

    KipperError

    The Kipper error.

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.ts:52


    setTracebackData

    ▸ setTracebackData(data): void

    Sets the traceback related metadata that will be used to create a traceback for an KipperError instance.

    In case that data.ctx is set and other fields are missing, these fields will be filled up using the data in the data.ctx AST node ctx instance.

    Since

    0.8.0

    Parameters

    Name Type Description
    data Object The traceback data that will be used to initialise an KipperError instance.
    data.col? number -
    data.ctx? CompilableASTNode<SemanticData, TypeData> -
    data.filePath? string -
    data.line? number -
    data.stream? KipperFileStream -

    Returns

    void

    Defined in

    kipper/core/src/compiler/semantics/analyser/err-handler/semantics-error-handler.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.