/// <summary> /// Converts this Node into an FScheme Expression. /// </summary> /// <returns></returns> public Expression Compile() { Dictionary <INode, string> symbols; Dictionary <INode, List <INode> > letEntries; if (!GraphAnalysis.LetOptimizations(this, out symbols, out letEntries)) { throw new Exception("Can't compile INode, graph is not a DAG."); } return(compile(symbols, letEntries, new HashSet <string>(), new HashSet <string>())); }
/// <summary> /// Converts this Node into an FScheme Expression. /// </summary> /// <returns></returns> public Expression Compile() { Dictionary <INode, string> symbols; // bindings Dictionary <INode, List <INode> > letEntries; // scope entry for bindings //Perform graph analysis to determine nodes which should be stored in let bindings. if (!GraphAnalysis.LetOptimizations(this, out symbols, out letEntries)) { throw new Exception("Can't compile INode, graph is not a DAG."); } return(compile(symbols, letEntries, new HashSet <string>(), new HashSet <string>())); }