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 ofCelMacroin 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 CelSourceLocationcurrentSourceLocationForMacro()Returns the current (last known) source location.protected abstract CelSourceLocationgetSourceLocation(long exprId)Retrieves the source location for the givenCelExprID.CelSourceLocationgetSourceLocation(CelExpr expr)Retrieves the source location for the givenCelExprID.abstract CelExprreportError(CelIssue error)CelExprreportError(java.lang.String message)CelExprreportError(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 givenCelExprID.
-
getSourceLocation
protected abstract CelSourceLocation getSourceLocation(long exprId)
Retrieves the source location for the givenCelExprID.
-
currentSourceLocationForMacro
protected abstract CelSourceLocation currentSourceLocationForMacro()
Returns the current (last known) source location. This should only be used for macros.
-
-