()
| 194 | |
| 195 | // async_stmt: 'async' (funcdef | with_stmt | for_stmt) |
| 196 | private _parseAsyncStatement(): StatementNode | undefined { |
| 197 | let asyncToken = this._getKeywordToken(KeywordType.Async); |
| 198 | |
| 199 | switch (this._peekKeywordType()) { |
| 200 | case KeywordType.Def: |
| 201 | return this._parseFunctionDef(asyncToken); |
| 202 | |
| 203 | case KeywordType.With: |
| 204 | return this._parseWithStatement(asyncToken); |
| 205 | |
| 206 | case KeywordType.For: |
| 207 | return this._parseForStatement(asyncToken); |
| 208 | } |
| 209 | |
| 210 | this._addError('Expected "def", "with" or "for" to follow "async".', |
| 211 | asyncToken); |
| 212 | |
| 213 | return undefined; |
| 214 | } |
| 215 | |
| 216 | // if_stmt: 'if' test_suite ('elif' test_suite)* ['else' suite] |
| 217 | // test_suite: test suite |
no test coverage detected