Small style fixes
This commit is contained in:
parent
8e63ad3b6c
commit
d0c074e2f8
|
@ -4,7 +4,7 @@ var sys = require("sys");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var PEG = require("../lib/peg");
|
var PEG = require("../lib/peg");
|
||||||
|
|
||||||
/* ===== Helpers ===== */
|
/* Helpers */
|
||||||
|
|
||||||
function printVersion() {
|
function printVersion() {
|
||||||
sys.puts("PEG.js " + PEG.VERSION);
|
sys.puts("PEG.js " + PEG.VERSION);
|
||||||
|
@ -40,7 +40,7 @@ function abort(message) {
|
||||||
exitFailure();
|
exitFailure();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== Arguments ===== */
|
/* Arguments */
|
||||||
|
|
||||||
var args = process.argv.slice(2); // Trim "node" and the script path.
|
var args = process.argv.slice(2); // Trim "node" and the script path.
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ function nextArg() {
|
||||||
args.shift();
|
args.shift();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== Files ===== */
|
/* Files */
|
||||||
|
|
||||||
function readStream(inputStream, callback) {
|
function readStream(inputStream, callback) {
|
||||||
var input = "";
|
var input = "";
|
||||||
|
@ -60,7 +60,7 @@ function readStream(inputStream, callback) {
|
||||||
inputStream.on("end", function() { callback(input); });
|
inputStream.on("end", function() { callback(input); });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== Main ===== */
|
/* Main */
|
||||||
|
|
||||||
/* This makes the generated parser a CommonJS module by default. */
|
/* This makes the generated parser a CommonJS module by default. */
|
||||||
var exportVar = "exports.parser";
|
var exportVar = "exports.parser";
|
||||||
|
|
2
test/run
2
test/run
|
@ -79,7 +79,7 @@ QUnit.done = function(details) {
|
||||||
"parser-test.js",
|
"parser-test.js",
|
||||||
"checks-test.js",
|
"checks-test.js",
|
||||||
"passes-test.js",
|
"passes-test.js",
|
||||||
"compiler-test.js"
|
"compiler-test.js",
|
||||||
].forEach(function(file) {
|
].forEach(function(file) {
|
||||||
eval("with (QUnit) {" + fs.readFileSync(file, "utf-8") + "}");
|
eval("with (QUnit) {" + fs.readFileSync(file, "utf-8") + "}");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue