Module: languages/branchMatcher
Functions
branchMatcher
▸ branchMatcher(statementType, optionalBranchTypes): NodeMatcher
Constructs a branch matcher for constructs that have a primary branch
followed by zero or more optional branches, such as if statements or try
statements
Parameters
| Name | Type | Description |
|---|---|---|
statementType | string | The top-level statement type for this construct, eg "if_statement" or "try_statement" |
optionalBranchTypes | string[] | The optional branch type names that can be children of the top-level statement, eg "else_clause" or "except_clause" |
Returns
A node matcher capabale of matching this type of branch
Defined in
languages/branchMatcher.ts:20