public ExecutableLoader(Stream s, string[] args) { using (var r = new StreamReader(s)) { Cons cmdline = Cons.FromList(args); RuntimeExtensions.Eval("(apply load-port {0} {1})", r, cmdline); } }
public void FromArrayTest() { string[] actual1 = new string[] { "a", "b", "c", "d", "e", "f", "g" }; string[] actual2 = new string[] { "a", "b", "c", "d", "e", "f", "G" }; string[] actual3 = new string[] { "A", "b", "c", "d", "e", "f", "G" }; Assert.AreEqual <Cons>(_expected, Cons.FromList(actual1)); Assert.AreNotEqual <Cons>(_expected, Cons.FromList(actual2)); Assert.AreNotEqual <Cons>(_expected, Cons.FromList(actual3)); }
public override Expression Generate(object args, CodeBlock cb) { var to = Builtins.First(args); Type t = ExtractTypeInfo(to); if (t == null) { ClrSyntaxError("clr-type-of", "type not found", to, Cons.FromList(namespaces.Keys)); } return(Ast.Constant(t)); }
public void FromListTest() { List <string> actual1 = new List <string>() { "a", "b", "c", "d", "e", "f", "g" }; List <string> actual2 = new List <string>() { "a", "b", "c", "d", "e", "f", "G" }; List <string> actual3 = new List <string>() { "A", "b", "c", "d", "e", "f", "G" }; Assert.AreEqual <Cons>(_expected, Cons.FromList(actual1)); Assert.AreNotEqual <Cons>(_expected, Cons.FromList(actual2)); Assert.AreNotEqual <Cons>(_expected, Cons.FromList(actual3)); }
public override Expression Generate(object args, CodeBlock cb) { return(Ast.Constant(new IronSchemeConstant(Cons.FromList(namespaces.Keys), cb))); }