use of com.developmentontheedge.sql.model.BeMacroFunction in project be5 by DevelopmentOnTheEdge.
the class MacroExpander method expandMacros.
public void expandMacros(SimpleNode node) {
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
SimpleNode child = node.child(i);
expandMacros(child);
if ((child instanceof AstFunNode) && ((AstFunNode) child).getFunction() instanceof BeMacroFunction) {
transformMacroFunction((AstFunNode) child);
}
}
}
use of com.developmentontheedge.sql.model.BeMacroFunction in project be5 by DevelopmentOnTheEdge.
the class MacroExpander method transformMacroFunction.
private void transformMacroFunction(AstFunNode node) {
BeMacroFunction function = (BeMacroFunction) node.getFunction();
SimpleNode replacement = function.getReplacement(node);
expandMacros(replacement);
node.replaceWith(replacement);
}
Aggregations