Skip to content

Commit

Permalink
#50 ASTTransformers: align to Kolasu & solve issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiostalla committed Dec 6, 2023
1 parent 1887229 commit 482260d
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 150 deletions.
4 changes: 4 additions & 0 deletions src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {ParseTreeOrigin} from "./parsing";
*
* Note: this will eventually be integrated with Kolasu-style transformers.
* @param type the type of the source node to map to this node.
* @deprecated please use StarLasu AST transformers.
*/
export function ASTNodeFor<T extends ParseTree>(type: new (...args: any[]) => T) {
return function (target: new () => Node): void {
Expand All @@ -25,6 +26,9 @@ export function ASTNodeFor<T extends ParseTree>(type: new (...args: any[]) => T)
// toAST //
//-------//

/**
* @deprecated please use StarLasu AST transformers.
*/
export function toAST(tree?: ParseTree | null, parent?: Node): Node | undefined {
if (tree == null)
tree = undefined;
Expand Down
Loading

0 comments on commit 482260d

Please sign in to comment.