Ejemplo n.º 1
0
 void Insert(Token.Comment commentToken)
 {
     if (commentToken.IsBogus)
     {
         var comment = HtmlProcessingInstruction.Create(doc, commentToken);
         InsertNode(comment);
     }
     else
     {
         var comment = doc.CreateComment(commentToken.Data);
         InsertNode(comment);
     }
 }
Ejemplo n.º 2
0
            public override void Read(Tokeniser t, CharacterReader r)
            {
                // TODO: handle bogus comment starting from eof. when does that trigger?
                // rewind to capture char that lead us here
                r.Unconsume();
                Token.Comment comment = new Token.Comment();
                comment.data.Append(r.ConsumeTo('>'));
                comment.IsBogus = true;

                // TODO: replace nullChar with replaceChar
                t.Emit(comment);
                t.AdvanceTransition(Data);
            }
Ejemplo n.º 3
0
 public void CreateCommentPending()
 {
     commentPending = new Token.Comment();
 }