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