// Generated by CoffeeScript 2.7.0 (function() { // CoffeeScript can be used both on the server, as a command-line compiler based // on Node.js/V8, or to run CoffeeScript directly in the browser. This module // contains the main entry functions for tokenizing, parsing, and compiling // source CoffeeScript into JavaScript. var FILE_EXTENSIONS, Lexer, SourceMap, base64encode, checkShebangLine, compile, getSourceMap, helpers, lexer, packageJson, parser, registerCompiled, withPrettyErrors; ({Lexer} = require('./lexer')); ({parser} = require('./parser')); helpers = require('./helpers'); SourceMap = require('./sourcemap'); // Require `package.json`, which is two levels above this file, as this file is // evaluated from `lib/coffeescript`. packageJson = require('../../package.json'); // The current CoffeeScript version number. exports.VERSION = packageJson.version; exports.FILE_EXTENSIONS = FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']; // Expose helpers for testing. exports.helpers = helpers; ({getSourceMap, registerCompiled} = SourceMap); // This is exported to enable an external module to implement caching of // sourcemaps. This is used only when `patchStackTrace` has been called to adjust // stack traces for files with cached source maps. exports.registerCompiled = registerCompiled; // Function that allows for btoa in both nodejs and the browser. base64encode = function(src) { switch (false) { case typeof Buffer !== 'function': return Buffer.from(src).toString('base64'); case typeof btoa !== 'function': // The contents of a `