diff --git a/bin/pegjs b/bin/pegjs index a20aec8..20bd43c 100755 --- a/bin/pegjs +++ b/bin/pegjs @@ -197,7 +197,9 @@ readStream(inputStream, function(input) { } } - outputStream.write(exportVar + " = " + source + ";\n"); + outputStream.write( + exportVar !== "" ? exportVar + " = " + source + ";\n" : source + "\n" + ); if (outputStream !== process.stdout) { outputStream.end(); }