Good idea! `{token : "comment", regex : "$|^", next : "start"}` will work too, (empty tokens are not created, so name doesn't matter).

> This doesn't work in html mode. But still works in js mode. Why?

what do you mean? `//` and the file start leaves tokenizer state in comment state, in js mode too