Port unit test for missing tokens and included ranges

This commit is contained in:
Max Brunsfeld 2019-02-04 14:44:06 -08:00
parent e62a8a2302
commit 4a98f0b87e
4 changed files with 107 additions and 36 deletions

View file

@ -58,7 +58,7 @@ pub fn generate_parser_in_directory(
Ok(())
}
pub fn generate_parser_for_grammar(grammar_json: &String) -> Result<(String, String)> {
pub fn generate_parser_for_grammar(grammar_json: &str) -> Result<(String, String)> {
let grammar_json = JSON_COMMENT_REGEX.replace_all(grammar_json, "\n");
generate_parser_for_grammar_with_opts(&grammar_json, true, Vec::new())
}