| Class | HTML5::HTMLTokenizer |
| In: |
lib/html5/tokenizer.rb
|
| Parent: | Object |
This class takes care of tokenizing HTML.
| content_model_flag | [RW] | |
| current_token | [RW] | |
| stream | [R] |
This function returns either U+FFFD or the character based on the decimal or hexadecimal representation. It also discards ";" if present. If not present @token_queue << {:type => :ParseError}" is invoked.
XXX AT Perhaps we should have Hixie run some evaluation on billions of documents to figure out what the order of the various if and elsif statements should be.
This is where the magic happens.
We do our usually processing through the states and when we have a token to return we yield the token which pauses processing until the next token is requested.