mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 11:01:25 -05:00
just namespacing the coffeescript compiler
This commit is contained in:
@@ -854,7 +854,7 @@ print reverse 'tpircseeffoc'</textarea>
|
|||||||
var source = document.getElementById('repl_source').value;
|
var source = document.getElementById('repl_source').value;
|
||||||
var js = '';
|
var js = '';
|
||||||
try {
|
try {
|
||||||
js = compile(source, {no_wrap: true});
|
js = CoffeeScript.compile(source, {no_wrap: true});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1725,7 +1725,7 @@ html <span class="Keyword">=</span> <span class="String"><span class="String">&q
|
|||||||
var source = document.getElementById('repl_source').value;
|
var source = document.getElementById('repl_source').value;
|
||||||
var js = '';
|
var js = '';
|
||||||
try {
|
try {
|
||||||
js = compile(source, {no_wrap: true});
|
js = CoffeeScript.compile(source, {no_wrap: true});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
lexer = new (require('lexer').Lexer)();
|
lexer = new (require('lexer').Lexer)();
|
||||||
parser = require('parser').parser;
|
parser = require('parser').parser;
|
||||||
} else {
|
} else {
|
||||||
this.exports = this;
|
|
||||||
lexer = new Lexer();
|
lexer = new Lexer();
|
||||||
parser = exports.parser;
|
parser = exports.parser;
|
||||||
|
this.exports = (this.CoffeeScript = {});
|
||||||
}
|
}
|
||||||
// Thin wrapper for Jison compatibility around the real lexer.
|
// Thin wrapper for Jison compatibility around the real lexer.
|
||||||
parser.lexer = {
|
parser.lexer = {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ if process?
|
|||||||
lexer: new (require('lexer').Lexer)()
|
lexer: new (require('lexer').Lexer)()
|
||||||
parser: require('parser').parser
|
parser: require('parser').parser
|
||||||
else
|
else
|
||||||
this.exports: this
|
|
||||||
lexer: new Lexer()
|
lexer: new Lexer()
|
||||||
parser: exports.parser
|
parser: exports.parser
|
||||||
|
this.exports: this.CoffeeScript: {}
|
||||||
|
|
||||||
# Thin wrapper for Jison compatibility around the real lexer.
|
# Thin wrapper for Jison compatibility around the real lexer.
|
||||||
parser.lexer: {
|
parser.lexer: {
|
||||||
|
|||||||
Reference in New Issue
Block a user