js-ast-parser
Version:
把javascript代码字符串解析为AST对象
14 lines (13 loc) • 509 B
text/typescript
import { CallExpression } from "./CallExpression";
import { IdentifierLiteralExpression } from "./IdentifierLiteralExpression";
import { NodeCode } from "../../constants";
import { Expression } from "./Expression";
export class NewExpressioin extends Expression {
type = 'NewExpressioin';
code = NodeCode.NewExpression;
callee: CallExpression | IdentifierLiteralExpression;
constructor(currentToken: any) {
super();
this.loc.start = currentToken.loc.start
}
}