Class: JavaScriptTargetCodeGenerator
The JavaScript target-specific code generator for translating Kipper code into JavaScript.
Since
0.10.0
Hierarchy
unknown
↳
JavaScriptTargetCodeGenerator
Table of contents
Constructors
Methods
- 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
- translateOperatorExpressionWithOperands
- tryCastExpression
- typeofExpression
- typeofTypeSpecifierExpression
- variableDeclaration
- voidOrNullOrUndefinedPrimaryExpression
- whileLoopIterationStatement
- wrapUp
Constructors
constructor
• new JavaScriptTargetCodeGenerator()
Inherited from
KipperTargetCodeGenerator.constructor
Methods
additiveExpression
▸ additiveExpression(node
): Promise
<TranslatedExpression
>
Translates a AdditiveExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
AdditiveExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:978
arrayPrimaryExpression
▸ arrayPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a ArrayPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ArrayPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:599
assignmentExpression
▸ assignmentExpression(node
): Promise
<TranslatedExpression
>
Translates a AssignmentExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
AssignmentExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1085
bitwiseAndExpression
▸ bitwiseAndExpression(node
): Promise
<TranslatedExpression
>
Translates a BitwiseAndExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
BitwiseAndExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1038
bitwiseOrExpression
▸ bitwiseOrExpression(node
): Promise
<TranslatedExpression
>
Translates a BitwiseOrExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
BitwiseOrExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1031
bitwiseShiftExpression
▸ bitwiseShiftExpression(node
): Promise
<TranslatedExpression
>
Translates a BitwiseShiftExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
BitwiseShiftExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1052
bitwiseXorExpression
▸ bitwiseXorExpression(node
): Promise
<TranslatedExpression
>
Translates a BitwiseXorExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
BitwiseXorExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1045
boolPrimaryExpression
▸ boolPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a BoolPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
BoolPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:777
castExpression
▸ castExpression(node
): Promise
<TranslatedExpression
>
Translates a CastExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
CastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:896
classConstructorDeclaration
▸ classConstructorDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ClassConstructorDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ClassConstructorDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:566
classDeclaration
▸ classDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ClassDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ClassDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:463
classMethodDeclaration
▸ classMethodDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ClassMethodDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ClassMethodDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:545
classPropertyDeclaration
▸ classPropertyDeclaration(node
): Promise
<TranslatedCodeLine
>
Translates a ClassPropertyDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ClassPropertyDeclaration |
Returns
Promise
<TranslatedCodeLine
>
Defined in
kipper/target-js/src/code-generator.ts:535
compoundStatement
▸ compoundStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a CompoundStatement into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
CompoundStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:141
conditionalExpression
▸ conditionalExpression(node
): Promise
<TranslatedExpression
>
Translates a ConditionalExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ConditionalExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1073
convertExpression
▸ convertExpression(node
): Promise
<TranslatedExpression
>
Translates a ConvertExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
ConvertExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:937
doWhileLoopIterationStatement
▸ doWhileLoopIterationStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a DoWhileLoopIterationStatement into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
DoWhileLoopIterationStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:252
equalityExpression
▸ equalityExpression(node
): Promise
<TranslatedExpression
>
Translates a EqualityExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
EqualityExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1024
expressionStatement
▸ expressionStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a ExpressionStatement into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ExpressionStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:237
fStringPrimaryExpression
▸ fStringPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a FStringPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
FStringPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:761
forLoopIterationStatement
▸ forLoopIterationStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a ForLoopIterationStatement into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
ForLoopIterationStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:290
forceCastExpression
▸ forceCastExpression(node
): Promise
<TranslatedExpression
>
Translates a ForceCastExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
ForceCastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:921
functionCallExpression
▸ functionCallExpression(node
): Promise
<TranslatedExpression
>
Translates a FunctionCallExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
FunctionCallExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:815
functionDeclaration
▸ functionDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a FunctionDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
FunctionDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:392
genericTypeSpecifierExpression
▸ genericTypeSpecifierExpression(node
): Promise
<TranslatedExpression
>
Translates a GenericTypeSpecifierExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
GenericTypeSpecifierExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:725
identifierPrimaryExpression
▸ identifierPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a IdentifierPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
IdentifierPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:661
identifierTypeSpecifierExpression
▸ identifierTypeSpecifierExpression(node
): Promise
<TranslatedExpression
>
Translates a IdentifierTypeSpecifierExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
IdentifierTypeSpecifierExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:715
ifStatement
▸ ifStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a IfStatement into the JavaScript language.
Implementation notes:
- This algorithm is indirectly recursive, as else-if statements are handling like else statements with an immediate if statement in them.
- The formatting algorithm tries to start at the top and slowly go down each area of the abstract syntax tree. First the starting 'if' will be formatted, and afterwards the alternative branches are processed if they exists. If they do, it is also formatted like with a regular starting 'if', unless there is another nested if-statement in which case it will pass that job down to the child if-statement.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
IfStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:162
incrementOrDecrementPostfixExpression
▸ incrementOrDecrementPostfixExpression(node
): Promise
<TranslatedExpression
>
Translates a IncrementOrDecrementPostfixExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
IncrementOrDecrementPostfixExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:803
incrementOrDecrementUnaryExpression
▸ incrementOrDecrementUnaryExpression(node
): Promise
<TranslatedExpression
>
Translates a IncrementOrDecrementUnaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
IncrementOrDecrementUnaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:868
instanceOfExpression
▸ instanceOfExpression(node
): Promise
<TranslatedExpression
>
Translates a InstanceOfExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
InstanceOfExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1189
interfaceDeclaration
▸ interfaceDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfaceDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
InterfaceDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:441
interfaceMethodDeclaration
▸ interfaceMethodDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfaceMethodDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
InterfaceMethodDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:456
interfacePropertyDeclaration
▸ interfacePropertyDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfacePropertyDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
InterfacePropertyDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:449
jumpStatement
▸ jumpStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a JumpStatement into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
JumpStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:343
lambdaPrimaryExpression
▸ lambdaPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a LambdaPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
LambdaPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1116
logicalAndExpression
▸ logicalAndExpression(node
): Promise
<TranslatedExpression
>
Translates a LogicalAndExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
LogicalAndExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1059
logicalOrExpression
▸ logicalOrExpression(node
): Promise
<TranslatedExpression
>
Translates a LogicalOrExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
LogicalOrExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1066
matchesExpression
▸ matchesExpression(node
): Promise
<TranslatedExpression
>
Translates a MatchesExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
MatchesExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1170
memberAccessExpression
▸ memberAccessExpression(node
): Promise
<TranslatedExpression
>
Translates a IdentifierPrimaryExpression into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
MemberAccessExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:674
multiplicativeExpression
▸ multiplicativeExpression(node
): Promise
<TranslatedExpression
>
Translates a MultiplicativeExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
MultiplicativeExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:959
newInstantiationExpression
▸ newInstantiationExpression(node
): Promise
<TranslatedExpression
>
Translates a NewInstantiationExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
NewInstantiationExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:491
nullableTypeSpecifierExpression
▸ nullableTypeSpecifierExpression(node
): Promise
<TranslatedExpression
>
Translates a NullableTypeSpecifierExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
NullableTypeSpecifierExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:743
numberPrimaryExpression
▸ numberPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a NumberPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
NumberPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:588
objectPrimaryExpression
▸ objectPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a ObjectPrimaryExpression into the JavaScript language.
Since
0.11.0
Parameters
Name | Type |
---|---|
node |
ObjectPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:631
objectProperty
▸ objectProperty(node
): Promise
<TranslatedExpression
>
Translates a ObjectProperty into the JavaScript language.
Since
0.11.0
Parameters
Name | Type |
---|---|
node |
ObjectProperty |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:647
operatorModifiedUnaryExpression
▸ operatorModifiedUnaryExpression(node
): Promise
<TranslatedExpression
>
Translates a OperatorModifiedUnaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
OperatorModifiedUnaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:880
parameterDeclaration
▸ parameterDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ParameterDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
ParameterDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:384
relationalExpression
▸ relationalExpression(node
): Promise
<TranslatedExpression
>
Translates a RelationalExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
RelationalExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1017
returnStatement
▸ returnStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a ReturnStatement into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
ReturnStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:352
setUp
▸ setUp(programCtx
, requirements
): Promise
<TranslatedCodeLine
[]>
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
Parameters
Name | Type |
---|---|
programCtx |
KipperProgramContext |
requirements |
TranslatedCodeLine [] |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:107
stringPrimaryExpression
▸ stringPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a StringPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
StringPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:752
switchStatement
▸ switchStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a SwitchStatement into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
SwitchStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:230
tangledPrimaryExpression
▸ tangledPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a TangledPrimaryExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
TangledPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:784
translateOperatorExpressionWithOperands
▸ Private
translateOperatorExpressionWithOperands(node
): Promise
<TranslatedExpression
>
Translates any form of operator-based expression with two operands into the JavaScript language.
Since
0.10.0
Parameters
Name | Type | Description |
---|---|---|
node |
any |
The node to translate. |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:993
tryCastExpression
▸ tryCastExpression(node
): Promise
<TranslatedExpression
>
Translates a TryCastExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
TryCastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:905
typeofExpression
▸ typeofExpression(node
): Promise
<TranslatedExpression
>
Translates a TypeofExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
TypeofExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:1160
typeofTypeSpecifierExpression
▸ typeofTypeSpecifierExpression(node
): Promise
<TranslatedExpression
>
Translates a TypeofTypeSpecifierExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
TypeofTypeSpecifierExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:734
variableDeclaration
▸ variableDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a VariableDeclaration into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
VariableDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:406
voidOrNullOrUndefinedPrimaryExpression
▸ voidOrNullOrUndefinedPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a IncrementOrDecrementPostfixExpression into the JavaScript language.
Parameters
Name | Type |
---|---|
node |
VoidOrNullOrUndefinedPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-js/src/code-generator.ts:792
whileLoopIterationStatement
▸ whileLoopIterationStatement(node
): Promise
<TranslatedCodeLine
[]>
Translates a WhileLoopIterationStatement into the JavaScript language.
Since
0.10.0
Parameters
Name | Type |
---|---|
node |
WhileLoopIterationStatement |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:271
wrapUp
▸ wrapUp(programCtx
): Promise
<TranslatedCodeLine
[]>
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
Parameters
Name | Type |
---|---|
programCtx |
KipperProgramContext |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-js/src/code-generator.ts:134