Skip to content

Instantly share code, notes, and snippets.

View SammyIsra's full-sized avatar

Sammy Israwi SammyIsra

View GitHub Profile
@SammyIsra
SammyIsra / types.ts
Last active July 2, 2019 20:04
Definition for ASTVisitor2. Not used anymore, only a code demo.
/**
* Visitor used for the new transformer.
* It does not use _context as the other Visitor, and is more based around returning the new nodes instead of adding them to _context
*/
export interface ASTVisitor2 {
/** The Program visitor will only have one usecase: it returns the new AST */
Program: {
enter: (node: SimpleAST) => TransformedAST;
};