コード例 #1
0
        public void CommentParser()
        {
            var result = grammar.Comment(Source("<!-- hello world -->"));

            Assert.IsNotNull(result);
            Assert.AreEqual(" hello world ", result.Value.Text);

            var result2 = grammar.Comment(Source("<!-- hello-world -->"));

            Assert.IsNotNull(result2);
            Assert.AreEqual(" hello-world ", result2.Value.Text);

            var result3 = grammar.Comment(Source("<!-- hello--world -->"));

            Assert.IsNull(result3);
        }