()
| 2092 | } |
| 2093 | |
| 2094 | private ThrowStatement throwStatement() throws IOException { |
| 2095 | if (currentToken != Token.THROW) codeBug(); |
| 2096 | consumeToken(); |
| 2097 | int pos = ts.tokenBeg, lineno = lineNumber(), column = columnNumber(); |
| 2098 | if (peekTokenOrEOL() == Token.EOL) { |
| 2099 | // ECMAScript does not allow new lines before throw expression, |
| 2100 | // see bug 256617 |
| 2101 | reportError("msg.bad.throw.eol"); |
| 2102 | } |
| 2103 | AstNode expr = expr(false); |
| 2104 | ThrowStatement pn = new ThrowStatement(pos, expr); |
| 2105 | pn.setLineColumnNumber(lineno, column); |
| 2106 | return pn; |
| 2107 | } |
| 2108 | |
| 2109 | // If we match a NAME, consume the token and return the statement |
| 2110 | // with that label. If the name does not match an existing label, |
no test coverage detected