Example #1
0
 internal Element Pop()
 {
     // todo - dev, remove validation check
     if (stack.PeekLast().NodeName.Equals("td") && !state.Name().Equals("InCell"))
     {
         Validate.IsFalse(true, "pop td not in cell");
     }
     if (stack.PeekLast().NodeName.Equals("html"))
     {
         Validate.IsFalse(true, "popping html!");
     }
     return(stack.PollLast());
 }
Example #2
0
 internal void Error(HtmlTreeBuilderState state)
 {
     if (errors.CanAddError)
     {
         errors.Add(new ParseError(reader.Pos(), "Unexpected token [{0}] when in state [{1}]", currentToken.Type(), state.Name()));
     }
 }