static void ExpandInline(CatExpr fxns, DefinedFunction d, int nMaxDepth) { foreach (Function f in d.GetSubFxns()) { ExpandInline(fxns, f, nMaxDepth - 1); } }
public Function MakeFunction(AstDef def) { bool bLambda = def.mParams.Count > 0 || def.mLocals.Count > 0; if (bLambda) { CatLambdaConverter.Convert(def); } CatExpr fxns = NodesToFxns(def.mName, def.mTerms); Function ret = new DefinedFunction(def.mName, fxns); if (def.mpMetaData != null) { ret.SetMetaData(new CatMetaDataBlock(def.mpMetaData)); } if (bLambda && Config.gbOptimizeLambdas) { MetaCat.ApplyMacros(this, fxns); } AddFunction(ret); return(ret); }
public void Convert(DefinedFunction x) { // TODO: }