Class SanitizedAtCallSiteOrError
java.lang.Object
org.ek9lang.compiler.phase3.SanitizedAtCallSiteOrError
- All Implemented Interfaces:
Consumer<EK9Parser.CallContext>
Checks for inappropriate use of 'sanitized' at function/method call sites.
The 'sanitized' keyword belongs in the function/method definition (on parameters),
not at call sites where arguments are passed.
The "Rejection at the Source" philosophy means: - The function/method author decides sanitization requirements in the definition - The compiler automatically injects sanitization at call sites - Callers don't specify sanitization - it's enforced automatically
Grammar rule being checked:
call
: identifierReference paramExpression
| parameterisedType
| LPAREN parameterisedType RPAREN
| primaryReference paramExpression
| dynamicFunctionDeclaration
| call paramExpression
;
expressionParam
: directive? SANITIZED? (identifier (ASSIGN | ASSIGN2 | COLON))? expression
;
-
Constructor Details
-
SanitizedAtCallSiteOrError
SanitizedAtCallSiteOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.CallContext>
-
accept
Check for sanitized at method/operator call sites. Method calls go through operationCall -> paramExpression.
-