Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Implement new translation target for JavaScript #208

Closed
5 tasks done
Tracked by #279 ...
Luna-Klatzer opened this issue Jun 22, 2022 · 3 comments
Closed
5 tasks done
Tracked by #279 ...

[Feature] Implement new translation target for JavaScript #208

Luna-Klatzer opened this issue Jun 22, 2022 · 3 comments
Assignees
Labels
feature New feature or enhancement
Milestone

Comments

@Luna-Klatzer
Copy link
Member

Luna-Klatzer commented Jun 22, 2022

Is there an existing proposal for this?

  • I have searched the existing issues

This feature does not exist in the latest version

  • I am using 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

  • 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.
@Luna-Klatzer Luna-Klatzer added the feature New feature or enhancement label Jun 22, 2022
@Luna-Klatzer Luna-Klatzer added this to the Stable Kipper Release milestone Jun 22, 2022
@Luna-Klatzer Luna-Klatzer self-assigned this Jun 22, 2022
@Luna-Klatzer Luna-Klatzer changed the title [Feature] Implement new translation target JavaScript [Feature] Implement new translation target for JavaScript Jun 22, 2022
@Luna-Klatzer
Copy link
Member Author

Luna-Klatzer commented Jul 21, 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.

@Luna-Klatzer
Copy link
Member Author

This should be implemented with #86

@Luna-Klatzer
Copy link
Member Author

Implemented with #279 and released in v0.10.0-alpha.3

@Luna-Klatzer Luna-Klatzer added this to the v0.10.0 milestone Jan 28, 2023
@Luna-Klatzer Luna-Klatzer mentioned this issue Feb 19, 2023
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant