Exemplo n.º 1
0
        /// <summary>
        /// Reads the directive.
        /// </summary>
        private DothtmlDirectiveNode ReadDirective()
        {
            var startIndex = CurrentIndex;
            var node       = new DothtmlDirectiveNode()
            {
                StartPosition = Peek().StartPosition
            };

            Assert(DothtmlTokenType.DirectiveStart);
            node.DirectiveStartToken = Read();

            //consume only whitespaces before and after
            node.NameNode = ReadName(true, true, DothtmlTokenType.DirectiveName);

            //consume only whitespaces after
            node.ValueNode = ReadTextValue(false, true, DothtmlTokenType.DirectiveValue);

            node.Tokens.AddRange(GetTokensFrom(startIndex));
            return(node);
        }
 public void Visit(DothtmlDirectiveNode directive)
 {
     ResolveFromParent(directive);
 }
Exemplo n.º 3
0
 public void Visit(DothtmlDirectiveNode directive)
 {
     LastFoundNode = directive;
 }