summaryrefslogtreecommitdiff
path: root/examples/tokenize.rs
blob: ceb57511e10c52000dfdf93095dca9fb1d40d95a (plain)
1
2
3
4
5
6
7
8
9
//! Let's you easily try out the tokenizer with e.g.
//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize
use html5tokenizer::{BufReadReader, Tokenizer};

fn main() {
    for token in Tokenizer::new(BufReadReader::new(std::io::stdin().lock())).flatten() {
        println!("{:?}", token);
    }
}