-
Notifications
You must be signed in to change notification settings - Fork 23
/
try_catch_clause.ts
44 lines (37 loc) · 1.04 KB
/
try_catch_clause.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { ASTNode } from "../../ast_node";
import { StructuredDocumentation } from "../meta";
import { ParameterList } from "../meta/parameter_list";
import { Block } from "./block";
import { Statement } from "./statement";
export class TryCatchClause extends Statement {
/**
* Error string. Contains empty string if `Error` is not specified.
*/
errorName: string;
/**
* Optional parameters
*/
vParameters?: ParameterList;
/**
* Block of clause
*/
vBlock: Block;
constructor(
id: number,
src: string,
errorName: string,
block: Block,
parameters?: ParameterList,
documentation?: string | StructuredDocumentation,
raw?: any
) {
super(id, src, documentation, raw);
this.errorName = errorName;
this.vParameters = parameters;
this.vBlock = block;
this.acceptChildren();
}
get children(): readonly ASTNode[] {
return this.pickNodes(this.documentation, this.vParameters, this.vBlock);
}
}