we don't need relative requires for the language

This commit is contained in:
Jeremy Ashkenas 2010-03-14 13:48:58 -07:00
parent a27f146338
commit b306d40bf1
4 changed files with 6 additions and 6 deletions

View File

@ -8,8 +8,8 @@
// Which is a format that can be fed directly into [Jison](http://github.com/zaach/jison).
// Set up the Lexer for both Node.js and the browser, depending on where we are.
if ((typeof process !== "undefined" && process !== null)) {
Rewriter = require('./rewriter').Rewriter;
process.mixin(require('./helpers'));
Rewriter = require('rewriter').Rewriter;
process.mixin(require('helpers'));
} else {
this.exports = this;
Rewriter = this.Rewriter;

View File

@ -9,7 +9,7 @@
// add implicit indentation and parentheses, balance incorrect nestings, and
// generally clean things up.
// Set up exported variables for both Node.js and the browser.
(typeof process !== "undefined" && process !== null) ? process.mixin(require('./helpers')) : (this.exports = this);
(typeof process !== "undefined" && process !== null) ? process.mixin(require('helpers')) : (this.exports = this);
// The **Rewriter** class is used by the [Lexer](lexer.html), directly against
// its internal array of tokens.
exports.Rewriter = (function() {

View File

@ -9,8 +9,8 @@
# Set up the Lexer for both Node.js and the browser, depending on where we are.
if process?
Rewriter: require('./rewriter').Rewriter
process.mixin require './helpers'
Rewriter: require('rewriter').Rewriter
process.mixin require 'helpers'
else
this.exports: this
Rewriter: this.Rewriter

View File

@ -8,7 +8,7 @@
# Set up exported variables for both Node.js and the browser.
if process?
process.mixin require './helpers'
process.mixin require 'helpers'
else
this.exports: this