use of com.sri.ai.grinder.rewriter.core.SymbolSwitch in project aic-expresso by aic-sri-international.
the class ProceduralAttachments method registerProceduralAttachment.
/**
* Same as {@link #registerProceduralAttachment(Expression, List, TopRewriter, Context)},
* but for a symbol.
* @param symbol
* @param topRewriter
* @param context
* @return
*/
public static void registerProceduralAttachment(Expression symbol, TopRewriter topRewriter, Context context) {
TopRewriter proceduralAttachment = new SymbolSwitch(symbol.toString(), topRewriter);
context.updateInplaceGlobalObject(PROCEDURAL_ATTACHEMENTS_KEY, EMPTY_REWRITER_MAKER, combine(proceduralAttachment));
}
Aggregations