An S-Expression reader suitable for use with Lisp-like languages.
Esempio n. 1
0
 public void String()
 {
     Reader reader = new Reader();
     object actual = Reader.Read(new StringReader("\"Hello\""));
     Assert.AreEqual("Hello", actual);
 }
Esempio n. 2
0
 public void Double()
 {
     Reader reader = new Reader();
     object actual = Reader.Read(new StringReader("1.1"));
     Assert.AreEqual(1.1, actual);
 }
Esempio n. 3
0
 public void Integer()
 {
     Reader reader = new Reader();
     object actual = Reader.Read(new StringReader("1"));
     Assert.AreEqual(1, actual);
 }
Esempio n. 4
0
 public void Array()
 {
     Reader reader = new Reader();
     object actual = Reader.Read(new StringReader("[1 2 3]"));
     Assert.IsInstanceOfType(typeof(object[]), actual);
 }