-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Add AST post-processing (desugaring) stage #2141
Labels
Comments
Another good candidate for simple rewriting is string operations: const a = "a".charCodeAt(0); to const a = 0x61; and str.charAt(i) == 'e' to str.charCodeAt(i) == 0x65 rewrite: = new Array
= new Array(?<T>)();
= new Array(?<T>)(0); to : T[] = [];
: T[] = [];
: T[] = []; |
Interesting paper about AST rule rewriting with partial parsing: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This extra stage run immediately after AST creation and process following tasks:
Desugaring for top-level non-exported to host, non-mutable (const)FunctionExpression
toFunctionDeclaration
with preserving order.The text was updated successfully, but these errors were encountered: