js-ast-parser
Version:
把javascript代码字符串解析为AST对象
14 lines (13 loc) • 409 B
text/typescript
import { NodeCode } from "../../constants";
import { Expression } from "./Expression";
export class RegExpressioin extends Expression {
pattern: string;
type = 'RegExpressioin';
code = NodeCode.RegExpression;
flag: string;
constructor(currentToken: any) {
super();
this.loc.start = currentToken.loc.start;
// this.pattern = currentToken.value;
}
}