Class CelMacroExprFactory


  • public abstract class CelMacroExprFactory
    extends CelExprFactory
    Assists with the expansion of CelMacro in a manner which is consistent with the source position and expression ID generation code leveraged by both the parser and type-checker.
    • Method Detail

      • reportError

        @FormatMethod
        public final CelExpr reportError​(@FormatString
                                         java.lang.String format,
                                         java.lang.Object... args)
        Creates a CelIssue and reports it, returning a sentinel CelExpr that indicates an error.
      • reportError

        public final CelExpr reportError​(java.lang.String message)
        Creates a CelIssue and reports it, returning a sentinel CelExpr that indicates an error.
      • copy

        public final CelExpr copy​(CelExpr expr)
        Duplicates CelExpr with a brand new set of identifiers.
      • copyExprId

        protected abstract long copyExprId​(long id)
        Returns the next unique expression ID which is associated with the same metadata (i.e. source location, types, references, etc.) as `id`.
      • getSourceLocation

        protected abstract CelSourceLocation getSourceLocation​(long exprId)
        Retrieves the source location for the given CelExpr ID.
      • currentSourceLocationForMacro

        protected abstract CelSourceLocation currentSourceLocationForMacro()
        Returns the current (last known) source location. This should only be used for macros.