Package dev.cel.parser
Class CelMacroExprFactory
- java.lang.Object
-
- dev.cel.common.ast.CelExprFactory
-
- dev.cel.parser.CelMacroExprFactory
-
public abstract class CelMacroExprFactory extends CelExprFactory
Assists with the expansion ofCelMacro
in a manner which is consistent with the source position and expression ID generation code leveraged by both the parser and type-checker.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CelSourceLocation
currentSourceLocationForMacro()
Returns the current (last known) source location.protected abstract CelSourceLocation
getSourceLocation(long exprId)
Retrieves the source location for the givenCelExpr
ID.CelSourceLocation
getSourceLocation(CelExpr expr)
Retrieves the source location for the givenCelExpr
ID.abstract CelExpr
reportError(CelIssue error)
CelExpr
reportError(java.lang.String message)
CelExpr
reportError(java.lang.String format, java.lang.Object... args)
-
Methods inherited from class dev.cel.common.ast.CelExprFactory
fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, fold, newBoolLiteral, newBytesLiteral, newBytesLiteral, newBytesLiteral, newBytesLiteral, newConstant, newDoubleLiteral, newGlobalCall, newGlobalCall, newIdentifier, newInstance, newIntLiteral, newList, newList, newMap, newMap, newMapEntry, newMessage, newMessage, newMessageField, newReceiverCall, newReceiverCall, newSelect, newStringLiteral, newUintLiteral, nextExprId
-
-
-
-
Method Detail
-
reportError
@FormatMethod public final CelExpr reportError(@FormatString java.lang.String format, java.lang.Object... args)
-
reportError
public final CelExpr reportError(java.lang.String message)
-
getSourceLocation
public final CelSourceLocation getSourceLocation(CelExpr expr)
Retrieves the source location for the givenCelExpr
ID.
-
getSourceLocation
protected abstract CelSourceLocation getSourceLocation(long exprId)
Retrieves the source location for the givenCelExpr
ID.
-
currentSourceLocationForMacro
protected abstract CelSourceLocation currentSourceLocationForMacro()
Returns the current (last known) source location. This should only be used for macros.
-
-