()
| 7430 | // 12.5 If statement |
| 7431 | |
| 7432 | function parseIfStatement() { |
| 7433 | var test, consequent, alternate, marker = markerCreate(); |
| 7434 | |
| 7435 | expectKeyword('if'); |
| 7436 | |
| 7437 | expect('('); |
| 7438 | |
| 7439 | test = parseExpression(); |
| 7440 | |
| 7441 | expect(')'); |
| 7442 | |
| 7443 | consequent = parseStatement(); |
| 7444 | |
| 7445 | if (matchKeyword('else')) { |
| 7446 | lex(); |
| 7447 | alternate = parseStatement(); |
| 7448 | } else { |
| 7449 | alternate = null; |
| 7450 | } |
| 7451 | |
| 7452 | return markerApply(marker, delegate.createIfStatement(test, consequent, alternate)); |
| 7453 | } |
| 7454 | |
| 7455 | // 12.6 Iteration Statements |
| 7456 |
no test coverage detected