Example #1
0
        public void Comments10()
        {
            var src = @"{       
          |* /* //comment text " + "\n\r" + @" */ *|
          }
          ";

            var lxr = new LL(new StringSource(src));

            Assert.AreEqual(" /* //comment text \n\r */ ", lxr.ElementAt(2).Text);
        }
Example #2
0
        public void Comments5()
        {
            var src = @"{
          /* //comment text */
          }
          ";

            var lxr = new LL(new StringSource(src));

            Aver.AreEqual(" //comment text ", lxr.ElementAt(2).Text);
        }
Example #3
0
        public void Comments4()
        {
            var src = @"{
           //comment text
          }
          ";

            var lxr = new LL(new StringSource(src));

            Assert.AreEqual("comment text", lxr.ElementAt(2).Text);
        }
Example #4
0
        public void Comments8()
        {
            var src = @"{
          /* //comment text " + "\r\n" + @" */
          }
          ";

            var lxr = new LL(new StringSource(src));

            Assert.AreEqual(" //comment text \r\n ", lxr.ElementAt(2).Text);
        }
Example #5
0
        public void String_Escapes3()
        {
          var src = @"{'str\n\rring'}";
                                               
          var lxr = new LL(new StringSource(src));

          Assert.AreEqual("str\n\rring", lxr.ElementAt(2).Text);
        }
Example #6
0
        public void String_Escapes5_Unicode()
        {
          var src = @"{""str\u8978ring""}";
                                               
          var lxr = new LL(new StringSource(src));

          Assert.AreEqual("str\u8978ring", lxr.ElementAt(2).Text);
        }
Example #7
0
        public void String_Escapes1()
        {
          var src = @"{""str\""ing""}";
                                              
          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(@"str""ing", lxr.ElementAt(2).Text);
        }
Example #8
0
        public void String_Escapes2_2()
        {
          var src = @"a{ n = 'string\''}";
                                               
          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(@"string'", lxr.ElementAt(5).Text);
        }
Example #9
0
        public void Comments13withStrings()
        {
          var src = @"{       
          |*'aaaa /* //comment""text "+"\n\r"+@" */ *|
          }
          ";
          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(LaconfigTokenType.tComment, lxr.ElementAt(2).Type);
          Assert.AreEqual("'aaaa /* //comment\"text \n\r */ ", lxr.ElementAt(2).Text);
        }
Example #10
0
        public void Comments11withStrings()
        {
          var src = @"{       
          $'|* /* //comment text "+"\n\r"+@" */ *|'
          }
          ";

          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(LaconfigTokenType.tStringLiteral, lxr.ElementAt(2).Type);
          Assert.AreEqual("|* /* //comment text \n\r */ *|", lxr.ElementAt(2).Text);
        }
Example #11
0
        public void Comments10()
        {
          var src = @"{       
          |* /* //comment text "+"\n\r"+@" */ *|
          }
          ";

          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(" /* //comment text \n\r */ ", lxr.ElementAt(2).Text);
        }
Example #12
0
        public void Comments8()
        {
          var src = @"{
          /* //comment text "+"\r\n"+@" */
          }
          ";

          var lxr = new LL(new StringSource(src));

          Assert.AreEqual(" //comment text \r\n ", lxr.ElementAt(2).Text);
        }
Example #13
0
        public void Comments4()
        {
          var src = @"{
           //comment text
          }
          ";

          var lxr = new LL(new StringSource(src));

          Assert.AreEqual("comment text", lxr.ElementAt(2).Text);
        }