• 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: 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
    • castOrConvertExpression
    • classConstructorDeclaration
    • classDeclaration
    • classMethodDeclaration
    • classPropertyDeclaration
    • compoundStatement
    • conditionalExpression
    • doWhileLoopIterationStatement
    • equalityExpression
    • expressionStatement
    • fStringPrimaryExpression
    • forLoopIterationStatement
    • functionCallExpression
    • functionDeclaration
    • genericTypeSpecifierExpression
    • identifierPrimaryExpression
    • identifierTypeSpecifierExpression
    • ifStatement
    • incrementOrDecrementPostfixExpression
    • incrementOrDecrementUnaryExpression
    • instanceOfExpression
    • interfaceDeclaration
    • interfaceMethodDeclaration
    • interfacePropertyDeclaration
    • jumpStatement
    • lambdaPrimaryExpression
    • logicalAndExpression
    • logicalOrExpression
    • matchesExpression
    • memberAccessExpression
    • multiplicativeExpression
    • newInstantiationExpression
    • numberPrimaryExpression
    • objectPrimaryExpression
    • objectProperty
    • operatorModifiedUnaryExpression
    • parameterDeclaration
    • relationalExpression
    • returnStatement
    • setUp
    • stringPrimaryExpression
    • switchStatement
    • tangledPrimaryExpression
    • 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:380


    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:260


    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:430


    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:395


    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:400


    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:410


    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:405


    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:299


    castOrConvertExpression

    • Abstract castOrConvertExpression: TargetASTNodeCodeGenerator<CastOrConvertExpression, TranslatedExpression>

    Translates a CastOrConvertExpression into a specific language.

    Defined in

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


    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:217


    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:201


    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:212


    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:207


    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:127


    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:425


    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:148


    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:390


    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:142


    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:294


    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:166


    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:349


    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:191


    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:312


    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:275


    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:304


    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:132


    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:341


    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:354


    instanceOfExpression

    • Abstract instanceOfExpression: TargetASTNodeCodeGenerator<InstanceOfExpression, TranslatedExpression>

    Translates a {\@Link InstanceOfExpression} into a specific language.

    Defined in

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


    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:233


    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:246


    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:238


    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:175


    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:435


    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:415


    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:420


    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:445


    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:284


    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:375


    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:225


    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:254


    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:265


    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:270


    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:362


    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:186


    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:385


    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:181


    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:112


    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:289


    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:137


    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:328


    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:440


    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:320


    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:196


    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:333


    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:157


    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:122

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