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