aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer/mod.rs
AgeCommit message (Collapse)Author
2021-11-29refactor: use std::ops::ControlFlowMartin Fischer
2021-11-29refactor: move return out of go! to clarify flowMartin Fischer
#!/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)
2021-11-29refactor: remove no longer needed macro rulesMartin Fischer
2021-11-29refactor: split up go! macro callsMartin Fischer
#!/usr/bin/env python3 import re def split_go(match): inner = match.group(1) stmts = inner.split(';') text = '{' for stmt in stmts: if stmt.startswith(' reconsume '): text += 'self.reconsume = true;' stmt = ' to' + stmt[len(' reconsume'):] text += 'go!(self:{});'.format(stmt) return text + '}' text = '' with open('src/tokenizer/mod.rs') as f: for line in f: if '$me:ident' in line: # skip macro rules text += line else: text += re.sub('go!\(self:(.*)\)', split_go, line) with open('src/tokenizer/mod.rs', 'w') as f: f.write(text) import subprocess subprocess.call(['cargo', 'fmt'])
2021-11-29refactor: eliminate line wrapping in go! macroMartin Fischer
2021-11-29refactor: slightly simplify go! DSLMartin Fischer
2021-11-29stop exporting buffer_queue::SetResultMartin Fischer
2021-11-29stop re-exporting Token & TagKind variantsMartin Fischer
2021-11-29stop exporting internal states moduleMartin Fischer
2021-11-19feature gate named-entities (making phf optional)Martin Fischer
2021-11-19make test sink also emit CharacterTokens & ParseErrorMartin Fischer
2021-11-19format code with cargo fmtMartin Fischer
2021-11-12fix compiler warning about semicolons in macrosMartin Fischer
See https://github.com/rust-lang/rust/issues/79813.
2021-04-08drop log dependencyMartin Fischer
2021-04-08drop mac dependencyMartin Fischer
2021-04-08drop tendril dependencyMartin Fischer
2021-04-08drop markup5ever dependencyMartin Fischer
2021-04-08merge Attribute from markup5everMartin Fischer
2021-04-08merge buffer_queue and smallcharset from markup5everMartin Fischer
2021-04-08depend on tendril directly (instead of markup5ever::tendril)Martin Fischer
2021-04-08make dependencies on markup5ever explicitMartin Fischer
2021-04-08import https://github.com/servo/html5everMartin Fischer
commit d1206daa740305f55a5fa159e43eb33afc359cb4