()
| 418 | |
| 419 | // while_stmt: 'while' test suite ['else' suite] |
| 420 | private _parseWhileStatement(): WhileNode { |
| 421 | let whileToken = this._getKeywordToken(KeywordType.While); |
| 422 | |
| 423 | let whileNode = new WhileNode(whileToken); |
| 424 | |
| 425 | whileNode.whileExpression = this._parseTestExpression(); |
| 426 | whileNode.whileSuite = this._parseLoopSuite(); |
| 427 | |
| 428 | if (this._consumeTokenIfKeyword(KeywordType.Else)) { |
| 429 | whileNode.elseSuite = this._parseSuite(); |
| 430 | } |
| 431 | whileNode.extend(whileNode.elseSuite || whileNode.whileSuite); |
| 432 | |
| 433 | return whileNode; |
| 434 | } |
| 435 | |
| 436 | // try_stmt: ('try' suite |
| 437 | // ((except_clause suite)+ |
no test coverage detected