You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new optional language target and translation classes for JavaScript, which should support all current and future Kipper features, like the default TypeScript target.
Exact behaviour / changes you want
Add new target JavaScriptTarget, which should use the following new classes to implement the generation of JavaScript (Should compile to ES7/ES2016) code:
JavaScriptTargetSemanticAnalyser
JavaScriptTargetBuiltInGenerator
JavaScriptTargetCodeGenerator
Implement semantic analysis specifically for the JavaScript target.
Make the existing TypeScriptTarget and its implementation classes inherit from the new JavaScriptTarget and its new classes, to allow the re-use of code and reduce the size of the source code. Since the syntax of both languages is already almost identical and the only difference being that TypeScript extends JavaScript with more advanced feature sets, it should not require a lot of work to implement this change.
The text was updated successfully, but these errors were encountered:
Luna-Klatzer
changed the title
[Feature] Implement new translation target JavaScript
[Feature] Implement new translation target for JavaScript
Jun 22, 2022
When this is implemented, the targets will likely be split into two separate packages:
@kipper/target-js
@kipper/target-ts
Per default though, JavaScript should be a direct dependency of @kipper/core, so that it always translates to native JavaScript and not TypeScript, unless explicitly configured so, as that requires additional transpiling and more dependencies that the user might not even need.
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Add a new optional language target and translation classes for JavaScript, which should support all current and future Kipper features, like the default TypeScript target.
Exact behaviour / changes you want
JavaScriptTarget
, which should use the following new classes to implement the generation of JavaScript (Should compile to ES7/ES2016) code:JavaScriptTargetSemanticAnalyser
JavaScriptTargetBuiltInGenerator
JavaScriptTargetCodeGenerator
TypeScriptTarget
and its implementation classes inherit from the newJavaScriptTarget
and its new classes, to allow the re-use of code and reduce the size of the source code. Since the syntax of both languages is already almost identical and the only difference being that TypeScript extends JavaScript with more advanced feature sets, it should not require a lot of work to implement this change.The text was updated successfully, but these errors were encountered: