aboutsummaryrefslogtreecommitdiff
path: root/src/driver.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-29 08:51:35 +0100
committerMartin Fischer <martin@push-f.com>2021-11-29 15:11:01 +0100
commit912f45e2b28b1904b3187d7bca39dcecbfd3e601 (patch)
tree382c408c0b3b5180a89249cf4cee15773ca28028 /src/driver.rs
parenta0c75cde8a0680047bc4e9bc0a2bb24099e271fe (diff)
refactor: move return out of go! to clarify flow
#!/usr/bin/env python3 import re text = '' for line in open('src/tokenizer/mod.rs'): if '$me.emit_current' in line: text += re.sub('return (\$me.emit_current_tag\(\));', lambda x: x.group(1), line) elif '$me:ident' in line: text += re.sub('return (ProcessResult::Continue);', lambda x: x.group(1), line) else: text += re.sub('go!\(self: (to|consume_char_ref|emit_tag)', lambda x: 'return ' + x.group(), line) with open('src/tokenizer/mod.rs', 'w') as f: f.write(text)
Diffstat (limited to 'src/driver.rs')
0 files changed, 0 insertions, 0 deletions