* Builds the statements for the generator function body.
()
| 103971 | * Builds the statements for the generator function body. |
| 103972 | */ |
| 103973 | function buildStatements() { |
| 103974 | if (operations) { |
| 103975 | for (var operationIndex = 0; operationIndex < operations.length; operationIndex++) { |
| 103976 | writeOperation(operationIndex); |
| 103977 | } |
| 103978 | flushFinalLabel(operations.length); |
| 103979 | } |
| 103980 | else { |
| 103981 | flushFinalLabel(0); |
| 103982 | } |
| 103983 | if (clauses) { |
| 103984 | var labelExpression = factory.createPropertyAccessExpression(state, "label"); |
| 103985 | var switchStatement = factory.createSwitchStatement(labelExpression, factory.createCaseBlock(clauses)); |
| 103986 | return [ts.startOnNewLine(switchStatement)]; |
| 103987 | } |
| 103988 | if (statements) { |
| 103989 | return statements; |
| 103990 | } |
| 103991 | return []; |
| 103992 | } |
| 103993 | /** |
| 103994 | * Flush the current label and advance to a new label. |
| 103995 | */ |
no test coverage detected
searching dependent graphs…