java.lang.Object
com.google.auto.value.processor.escapevelocity.Macro

class Macro extends Object
A macro definition. Macros appear in templates using the syntax #macro (m $x $y) ... #end and each one produces an instance of this class. Evaluating a macro involves setting the parameters (here {$x $y)} and evaluating the macro body. Macro arguments are call-by-name, which means that we need to set each parameter variable to the node in the parse tree that corresponds to it, and arrange for that node to be evaluated when the variable is actually referenced.
  • Field Details

    • definitionLineNumber

      private final int definitionLineNumber
    • name

      private final String name
    • parameterNames

      private final com.google.common.collect.ImmutableList<String> parameterNames
    • body

      private final Node body
  • Constructor Details

  • Method Details