Class GuardSkipsWholeSwitchOrTry
java.lang.Object
org.ek9lang.compiler.support.GuardSkipsWholeSwitchOrTry
- All Implemented Interfaces:
Predicate<EK9Parser.PreFlowStatementContext>
public final class GuardSkipsWholeSwitchOrTry
extends Object
implements Predicate<EK9Parser.PreFlowStatementContext>
THE test of a guard (
PreFlowCanSkipBody) whose skipping skips a WHOLE switch or try - its
other cases, default, catch and finally too (D40) - so an analysis records the state there as a skip path and joins
it back after the construct. An if's guard is not one: only its own block is skipped and the alternatives
still run.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(EK9Parser.PreFlowStatementContext preFlow) True if the guard's skip path bypasses the whole construct.
-
Constructor Details
-
GuardSkipsWholeSwitchOrTry
public GuardSkipsWholeSwitchOrTry()
-
-
Method Details
-
test
True if the guard's skip path bypasses the whole construct.- Specified by:
testin interfacePredicate<EK9Parser.PreFlowStatementContext>- Parameters:
preFlow- the pre-flow statement context (may be null)- Returns:
- true if the guard's skip path bypasses the whole construct
-