Add user uses in generated mod intern_token (should fix #113)

This commit is contained in:
Minijackson 2017-04-17 14:04:41 +02:00
parent 3037d7637b
commit 1b206d1665
No known key found for this signature in database
GPG Key ID: FEA888C9F5D64F62

View File

@ -44,7 +44,7 @@ pub fn compile<W: Write>(
let prefix = &grammar.prefix;
rust!(out, "mod {}intern_token {{", prefix);
try!(out.write_standard_uses(prefix));
try!(out.write_uses("", &grammar));
rust!(out, "extern crate regex as {}regex;", prefix);
rust!(out, "pub struct {}Matcher<'input> {{", prefix);
rust!(out, "text: &'input str,"); // remaining input