public RazorDirectiveBuilder AddString()
        {
            var descriptor = new RazorDirectiveTokenDescriptor()
            {
                Type = RazorDirectiveTokenType.String
            };

            _tokenDescriptors.Add(descriptor);

            return(this);
        }
        public RazorDirectiveBuilder AddLiteral(string literal, bool optional)
        {
            var descriptor = new RazorDirectiveTokenDescriptor()
            {
                Type     = RazorDirectiveTokenType.Literal,
                Value    = literal,
                Optional = optional,
            };

            _tokenDescriptors.Add(descriptor);

            return(this);
        }
 public static void AddDirectiveToken(
     this ChunkTreeBuilder builder,
     string value,
     RazorDirectiveTokenDescriptor tokenDescriptor,
     SyntaxTreeNode association)
 {
     builder.AddChunk(
         new RazorDirectiveTokenChunk
     {
         Value      = value,
         Descriptor = tokenDescriptor,
     },
         association);
 }
 public RazorDirectiveTokenChunkGenerator(RazorDirectiveTokenDescriptor tokenDescriptor)
 {
     _tokenDescriptor = tokenDescriptor;
 }