Class ReturningParamUseOrError
java.lang.Object
org.ek9lang.compiler.phase3.ReturningParamUseOrError
- All Implemented Interfaces:
BiConsumer<org.antlr.v4.runtime.ParserRuleContext, EK9Parser.ReturningParamContext>
final class ReturningParamUseOrError
extends Object
implements BiConsumer<org.antlr.v4.runtime.ParserRuleContext, EK9Parser.ReturningParamContext>
THE check that a for, while, switch or try is used correctly in or out of an expression: as a statement it must
NOT have a returning section (it makes no sense), as an expression it MUST have one.
Called with the construct's context and its (possibly null) returningParam; one instance serves all four.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.antlr.v4.runtime.ParserRuleContext ctx, EK9Parser.ReturningParamContext returningParamCtx) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
ReturningParamUseOrError
ReturningParamUseOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
public void accept(org.antlr.v4.runtime.ParserRuleContext ctx, EK9Parser.ReturningParamContext returningParamCtx) - Specified by:
acceptin interfaceBiConsumer<org.antlr.v4.runtime.ParserRuleContext, EK9Parser.ReturningParamContext>
-