diff --git a/cli/src/generate/mod.rs b/cli/src/generate/mod.rs index 816d0613..4b2ae98b 100644 --- a/cli/src/generate/mod.rs +++ b/cli/src/generate/mod.rs @@ -143,7 +143,9 @@ fn load_js_grammar_file(grammar_path: &Path) -> Result { Some(code) => return Err(Error(format!("Node process exited with status {}", code))), } - Ok(String::from_utf8(output.stdout).expect("Got invalid UTF8 from node")) + let mut result = String::from_utf8(output.stdout).expect("Got invalid UTF8 from node"); + result.push('\n'); + Ok(result) } fn ensure_file>(path: &PathBuf, f: impl Fn() -> T) -> Result<()> {