Merge lib/compiler/passes.js into lib/compiler.js

It didn't make sense to have the passes in a separate file.
redux
David Majda 12 years ago
parent 02af83f9b4
commit 3b3798fa39

@ -14,7 +14,6 @@ MODULES = utils \
compiler/passes/remove-proxy-rules \
compiler/passes/report-left-recursion \
compiler/passes/report-missing-rules \
compiler/passes \
compiler \
peg

@ -1,7 +1,20 @@
var utils = require("./utils");
module.exports = {
passes: require("./compiler/passes"),
/*
* Compiler passes.
*
* Each pass is a function that is passed the AST. It can perform checks on it
* or modify it as needed. If the pass encounters a semantic error, it throws
* |PEG.GrammarError|.
*/
passes: {
reportMissingRules: require("./compiler/passes/report-missing-rules"),
reportLeftRecursion: require("./compiler/passes/report-left-recursion"),
removeProxyRules: require("./compiler/passes/remove-proxy-rules"),
generateBytecode: require("./compiler/passes/generate-bytecode"),
generateJavascript: require("./compiler/passes/generate-javascript")
},
/*
* Names of passes that will get run during the compilation (in the specified

@ -1,14 +0,0 @@
/*
* Compiler passes.
*
* Each pass is a function that is passed the AST. It can perform checks on it
* or modify it as needed. If the pass encounters a semantic error, it throws
* |PEG.GrammarError|.
*/
module.exports = {
reportMissingRules: require("./passes/report-missing-rules"),
reportLeftRecursion: require("./passes/report-left-recursion"),
removeProxyRules: require("./passes/remove-proxy-rules"),
generateBytecode: require("./passes/generate-bytecode"),
generateJavascript: require("./passes/generate-javascript")
};

@ -20,7 +20,6 @@
"examples/json.pegjs",
"lib/compiler.js",
"lib/compiler/opcodes.js",
"lib/compiler/passes.js",
"lib/compiler/passes/generate-bytecode.js",
"lib/compiler/passes/generate-javascript.js",
"lib/compiler/passes/remove-proxy-rules.js",

Loading…
Cancel
Save