Class: KipperJavaScriptTarget
The JavaScript translation target for the Kipper language.
Since
0.10.0
Hierarchy
unknown
↳
KipperJavaScriptTarget
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new KipperJavaScriptTarget(semanticAnalyser?
, codeGenerator?
, builtInGenerator?
)
Parameters
Name | Type |
---|---|
semanticAnalyser |
JavaScriptTargetSemanticAnalyser |
codeGenerator |
JavaScriptTargetCodeGenerator |
builtInGenerator |
JavaScriptTargetBuiltInGenerator |
Overrides
KipperCompileTarget.constructor
Defined in
kipper/target-js/src/target.ts:97
Properties
internalInterfacePrefix
▪ Static
Readonly
internalInterfacePrefix: "__intf"
The internal prefix for interfaces in the JavaScript target.
Since
0.12.0
Defined in
kipper/target-js/src/target.ts:28
internalObjectIdentifier
▪ Static
Readonly
internalObjectIdentifier: "__kipper"
The internal identifier for the global Kipper object storing runtime definitions.
Since
0.10.0
Defined in
kipper/target-js/src/target.ts:22
reservedIdentifiers
▪ Static
Readonly
reservedIdentifiers: string
[]
All reserved identifiers in JavaScript (and TypeScript for good measure) that may not be overwritten.
Since
0.10.0
Defined in
kipper/target-js/src/target.ts:34
Methods
getBuiltInIdentifier
▸ Static
getBuiltInIdentifier(signature
): string
Fetches the reserved identifier for the translated code.
This will also ensure that BuiltInVariable local variables are not registered onto the global object. Those will simply stay as local variables with the same identifier.
Since
0.10.0
Parameters
Name | Type | Description |
---|---|---|
signature |
any |
The identifier or signature object to translate to its JavaScript form. |
Returns
string
Defined in
kipper/target-js/src/target.ts:113
getRuntimeType
▸ Static
getRuntimeType(type
): string
Gets the builtin type for a Kipper type.
Since
0.12.0
Parameters
Name | Type |
---|---|
type |
ProcessedType |
Returns
string
Defined in
kipper/target-js/src/target.ts:126