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

    compiler.KipperFileStream

    A UTF-16 file stream, which stores the content of a file/string in an CodePointCharStream.

    If name is not set during construction, it will default to "anonymous-script".

    Since

    0.0.3

    Table of contents

    Constructors

    • constructor

    Properties

    • _charStream
    • _filePath
    • _name

    Accessors

    • charStream
    • filePath
    • lines
    • name
    • stringContent

    Constructors

    constructor

    • new KipperFileStream(options)

    Constructor for the KipperFileStream class.

    Parameters

    Name Type Description
    options Object -
    options.charStream? CodePointCharStream The CodePointCharStream, which will be, if not set, auto-generated by the stringContent.
    options.filePath? string The path to the file. If this is undefined, then it will default to the value in name.
    options.name? string The relative or absolute path to the file
    options.stringContent? string The content of the stream. If options.charStream is set, this will be ignored, and the options.charStream.toString will be used instead.

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:27

    Properties

    _charStream

    • Private Readonly _charStream: CodePointCharStream

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:16


    _filePath

    • Private Readonly _filePath: string

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:14


    _name

    • Private Readonly _name: string

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:12

    Accessors

    charStream

    • get charStream(): CodePointCharStream

    Returns the Antlr4 CodePointCharStream for the initialised stringContent.

    This is a copy of the stream, so modifying it will not modify the original stream.

    Returns

    CodePointCharStream

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:47


    filePath

    • get filePath(): string

    Returns the file path of the file.

    If filePath wasn't set during construction, then this defaults to name.

    Returns

    string

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:76


    lines

    • get lines(): string[]

    Returns the lines of code inside the charStream.

    The returned lines have the line ending stripped away!

    Since

    0.4.0

    Returns

    string[]

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:64


    name

    • get name(): string

    Returns the identifier of the file.

    Returns

    string

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:83


    stringContent

    • get stringContent(): string

    Returns the string content of the file.

    Returns

    string

    Defined in

    kipper/core/src/compiler/lexer-parser/file-stream.ts:54

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