js-ast-parser
Version:
把javascript代码字符串解析为AST对象
13 lines (12 loc) • 420 B
text/typescript
import { NodeCode } from "../../constants";
import { Expression } from "./Expression";
export class ParticularLiteralExpression extends Expression {
type = 'ParticularLiteralExpression';
code = NodeCode.ParticularLiteralExpression;
raw: string;
constructor(currentToken) {
super();
Object.assign(this.loc, currentToken.loc);
this.raw = currentToken.value;
}
}