Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created March 10, 2010 14:42
Show Gist options
  • Save StanAngeloff/327922 to your computer and use it in GitHub Desktop.
Save StanAngeloff/327922 to your computer and use it in GitHub Desktop.
diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee
index fe6f54a..93d990a 100644
--- a/src/coffee-script.coffee
+++ b/src/coffee-script.coffee
@@ -10,7 +10,7 @@
if process?
process.mixin require 'nodes'
path: require 'path'
- Lexer: require('lexer').Lexer
+ LexerClass: require('lexer').Lexer
parser: require('parser').parser
else
parser: exports.parser
@@ -20,7 +20,7 @@ else
exports.VERSION: '0.5.5'
# Instantiate a Lexer for our use here.
-lexer: new Lexer()
+lexer: new (LexerClass ? Lexer)()
# Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison
# compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment