(startLoc: Position, expression: N.Expression)
| 1906 | } |
| 1907 | |
| 1908 | wrapParenthesis(startLoc: Position, expression: N.Expression): N.Expression { |
| 1909 | if (!(this.optionFlags & OptionFlags.CreateParenthesizedExpressions)) { |
| 1910 | this.addExtra(expression, "parenthesized", true); |
| 1911 | this.addExtra(expression, "parenStart", startLoc.index); |
| 1912 | |
| 1913 | this.takeSurroundingComments( |
| 1914 | expression, |
| 1915 | startLoc.index, |
| 1916 | this.state.lastTokEndLoc!.index, |
| 1917 | ); |
| 1918 | |
| 1919 | return expression; |
| 1920 | } |
| 1921 | |
| 1922 | const parenExpression = |
| 1923 | this.startNodeAt<N.ParenthesizedExpression>(startLoc); |
| 1924 | parenExpression.expression = expression; |
| 1925 | return this.finishNode(parenExpression, "ParenthesizedExpression"); |
| 1926 | } |
| 1927 | |
| 1928 | // eslint-disable-next-line @typescript-eslint/no-unused-vars -- `params` is used in typescript plugin |
| 1929 | shouldParseArrow(params: N.Node[]): boolean { |
nothing calls this directly
no test coverage detected