(boolean noIn)
| 1279 | } |
| 1280 | |
| 1281 | public VariableDeclaration variableDeclaration(boolean noIn) { |
| 1282 | Token identifier = consume(IDENTIFIER); |
| 1283 | |
| 1284 | if (!isValidIdentifier(identifier) || !isAssignableName(identifier.getText())) { |
| 1285 | throw new SyntaxError(identifier, "invalid identifier: " + identifier.getText()); |
| 1286 | } |
| 1287 | |
| 1288 | Expression initializer = null; |
| 1289 | |
| 1290 | if (la() == EQUALS) { |
| 1291 | consume(EQUALS); |
| 1292 | initializer = assignmentExpression(noIn); |
| 1293 | } |
| 1294 | |
| 1295 | return factory.variableDeclaration(identifier, identifier.getText(), initializer); |
| 1296 | } |
| 1297 | |
| 1298 | public EmptyStatement emptyStatement() { |
| 1299 | Token position = consume(SEMICOLON); |
no test coverage detected