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

    compiler.KipperTargetCodeGenerator

    Code generator specifying how a Kipper parse tree should be translated into a specific language.

    Since

    0.10.0

    Table of contents

    Constructors

    • constructor

    Properties

    • additiveExpression
    • arrayPrimaryExpression
    • assignmentExpression
    • bitwiseAndExpression
    • bitwiseOrExpression
    • bitwiseShiftExpression
    • bitwiseXorExpression
    • boolPrimaryExpression
    • castExpression
    • classConstructorDeclaration
    • classDeclaration
    • classMethodDeclaration
    • classPropertyDeclaration
    • compoundStatement
    • conditionalExpression
    • convertExpression
    • doWhileLoopIterationStatement
    • equalityExpression
    • expressionStatement
    • fStringPrimaryExpression
    • forLoopIterationStatement
    • forceCastExpression
    • functionCallExpression
    • functionDeclaration
    • genericTypeSpecifierExpression
    • identifierPrimaryExpression
    • identifierTypeSpecifierExpression
    • ifStatement
    • incrementOrDecrementPostfixExpression
    • incrementOrDecrementUnaryExpression
    • instanceOfExpression
    • interfaceDeclaration
    • interfaceMethodDeclaration
    • interfacePropertyDeclaration
    • jumpStatement
    • lambdaPrimaryExpression
    • logicalAndExpression
    • logicalOrExpression
    • matchesExpression
    • memberAccessExpression
    • multiplicativeExpression
    • newInstantiationExpression
    • nullableTypeSpecifierExpression
    • numberPrimaryExpression
    • objectPrimaryExpression
    • objectProperty
    • operatorModifiedUnaryExpression
    • parameterDeclaration
    • relationalExpression
    • returnStatement
    • setUp
    • stringPrimaryExpression
    • switchStatement
    • tangledPrimaryExpression
    • tryCastExpression
    • typeofExpression
    • typeofTypeSpecifierExpression
    • variableDeclaration
    • voidOrNullOrUndefinedPrimaryExpression
    • whileLoopIterationStatement
    • wrapUp

    Constructors

    constructor

    • new KipperTargetCodeGenerator()

    Properties

    additiveExpression

    • Abstract additiveExpression: TargetASTNodeCodeGenerator<AdditiveExpression, TranslatedExpression>

    Translates a AdditiveExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:407


    arrayPrimaryExpression

    • Abstract arrayPrimaryExpression: TargetASTNodeCodeGenerator<ArrayPrimaryExpression, TranslatedExpression>

    Translates a ArrayPrimaryExpression into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:264


    assignmentExpression

    • Abstract assignmentExpression: TargetASTNodeCodeGenerator<AssignmentExpression, TranslatedExpression>

    Translates a AssignmentExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:457


    bitwiseAndExpression

    • Abstract bitwiseAndExpression: TargetASTNodeCodeGenerator<BitwiseAndExpression, TranslatedExpression>

    Translates a BitwiseAndExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:422


    bitwiseOrExpression

    • Abstract bitwiseOrExpression: TargetASTNodeCodeGenerator<BitwiseOrExpression, TranslatedExpression>

    Translates a BitwiseOrExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:427


    bitwiseShiftExpression

    • Abstract bitwiseShiftExpression: TargetASTNodeCodeGenerator<BitwiseShiftExpression, TranslatedExpression>

    Translates a BitwiseShiftExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:437


    bitwiseXorExpression

    • Abstract bitwiseXorExpression: TargetASTNodeCodeGenerator<BitwiseXorExpression, TranslatedExpression>

    Translates a BitwiseXorExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:432


    boolPrimaryExpression

    • Abstract boolPrimaryExpression: TargetASTNodeCodeGenerator<BoolPrimaryExpression, TranslatedExpression>

    Translates a BoolPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:303


    castExpression

    • Abstract castExpression: TargetASTNodeCodeGenerator<CastExpression, TranslatedExpression>

    Translates a CastExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:382


    classConstructorDeclaration

    • Abstract classConstructorDeclaration: TargetASTNodeCodeGenerator<ClassConstructorDeclaration, TranslatedCodeLine[]>

    Translates a ClassConstructorDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:221


    classDeclaration

    • Abstract classDeclaration: TargetASTNodeCodeGenerator<ClassDeclaration, TranslatedCodeLine[]>

    Translates a VariableDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:205


    classMethodDeclaration

    • Abstract classMethodDeclaration: TargetASTNodeCodeGenerator<ClassMethodDeclaration, TranslatedCodeLine[]>

    Translated a ClassMethodDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:216


    classPropertyDeclaration

    • Abstract classPropertyDeclaration: TargetASTNodeCodeGenerator<ClassPropertyDeclaration, TranslatedCodeLine>

    Translated a ClassPropertyDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:211


    compoundStatement

    • Abstract compoundStatement: TargetASTNodeCodeGenerator<CompoundStatement, TranslatedCodeLine[]>

    Translates a CompoundStatement into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:131


    conditionalExpression

    • Abstract conditionalExpression: TargetASTNodeCodeGenerator<ConditionalExpression, TranslatedExpression>

    Translates a ConditionalExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:452


    convertExpression

    • Abstract convertExpression: TargetASTNodeCodeGenerator<ConvertExpression, TranslatedExpression>

    Translates a ConvertExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:397


    doWhileLoopIterationStatement

    • Abstract doWhileLoopIterationStatement: TargetASTNodeCodeGenerator<DoWhileLoopIterationStatement, TranslatedCodeLine[]>

    Translates a ForLoopIterationStatement into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:152


    equalityExpression

    • Abstract equalityExpression: TargetASTNodeCodeGenerator<EqualityExpression, TranslatedExpression>

    Translates a EqualityExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:417


    expressionStatement

    • Abstract expressionStatement: TargetASTNodeCodeGenerator<ExpressionStatement, TranslatedCodeLine[]>

    Translates a ExpressionStatement into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:146


    fStringPrimaryExpression

    • Abstract fStringPrimaryExpression: TargetASTNodeCodeGenerator<FStringPrimaryExpression, TranslatedExpression>

    Translates a FStringPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:298


    forLoopIterationStatement

    • Abstract forLoopIterationStatement: TargetASTNodeCodeGenerator<ForLoopIterationStatement, TranslatedCodeLine[]>

    Translates a ForLoopIterationStatement into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:170


    forceCastExpression

    • Abstract forceCastExpression: TargetASTNodeCodeGenerator<ForceCastExpression, TranslatedExpression>

    Translates a ForceCastExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:392


    functionCallExpression

    • Abstract functionCallExpression: TargetASTNodeCodeGenerator<FunctionCallExpression, TranslatedExpression>

    Translates a FunctionCallExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:361


    functionDeclaration

    • Abstract functionDeclaration: TargetASTNodeCodeGenerator<FunctionDeclaration, TranslatedCodeLine[]>

    Translates a FunctionDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:195


    genericTypeSpecifierExpression

    • Abstract genericTypeSpecifierExpression: TargetASTNodeCodeGenerator<GenericTypeSpecifierExpression, TranslatedExpression>

    Translates a GenericTypeSpecifierExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:316


    identifierPrimaryExpression

    • Abstract identifierPrimaryExpression: TargetASTNodeCodeGenerator<IdentifierPrimaryExpression, TranslatedExpression>

    Translates a IdentifierPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:279


    identifierTypeSpecifierExpression

    • Abstract identifierTypeSpecifierExpression: TargetASTNodeCodeGenerator<IdentifierTypeSpecifierExpression, TranslatedExpression>

    Translates a IdentifierTypeSpecifierExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:308


    ifStatement

    • Abstract ifStatement: TargetASTNodeCodeGenerator<IfStatement, TranslatedCodeLine[]>

    Translates a IfStatement into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:136


    incrementOrDecrementPostfixExpression

    • Abstract incrementOrDecrementPostfixExpression: TargetASTNodeCodeGenerator<IncrementOrDecrementPostfixExpression, TranslatedExpression>

    Translates a incrementOrDecrementPostfixExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:353


    incrementOrDecrementUnaryExpression

    • Abstract incrementOrDecrementUnaryExpression: TargetASTNodeCodeGenerator<IncrementOrDecrementUnaryExpression, TranslatedExpression>

    Translates a IncrementOrDecrementUnaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:366


    instanceOfExpression

    • Abstract instanceOfExpression: TargetASTNodeCodeGenerator<InstanceOfExpression, TranslatedExpression>

    Translates a InstanceOfExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:477


    interfaceDeclaration

    • Abstract interfaceDeclaration: TargetASTNodeCodeGenerator<InterfaceDeclaration, TranslatedCodeLine[]>

    Translates a VariableDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:237


    interfaceMethodDeclaration

    • Abstract interfaceMethodDeclaration: TargetASTNodeCodeGenerator<InterfaceMethodDeclaration, TranslatedCodeLine[]>

    Translates a InterfaceMethodDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:250


    interfacePropertyDeclaration

    • Abstract interfacePropertyDeclaration: TargetASTNodeCodeGenerator<InterfacePropertyDeclaration, TranslatedCodeLine[]>

    Translates a InterfacePropertyDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:242


    jumpStatement

    • Abstract jumpStatement: TargetASTNodeCodeGenerator<JumpStatement, TranslatedCodeLine[]>

    Translates a JumpStatement into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:179


    lambdaPrimaryExpression

    • Abstract lambdaPrimaryExpression: TargetASTNodeCodeGenerator<LambdaPrimaryExpression, TranslatedExpression>

    Translates a LambdaPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:462


    logicalAndExpression

    • Abstract logicalAndExpression: TargetASTNodeCodeGenerator<LogicalAndExpression, TranslatedExpression>

    Translates a LogicalAndExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:442


    logicalOrExpression

    • Abstract logicalOrExpression: TargetASTNodeCodeGenerator<LogicalOrExpression, TranslatedExpression>

    Translates a LogicalOrExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:447


    matchesExpression

    • Abstract matchesExpression: TargetASTNodeCodeGenerator<MatchesExpression, TranslatedExpression>

    Translates a MatchesExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:472


    memberAccessExpression

    • Abstract memberAccessExpression: TargetASTNodeCodeGenerator<MemberAccessExpression, TranslatedExpression>

    Translates a MemberAccessExpression into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:288


    multiplicativeExpression

    • Abstract multiplicativeExpression: TargetASTNodeCodeGenerator<MultiplicativeExpression, TranslatedExpression>

    Translates a MultiplicativeExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:402


    newInstantiationExpression

    • Abstract newInstantiationExpression: TargetASTNodeCodeGenerator<NewInstantiationExpression, TranslatedExpression>

    Translates a NewInstantiationExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:229


    nullableTypeSpecifierExpression

    • Abstract nullableTypeSpecifierExpression: TargetASTNodeCodeGenerator<NullableTypeSpecifierExpression, TranslatedExpression>

    Translates a NullableTypeSpecifierExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:332


    numberPrimaryExpression

    • Abstract numberPrimaryExpression: TargetASTNodeCodeGenerator<NumberPrimaryExpression, TranslatedExpression>

    Translates a NumberPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:258


    objectPrimaryExpression

    • Abstract objectPrimaryExpression: TargetASTNodeCodeGenerator<ObjectPrimaryExpression, TranslatedExpression>

    Translates a ObjectPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:269


    objectProperty

    • Abstract objectProperty: TargetASTNodeCodeGenerator<ObjectProperty, TranslatedExpression>

    Translates a ObjectProperty into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:274


    operatorModifiedUnaryExpression

    • Abstract operatorModifiedUnaryExpression: TargetASTNodeCodeGenerator<OperatorModifiedUnaryExpression, TranslatedExpression>

    Translates a OperatorModifiedUnaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:374


    parameterDeclaration

    • Abstract parameterDeclaration: TargetASTNodeCodeGenerator<ParameterDeclaration, TranslatedCodeLine[]>

    Translates a ParameterDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:190


    relationalExpression

    • Abstract relationalExpression: TargetASTNodeCodeGenerator<RelationalExpression, TranslatedExpression>

    Translates a RelationalExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:412


    returnStatement

    • Abstract returnStatement: TargetASTNodeCodeGenerator<ReturnStatement, TranslatedCodeLine[]>

    Translates a JumpStatement into a specific language.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:185


    setUp

    • Abstract setUp: TargetSetUpCodeGenerator

    Code generation function, which is called at the start of a translation and generates the dependencies for a file in the target language.

    This should be only used to set up a Kipper file in the target language and not as a replacement to KipperTargetBuiltInGenerator.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:116


    stringPrimaryExpression

    • Abstract stringPrimaryExpression: TargetASTNodeCodeGenerator<StringPrimaryExpression, TranslatedExpression>

    Translates a StringPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:293


    switchStatement

    • Abstract switchStatement: TargetASTNodeCodeGenerator<SwitchStatement, TranslatedCodeLine[]>

    Translates a SwitchStatement into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:141


    tangledPrimaryExpression

    • Abstract tangledPrimaryExpression: TargetASTNodeCodeGenerator<TangledPrimaryExpression, TranslatedExpression>

    Translates a TangledPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:340


    tryCastExpression

    • Abstract tryCastExpression: TargetASTNodeCodeGenerator<TryCastExpression, TranslatedExpression>

    Translates a TryCastExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:387


    typeofExpression

    • Abstract typeofExpression: TargetASTNodeCodeGenerator<TypeofExpression, TranslatedExpression>

    Translates a TypeofExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:467


    typeofTypeSpecifierExpression

    • Abstract typeofTypeSpecifierExpression: TargetASTNodeCodeGenerator<TypeofTypeSpecifierExpression, TranslatedExpression>

    Translates a TypeofTypeSpecifierExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:324


    variableDeclaration

    • Abstract variableDeclaration: TargetASTNodeCodeGenerator<VariableDeclaration, TranslatedCodeLine[]>

    Translates a VariableDeclaration into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:200


    voidOrNullOrUndefinedPrimaryExpression

    • Abstract voidOrNullOrUndefinedPrimaryExpression: TargetASTNodeCodeGenerator<VoidOrNullOrUndefinedPrimaryExpression, TranslatedExpression>

    Translates a VoidOrNullOrUndefinedPrimaryExpression into a specific language.

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:345


    whileLoopIterationStatement

    • Abstract whileLoopIterationStatement: TargetASTNodeCodeGenerator<WhileLoopIterationStatement, TranslatedCodeLine[]>

    Translates a ForLoopIterationStatement into a specific language.

    Since

    0.10.0s

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:161


    wrapUp

    • Abstract wrapUp: TargetWrapUpCodeGenerator

    Code generation function, which is called at the end of a translation and should wrap up a program in the target language.

    This should be only used to add additional items to finish a Kipper file in the target language and not as a replacement to KipperTargetBuiltInGenerator.

    Since

    0.10.0

    Defined in

    kipper/core/src/compiler/target-presets/translation/code-generator.ts:126

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