mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
working 'Try CoffeeScript' in the docs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
(function(){
|
||||
var compiler, lexer, parser, path;
|
||||
// Set up for both the browser and the server.
|
||||
if ((typeof process !== "undefined" && process !== null)) {
|
||||
process.mixin(require('./nodes'));
|
||||
path = require('path');
|
||||
@@ -31,6 +32,10 @@
|
||||
return this.pos;
|
||||
}
|
||||
};
|
||||
// Improved error messages.
|
||||
parser.parseError = function parseError(message, hash) {
|
||||
throw new Error('Unexpected ' + hash.token + ' on line ' + hash.line);
|
||||
};
|
||||
exports.VERSION = '0.5.0';
|
||||
// Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
|
||||
exports.compile = function compile(code, options) {
|
||||
|
||||
Reference in New Issue
Block a user