• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • latest /
      • Kipper API /
      • Module /
      • @kipper/core /
      • index
    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 /
      • index
    • latest /
    • Kipper API /
    • Module /
    • @kipper/core /
    • index

    Edit page

    Class: KipperAntlrErrorListener<TSymbol>

    The Error Handler for the Kipper implementation of ANTLRErrorListener

    Type parameters

    Name
    TSymbol

    Implements

    • ANTLRErrorListener<TSymbol>

    Table of contents

    Constructors

    • constructor

    Properties

    • logger
    • parseStream

    Methods

    • getLineOfCode
    • getSourceCode
    • syntaxError

    Constructors

    constructor

    • new KipperAntlrErrorListener<TSymbol>(logger, parseStream)

    Type parameters

    Name
    TSymbol

    Parameters

    Name Type
    logger KipperLogger
    parseStream KipperFileStream

    Defined in

    kipper/core/src/antlr-error-listener.ts:23

    Properties

    logger

    • Readonly logger: KipperLogger

    Defined in

    kipper/core/src/antlr-error-listener.ts:19


    parseStream

    • Readonly parseStream: KipperFileStream

    Defined in

    kipper/core/src/antlr-error-listener.ts:21

    Methods

    getLineOfCode

    ▸ Protected getLineOfCode(line): string

    Gets a line of code from the original this.parseStream.

    Since

    0.4.0

    Parameters

    Name Type Description
    line number The line of code to fetch.

    Returns

    string

    Defined in

    kipper/core/src/antlr-error-listener.ts:51


    getSourceCode

    ▸ Protected getSourceCode(symbol): undefined | string

    Fetches the source code for the specific CommonToken symbol.

    This function returns undefined if CommonToken.inputStream is undefined.

    Since

    0.4.0

    Parameters

    Name Type Description
    symbol CommonToken The token/symbol to check for.

    Returns

    undefined | string

    Defined in

    kipper/core/src/antlr-error-listener.ts:36


    syntaxError

    ▸ syntaxError<T>(recognizer, offendingSymbol, line, charPositionInLine, msg, e): void

    Default handler for Antlr4 syntax errors.

    Type parameters

    Name
    T

    Parameters

    Name Type Description
    recognizer Recognizer<T, any> The recognizer which usually represents a KipperParser.
    offendingSymbol undefined | T The symbol/token that caused the error. In most cases, this is of type CommonToken.
    line number The line where the syntax error occurred.
    charPositionInLine number The column where the syntax error occurred.
    msg string The message generated by Antlr4.
    e undefined | RecognitionException The exception that was initialised. This may be undefined.

    Returns

    void

    Implementation of

    ANTLRErrorListener.syntaxError

    Defined in

    kipper/core/src/antlr-error-listener.ts:66

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