diff --git a/tests/syntax-tests/highlighted/CoffeeScript/coffeescript.coffee b/tests/syntax-tests/highlighted/CoffeeScript/coffeescript.coffee new file mode 100644 index 00000000..731ce911 --- /dev/null +++ b/tests/syntax-tests/highlighted/CoffeeScript/coffeescript.coffee @@ -0,0 +1,391 @@ +# 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. + +{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 + +# Function that allows for btoa in both nodejs and the browser. +base64encode = (src) -> switch + when typeof Buffer is 'function' + Buffer.from(src).toString('base64') + when typeof btoa is 'function' + # The contents of a `