Move lib/compiler.js to lib/compiler/index.js

This makes "compiler" a regular Node.js module.
redux
David Majda 9 years ago
parent 5a4d04fa90
commit 930877c3ba

@ -1,14 +1,14 @@
"use strict";
var arrays = require("./utils/arrays"),
objects = require("./utils/objects");
var arrays = require("../utils/arrays"),
objects = require("../utils/objects");
var compiler = {
/*
* AST node visitor builder. Useful mainly for plugins which manipulate the
* AST.
*/
visitor: require("./compiler/visitor"),
visitor: require("./visitor"),
/*
* Compiler passes.
@ -19,16 +19,16 @@ var compiler = {
*/
passes: {
check: {
reportMissingRules: require("./compiler/passes/report-missing-rules"),
reportLeftRecursion: require("./compiler/passes/report-left-recursion"),
reportInfiniteLoops: require("./compiler/passes/report-infinite-loops")
reportMissingRules: require("./passes/report-missing-rules"),
reportLeftRecursion: require("./passes/report-left-recursion"),
reportInfiniteLoops: require("./passes/report-infinite-loops")
},
transform: {
removeProxyRules: require("./compiler/passes/remove-proxy-rules")
removeProxyRules: require("./passes/remove-proxy-rules")
},
generate: {
generateBytecode: require("./compiler/passes/generate-bytecode"),
generateJS: require("./compiler/passes/generate-js")
generateBytecode: require("./passes/generate-bytecode"),
generateJS: require("./passes/generate-js")
}
},

@ -20,8 +20,8 @@
"examples/css.pegjs",
"examples/javascript.pegjs",
"examples/json.pegjs",
"lib/compiler.js",
"lib/compiler/asts.js",
"lib/compiler/index.js",
"lib/compiler/js.js",
"lib/compiler/opcodes.js",
"lib/compiler/visitor.js",

Loading…
Cancel
Save