-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Is there a parser to generate reka AST? #21
Comments
Not possible currently and not planned for as I would imagine this would take significant effort with no clear benefits; and a typical JSX file has a lot more going on (ie: imports, functions, lifecycles etc) which may require us to come up with a way to support all of these in the AST. Do you have a specific use case in mind? The current idea in my head is to only support one way transpilation of Reka AST to React/Vue/Svelte code. This can be achieved by translating Reka's AST to something like Mitosis which itself already handles transpilation to React/Vue/Svelte code.
Reka's AST can be transformed to Reka code via the import * as t from '@rekajs/types';
import { Parser } from '@rekajs/parser';
const ast = t.program({...});
const code = Parser.stringify(ast); |
Thanks, a lot. |
@dinfer I actually like |
Is it possible to parse tsx/jsx code to reka AST and transform the AST to code?
The text was updated successfully, but these errors were encountered: