Ejemplo n.º 1
0
        public TagNode([NotNull] TemplateNode parent, [NotNull] TagLex lex)
            : base(parent)
        {
            Debug.Assert(parent != null, "parent cannot be null.");
            Debug.Assert(lex != null, "lex cannot be null.");

            Components = lex.Components;
        }
Ejemplo n.º 2
0
        internal static void UnexpectedTag([NotNull] TagLex tagLex)
        {
            Debug.Assert(tagLex != null, "tagLex cannot be null.");

            throw new InterpreterException(
                      new Directive[0],
                      tagLex.FirstCharacterIndex,
                      "Unexpected tag {{{0}}} encountered at position {1}.",
                      tagLex.ToString(),
                      tagLex.FirstCharacterIndex);
        }
Ejemplo n.º 3
0
        public void TestCaseTagLexConstruction1()
        {
            var tag        = new Tag().Keyword("Hello").Expression();
            var components = new object[] { "Hello", "Some" };

            var lex = new TagLex(tag, components, 100, 999);

            Assert.AreEqual(100, lex.FirstCharacterIndex);
            Assert.AreEqual(999, lex.OriginalLength);
            Assert.AreSame(tag, lex.Tag);
            Assert.AreSame(components, lex.Components);
        }