Closed NhatMinh0208 closed 9 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/cse-machine/utils.ts | 33 | 38 | 86.84% | ||
<!-- | Total: | 33 | 38 | 86.84% | --> |
Totals | |
---|---|
Change from base Build 7758878252: | 0.002% |
Covered Lines: | 10926 |
Relevant Lines: | 12732 |
Description:
The functions
hasContinueStatement
,hasReturnStatement
andhasBreakStatement
are used to detectcontinue
,return
andbreak
statements. These functions expect a block statement and recurse intoif
statements, meaning they fail onelse if
constructs since these constructs nest anif
statement inside anif
statement.This PR adds variants of the above functions (
hasContinueStatementIf
,hasReturnStatementIf
andhasBreakStatementIf
) so thatelse if
constructs can now be properly recursed into.Changes:
hasContinueStatementIf
,hasReturnStatementIf
andhasBreakStatementIf
hasContinueStatement
,hasReturnStatement
andhasBreakStatement
to work withelse if
constructs