Class SanitizedInExpressionParamOrError
java.lang.Object
org.ek9lang.compiler.support.SanitizedInExpressionParamOrError
- All Implemented Interfaces:
BiConsumer<EK9Parser.ExpressionParamContext, ErrorListener.SemanticClassification>
public final class SanitizedInExpressionParamOrError
extends Object
implements BiConsumer<EK9Parser.ExpressionParamContext, ErrorListener.SemanticClassification>
Checks for inappropriate use of 'sanitized' in expression parameters.
This checker rejects 'sanitized' in captures and call sites, as the keyword
only belongs on function/method parameter definitions (entry points).
The "Rejection at the Source" philosophy means sanitization is a boundary concern specified at function/method parameter definitions, not at: - Captures (data already in trusted boundary) - Call sites (callee defines sanitization, not caller)
THE shared check for both - EXPLICIT_TYPE_SYMBOL_DEFINITION uses it for captures (E07941) and FULL_RESOLUTION for call sites (E07942). Consolidated 2026-09-25 (front-end audit DUP4) from a byte-identical copy in phase3 SanitizedAtCallSiteOrError; use this rather than testing SANITIZED() again.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EK9Parser.ExpressionParamContext ctx, ErrorListener.SemanticClassification errorClassification) Checks if the expressionParam has the SANITIZED keyword and emits the appropriate error.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
SanitizedInExpressionParamOrError
-
-
Method Details
-
accept
public void accept(EK9Parser.ExpressionParamContext ctx, ErrorListener.SemanticClassification errorClassification) Checks if the expressionParam has the SANITIZED keyword and emits the appropriate error.- Specified by:
acceptin interfaceBiConsumer<EK9Parser.ExpressionParamContext, ErrorListener.SemanticClassification>- Parameters:
ctx- The expression parameter context to checkerrorClassification- The specific error to emit (E07941 for captures, E07942 for call sites)
-