js-ast-parser
Version:
把javascript代码字符串解析为AST对象
16 lines (15 loc) • 479 B
text/typescript
import { Block } from "../../Block";
import { NodeCode } from "../../constants";
import { AstNode } from "../AstNode";
import { Statement } from "./Statement";
export class SwitchCaseStatement extends Statement {
type = 'SwitchCaseStatement';
code = NodeCode.SwitchCaseStatement;
consequent: Block;
test: AstNode;
isDefault = false;
constructor(currentToken: any) {
super();
this.loc.start = currentToken.loc.start;
}
}