function tokenizer(b,e){function c(a){return a!="\n"&&/^[\s\u00a0]*$/.test(a)}var d={state:e,take:function(a){if(typeof a=="string")a={style:a,type:a};a.content=(a.content||"")+b.get();/\n$/.test(a.content)||b.nextWhile(c);a.value=a.content+b.get();return a},next:function(){if(!b.more())throw StopIteration;var a;if(b.equals("\n")){b.next();return this.take("whitespace")}if(b.applies(c))a="whitespace";else for(;!a;)a=this.state(b,function(f){d.state=f});return this.take(a)}};return d};