xo-tokenizer: bugfix: yields token works + 2phase utest
This commit is contained in:
parent
8435734b45
commit
27ef5701ac
8 changed files with 722 additions and 312 deletions
|
|
@ -32,10 +32,10 @@ namespace xo {
|
|||
while (!input.empty()) {
|
||||
/* read one token from input */
|
||||
auto sr = this->tokenizer_.scan2(input, eof);
|
||||
const auto & tk = sr.first;
|
||||
const span_type & used_span = sr.second;
|
||||
const auto & tk = sr.get_token();
|
||||
const span_type & used_span = sr.consumed();
|
||||
|
||||
log && log(xtag("used_span", used_span));
|
||||
log && log(xtag("consumed", used_span));
|
||||
log && log(xtag("input.pre", input));
|
||||
|
||||
input = input.after_prefix(used_span);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue