From e0ec8a51e48dd06f40b647a6d53ad74178f49030 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 29 Jan 2015 12:20:46 -0500 Subject: [PATCH] CoffeeScript 1.9.0 --- bower.json | 2 +- documentation/coffee/generators.coffee | 8 + documentation/docs/browser.html | 16 +- documentation/docs/cake.html | 6 +- documentation/docs/coffee-script.html | 277 +++-- documentation/docs/command.html | 113 +- documentation/docs/grammar.html | 11 +- documentation/docs/helpers.html | 50 +- documentation/docs/index.html | 2 +- documentation/docs/lexer.html | 1050 ++++++++--------- documentation/docs/nodes.html | 182 +-- documentation/docs/optparse.html | 2 +- documentation/docs/register.html | 8 +- documentation/docs/repl.html | 142 ++- documentation/docs/rewriter.html | 69 +- documentation/docs/scope.html | 28 +- documentation/docs/sourcemap.html | 2 +- documentation/docs/underscore.html | 163 ++- documentation/index.html.js | 28 +- documentation/js/aliases.js | 2 +- documentation/js/array_comprehensions.js | 2 +- documentation/js/block_comment.js | 2 +- documentation/js/cake_tasks.js | 4 +- documentation/js/chaining.js | 2 +- documentation/js/classes.js | 10 +- documentation/js/comparisons.js | 2 +- documentation/js/conditionals.js | 2 +- documentation/js/constructor_destructuring.js | 2 +- documentation/js/default_args.js | 2 +- documentation/js/do.js | 2 +- documentation/js/embedded.js | 2 +- documentation/js/existence.js | 2 +- documentation/js/expansion.js | 2 +- documentation/js/expressions.js | 2 +- documentation/js/expressions_assignment.js | 2 +- documentation/js/expressions_comprehension.js | 2 +- documentation/js/expressions_try.js | 2 +- documentation/js/fat_arrow.js | 2 +- documentation/js/functions.js | 2 +- documentation/js/generators.js | 13 + documentation/js/heredocs.js | 2 +- documentation/js/heregexes.js | 2 +- documentation/js/interpolation.js | 4 +- documentation/js/multiple_return_values.js | 2 +- documentation/js/object_comprehensions.js | 4 +- documentation/js/object_extraction.js | 2 +- documentation/js/objects_and_arrays.js | 2 +- documentation/js/objects_reserved.js | 2 +- documentation/js/overview.js | 2 +- documentation/js/parallel_assignment.js | 2 +- documentation/js/patterns_and_splats.js | 2 +- documentation/js/prototypes.js | 2 +- documentation/js/range_comprehensions.js | 2 +- documentation/js/scope.js | 2 +- documentation/js/slices.js | 2 +- documentation/js/soaks.js | 2 +- documentation/js/splats.js | 2 +- documentation/js/splices.js | 2 +- documentation/js/strings.js | 2 +- documentation/js/switch.js | 2 +- documentation/js/switch_with_no_expression.js | 2 +- documentation/js/try.js | 2 +- documentation/js/while.js | 4 +- extras/coffee-script.js | 4 +- index.html | 187 ++- lib/coffee-script/browser.js | 2 +- lib/coffee-script/cake.js | 2 +- lib/coffee-script/coffee-script.js | 4 +- lib/coffee-script/command.js | 2 +- lib/coffee-script/grammar.js | 2 +- lib/coffee-script/helpers.js | 2 +- lib/coffee-script/index.js | 2 +- lib/coffee-script/lexer.js | 2 +- lib/coffee-script/nodes.js | 2 +- lib/coffee-script/optparse.js | 2 +- lib/coffee-script/register.js | 2 +- lib/coffee-script/repl.js | 2 +- lib/coffee-script/rewriter.js | 2 +- lib/coffee-script/scope.js | 2 +- lib/coffee-script/sourcemap.js | 2 +- package.json | 2 +- src/coffee-script.coffee | 2 +- 82 files changed, 1310 insertions(+), 1191 deletions(-) create mode 100644 documentation/coffee/generators.coffee create mode 100644 documentation/js/generators.js diff --git a/bower.json b/bower.json index c716a455..1b06403c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "coffee-script", - "version": "1.8.0", + "version": "1.9.0", "main": [ "lib/coffee-script/coffee-script.js" ], diff --git a/documentation/coffee/generators.coffee b/documentation/coffee/generators.coffee new file mode 100644 index 00000000..a13f0a8c --- /dev/null +++ b/documentation/coffee/generators.coffee @@ -0,0 +1,8 @@ +perfectSquares = -> + num = 0 + loop + num += 1 + yield num * num + return + +window.ps or= perfectSquares() \ No newline at end of file diff --git a/documentation/docs/browser.html b/documentation/docs/browser.html index f1c9ca0a..e69c2811 100644 --- a/documentation/docs/browser.html +++ b/documentation/docs/browser.html @@ -140,7 +140,7 @@ compile = CoffeeScript.compile -
CoffeeScript.eval = (code, options = {}) ->
+            
CoffeeScript.eval = (code, options = {}) ->
   options.bare ?= on
   eval compile code, options
@@ -157,7 +157,7 @@ compile = CoffeeScript.compile
-
CoffeeScript.run = (code, options = {}) ->
+            
CoffeeScript.run = (code, options = {}) ->
   options.bare = on
   options.shiftLine = on
   Function(compile code, options)()
@@ -193,7 +193,7 @@ Ported from h
-
CoffeeScript.load = (url, callback, options = {}, hold = false) ->
+            
-
exports.run = ->
+            
exports.run = ->
   global.__originalDirname = fs.realpathSync '.'
   process.chdir cakefileDirectory __originalDirname
   args = process.argv[2..]
@@ -314,8 +314,8 @@ original directory name, when running Cake tasks from subdirectories.

console.error message + '\n' console.log 'To see a list of all tasks/options, run "cake"' process.exit 1 - -missingTask = (task) -> fatalError "No such task: #{task}"
+ +missingTask = (task) -> fatalError "No such task: #{task}"
diff --git a/documentation/docs/coffee-script.html b/documentation/docs/coffee-script.html index fa696bed..5c4b4da2 100644 --- a/documentation/docs/coffee-script.html +++ b/documentation/docs/coffee-script.html @@ -144,9 +144,9 @@ SourceMap = require
exports.VERSION = '1.8.0'
+            
exports.VERSION = '1.9.0'
 
-exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']
+exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']
@@ -161,7 +161,7 @@ SourceMap = require
exports.helpers = helpers
+
exports.helpers = helpers
@@ -178,7 +178,7 @@ lexer/parser/compiler.

withPrettyErrors = (fn) ->
-  (code, options = {}) ->
+  (code, options = {}) ->
     try
       fn.call @, code, options
     catch err
@@ -203,14 +203,36 @@ lookups.

-
exports.compile = compile = withPrettyErrors (code, options) ->
+            
exports.compile = compile = withPrettyErrors (code, options) ->
   {merge, extend} = helpers
   options = extend {}, options
 
   if options.sourceMap
     map = new SourceMap
 
-  fragments = parser.parse(lexer.tokenize code, options).compileToFragments options
+  tokens = lexer.tokenize code, options
+ + + + +
  • +
    + + +

    Pass a list of referenced variables, so that generated variables won’t get +the same name. Since all generated variables start with an underscore only +referenced variables also starting with an underscore are passed, as an +optimization.

    + +
    + +
      options.referencedVars = (
    +    token[1] for token in tokens when token.variable and token[1].charAt(0) is '_'
    +  )
    +
    +  fragments = parser.parse(tokens).compileToFragments options
     
       currentLine = 0
       currentLine += 1 if options.header
    @@ -222,11 +244,11 @@ lookups.

  • -
  • +
  • - +

    Update the sourcemap with data from each fragment

    @@ -248,11 +270,11 @@ lookups.

  • -
  • +
  • - +

    Copy the code from each fragment into the final JavaScript.

    @@ -275,39 +297,18 @@ lookups.

  • -
  • -
    - -
    - -
    -

    Tokenize a string of CoffeeScript code, and return the array of tokens.

    - -
    - -
    exports.tokens = withPrettyErrors (code, options) ->
    -  lexer.tokenize code, options
    - -
  • - -
  • -

    Parse a string of CoffeeScript code or an array of lexed tokens, and -return the AST. You can then compile it by calling .compile() on the root, -or traverse it by using .traverseChildren() with a callback.

    +

    Tokenize a string of CoffeeScript code, and return the array of tokens.

    -
    exports.nodes = withPrettyErrors (source, options) ->
    -  if typeof source is 'string'
    -    parser.parse lexer.tokenize source, options
    -  else
    -    parser.parse source
    +
    exports.tokens = withPrettyErrors (code, options) ->
    +  lexer.tokenize code, options
  • @@ -318,13 +319,17 @@ or traverse it by using .traverseChildren() with a callback.

    -

    Compile and execute a string of CoffeeScript (on the server), correctly -setting __filename, __dirname, and relative require().

    +

    Parse a string of CoffeeScript code or an array of lexed tokens, and +return the AST. You can then compile it by calling .compile() on the root, +or traverse it by using .traverseChildren() with a callback.

    -
    exports.run = (code, options = {}) ->
    -  mainModule = require.main
    +
    exports.nodes = withPrettyErrors (source, options) ->
    +  if typeof source is 'string'
    +    parser.parse lexer.tokenize source, options
    +  else
    +    parser.parse source
    @@ -335,6 +340,23 @@ setting __filename, __dirname, and relative requ
    +

    Compile and execute a string of CoffeeScript (on the server), correctly +setting __filename, __dirname, and relative require().

    + +
    + +
    exports.run = (code, options = {}) ->
    +  mainModule = require.main
    + + + + +
  • +
    + +
    + +

    Set the filename.

    @@ -345,11 +367,11 @@ setting __filename, __dirname, and relative requ
  • -
  • +
  • - +

    Clear the module cache.

    @@ -360,11 +382,11 @@ setting __filename, __dirname, and relative requ
  • -
  • +
  • - +

    Assign paths for node_modules loading

    @@ -379,11 +401,11 @@ setting __filename, __dirname, and relative requ
  • -
  • +
  • - +

    Compile.

    @@ -398,26 +420,30 @@ setting __filename, __dirname, and relative requ
  • -
  • +
  • - +

    Compile and evaluate a string of CoffeeScript (in a Node.js-like environment). The CoffeeScript REPL uses this to run the input.

    -
    exports.eval = (code, options = {}) ->
    +            
    exports.eval = (code, options = {}) ->
       return unless code = code.trim()
    -  Script = vm.Script
    -  if Script
    +  createContext = vm.Script.createContext ? vm.createContext
    +
    +  isContext = vm.isContext ? (ctx) ->
    +    options.sandbox instanceof createContext().constructor
    +
    +  if createContext
         if options.sandbox?
    -      if options.sandbox instanceof Script.createContext().constructor
    +      if isContext options.sandbox
             sandbox = options.sandbox
           else
    -        sandbox = Script.createContext()
    +        sandbox = createContext()
             sandbox[k] = v for own k, v of options.sandbox
           sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox
         else
    @@ -428,11 +454,11 @@ The CoffeeScript REPL uses this to run the input.

  • -
  • +
  • - +

    define module/require only if they chose not to specify their own

    @@ -441,45 +467,45 @@ The CoffeeScript REPL uses this to run the input.

        unless sandbox isnt global or sandbox.module or sandbox.require
           Module = require 'module'
           sandbox.module  = _module  = new Module(options.modulename || 'eval')
    -      sandbox.require = _require = (path) ->  Module._load path, _module, true
    +      sandbox.require = _require = (path) ->  Module._load path, _module, true
           _module.filename = sandbox.__filename
           _require[r] = require[r] for r in Object.getOwnPropertyNames require when r isnt 'paths'
  • -
  • -
    - -
    - -
    -

    use the same hack node currently uses for their own REPL

    - -
    - -
          _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
    -      _require.resolve = (request) -> Module._resolveFilename request, _module
    -  o = {}
    -  o[k] = v for own k, v of options
    -  o.bare = on # ensure return value
    -  js = compile code, o
    -  if sandbox is global
    -    vm.runInThisContext js
    -  else
    -    vm.runInContext js, sandbox
    -
    -exports.register = -> require './register'
    - -
  • - -
  • +

    use the same hack node currently uses for their own REPL

    + +
    + +
          _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
    +      _require.resolve = (request) -> Module._resolveFilename request, _module
    +  o = {}
    +  o[k] = v for own k, v of options
    +  o.bare = on # ensure return value
    +  js = compile code, o
    +  if sandbox is global
    +    vm.runInThisContext js
    +  else
    +    vm.runInContext js, sandbox
    +
    +exports.register = -> require './register'
    + +
  • + + +
  • +
    + +
    + +

    Throw error with deprecation warning when depending upon implicit require.extensions registration

    @@ -491,7 +517,7 @@ The CoffeeScript REPL uses this to run the input.

    Use CoffeeScript.register() or require the coffee-script/register module to require #{ext} files. """ -exports._compileFile = (filename, sourceMap = no) -> +exports._compileFile = (filename, sourceMap = no) -> raw = fs.readFileSync filename, 'utf8' stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw @@ -502,11 +528,11 @@ The CoffeeScript REPL uses this to run the input.

  • -
  • +
  • - +

    As the filename and code of a dynamically loaded file will be different from the original file compiled with CoffeeScript.run, add that @@ -521,11 +547,11 @@ information to error so it can be pretty-printed later.

  • -
  • +
  • - +

    Instantiate a Lexer for our use here.

    @@ -536,11 +562,11 @@ information to error so it can be pretty-printed later.

  • -
  • +
  • - +

    The real Lexer produces a generic stream of tokens. This object provides a thin wrapper around it, compatible with the Jison API. We can then pass it @@ -550,16 +576,17 @@ directly as a “Jison lexer”.

    parser.lexer =
       lex: ->
    -    token = @tokens[@pos++]
    +    token = parser.tokens[@pos++]
         if token
           [tag, @yytext, @yylloc] = token
    -      @errorToken = token.origin or token
    +      parser.errorToken = token.origin or token
           @yylineno = @yylloc.first_line
         else
           tag = ''
     
         tag
    -  setInput: (@tokens) ->
    +  setInput: (tokens) ->
    +    parser.tokens = tokens
         @pos = 0
       upcomingInput: ->
         ""
    @@ -567,32 +594,17 @@ directly as a “Jison lexer”.

  • -
  • -
    - -
    - -
    -

    Make all the AST nodes visible to the parser.

    - -
    - -
    parser.yy = require './nodes'
    - -
  • - -
  • -

    Override Jison’s default error handling function.

    +

    Make all the AST nodes visible to the parser.

    -
    parser.yy.parseError = (message, {token}) ->
    +
    parser.yy = require './nodes'
  • @@ -603,13 +615,28 @@ directly as a “Jison lexer”.

    +

    Override Jison’s default error handling function.

    + +
    + +
    parser.yy.parseError = (message, {token}) ->
    + + + + +
  • +
    + +
    + +

    Disregard Jison’s message, it contains redundant line numer information. Disregard the token, we take its value directly from the lexer in case the error is caused by a generated token which might refer to its origin.

    -
      {errorToken, tokens} = parser.lexer
    +            
      {errorToken, tokens} = parser
       [errorTag, errorText, errorLoc] = errorToken
     
       errorText = if errorToken is tokens[tokens.length - 1]
    @@ -622,11 +649,11 @@ the error is caused by a generated token which might refer to its origin.

  • -
  • +
  • - +

    The second argument has a loc property, which should have the location data for this token. Unfortunately, Jison seems to send an outdated loc @@ -640,11 +667,11 @@ from the lexer.

  • -
  • +
  • - +

    Based on http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js Modified to handle sourceMap

    @@ -672,11 +699,11 @@ Modified to handle sourceMap

  • -
  • +
  • - +

    Check for a sourceMap position

    @@ -717,11 +744,11 @@ Modified to handle sourceMap

  • -
  • +
  • - +

    Map of filenames -> sourceMap object.

    @@ -732,11 +759,11 @@ Modified to handle sourceMap

  • -
  • +
  • - +

    Generates the source map for a coffee file and stores it in the local cache variable.

    @@ -744,18 +771,18 @@ Modified to handle sourceMap

    getSourceMap = (filename) ->
       return sourceMaps[filename] if sourceMaps[filename]
    -  return unless path?.extname(filename) in exports.FILE_EXTENSIONS
    -  answer = exports._compileFile filename, true
    +  return unless path?.extname(filename) in exports.FILE_EXTENSIONS
    +  answer = exports._compileFile filename, true
       sourceMaps[filename] = answer.sourceMap
  • -
  • +
  • - +

    Based on michaelficarra/CoffeeScriptRedux NodeJS / V8 have no support for transforming positions in stack traces using @@ -764,14 +791,14 @@ positions.

    -
    Error.prepareStackTrace = (err, stack) ->
    -  getSourceMapping = (filename, line, column) ->
    +            
    Error.prepareStackTrace = (err, stack) ->
    +  getSourceMapping = (filename, line, column) ->
         sourceMap = getSourceMap filename
         answer = sourceMap.sourceLocation [line - 1, column - 1] if sourceMap
         if answer then [answer[0] + 1, answer[1] + 1] else null
     
       frames = for frame in stack
    -    break if frame.getFunction() is exports.run
    +    break if frame.getFunction() is exports.run
         "  at #{formatSourcePosition frame, getSourceMapping}"
     
       "#{err.toString()}\n#{frames.join '\n'}\n"
    diff --git a/documentation/docs/command.html b/documentation/docs/command.html index 2154346a..f863680e 100644 --- a/documentation/docs/command.html +++ b/documentation/docs/command.html @@ -141,7 +141,6 @@ path = require require './helpers' optparse = require './optparse' CoffeeScript = require './coffee-script' -mkdirp = require 'mkdirp' {spawn, exec} = require 'child_process' {EventEmitter} = require 'events' @@ -161,11 +160,11 @@ useWinPathSep = path.sep is
    helpers.extend CoffeeScript, new EventEmitter
    -
    -printLine = (line) -> process.stdout.write line + '\n'
    +
    +printLine = (line) -> process.stdout.write line + '\n'
     printWarn = (line) -> process.stderr.write line + '\n'
    -
    -hidden = (file) -> /^\.|~$/.test file
    + +hidden = (file) -> /^\.|~$/.test file
  • @@ -254,7 +253,7 @@ Many flags cause us to divert before compiling anything. Flags passed after
    -
    exports.run = ->
    +            
    exports.run = ->
       parseOptions()
    @@ -357,8 +356,8 @@ extension source files in it and all subdirectories.

    compileScript(source, code.toString(), base) else notSources[source] = yes - -findDirectoryIndex = (source) -> + +findDirectoryIndex = (source) -> for ext in CoffeeScript.FILE_EXTENSIONS index = path.join source, "index#{ext}" try @@ -461,9 +460,9 @@ them together.

    joinTimeout = null
     compileJoin = ->
       return unless opts.join
    -  unless sourceCode.some((code) -> code is null)
    -    clearTimeout joinTimeout
    -    joinTimeout = wait 100, ->
    +  unless sourceCode.some((code) -> code is null)
    +    clearTimeout joinTimeout
    +    joinTimeout = wait 100, ->
           compileScript opts.join, sourceCode.join('\n'), opts.join
    @@ -485,8 +484,8 @@ such as --print.

    watcher = null prevStats = null compileTimeout = null - - watchErr = (err) -> + + watchErr = (err) -> throw err unless err.code is 'ENOENT' return unless source in sources try @@ -495,8 +494,8 @@ such as --print.

    catch removeSource source, base compileJoin() - - compile = -> + + compile = -> clearTimeout compileTimeout compileTimeout = wait 25, -> fs.stat source, (err, stats) -> @@ -509,15 +508,15 @@ such as --print.

    return watchErr err if err compileScript(source, code.toString(), base) rewatch() - - startWatcher = -> + + startWatcher = -> watcher = fs.watch source .on 'change', compile .on 'error', (err) -> throw err unless err.code is 'EPERM' removeSource source, base - - rewatch = -> + + rewatch = -> watcher?.close() startWatcher() @@ -542,8 +541,8 @@ such as --print.

    watchDir = (source, base) ->
       watcher        = null
       readdirTimeout = null
    -
    -  startWatcher = ->
    +
    +  startWatcher = ->
         watcher = fs.watch source
         .on 'error', (err) ->
           throw err unless err.code is 'EPERM'
    @@ -558,8 +557,8 @@ such as --print.

    return stopWatcher() for file in files compilePath (path.join source, file), no, base - - stopWatcher = -> + + stopWatcher = -> watcher.close() removeSourceDir source, base @@ -568,8 +567,8 @@ such as --print.

    startWatcher() catch err throw err unless err.code is 'ENOENT' - -removeSourceDir = (source, base) -> + +removeSourceDir = (source, base) -> delete watchedDirs[source] sourcesChanged = no for file in sources when source is path.dirname file @@ -599,8 +598,8 @@ the compiled JS version as well.

    silentUnlink outputPath source, base silentUnlink outputPath source, base, '.js.map' timeLog "removed #{source}" - -silentUnlink = (path) -> + +silentUnlink = (path) -> try fs.unlinkSync path catch err @@ -639,6 +638,32 @@ the compiled JS version as well.

    +

    Recursively mkdir, like mkdir -p.

    + +
    + +
    mkdirp = (dir, fn) ->
    +  mode = 0o777 & ~process.umask()
    +
    +  do mkdirs = (p = dir, fn) ->
    +    fs.exists p, (exists) ->
    +      if exists
    +        fn()
    +      else
    +        mkdirs path.dirname(p), ->
    +          fs.mkdir p, mode, (err) ->
    +            return fn err if err
    +            fn()
    + + + + +
  • +
    + +
    + +

    Write out a JavaScript source file with the compiled code. By default, files are written out in cwd as .js files with the same name, but the output directory can be customized with --output.

    @@ -650,7 +675,7 @@ same directory as the .js file.

    writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
       sourceMapPath = outputPath sourcePath, base, ".js.map"
       jsDir  = path.dirname jsPath
    -  compile = ->
    +  compile = ->
         if opts.compile
           js = ' ' if js.length <= 0
           if generatedSourceMap then js = "#{js}\n//# sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n"
    @@ -671,11 +696,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    Convenience for cleaner setTimeouts.

    @@ -686,11 +711,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    When watching scripts, it’s useful to log changes with the timestamp.

    @@ -702,11 +727,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    Pretty-print a stream of tokens, sans location data.

    @@ -722,11 +747,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    Use the OptionParser module to extract all options from process.argv that are specified in SWITCHES.

    @@ -743,11 +768,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    The compile-time options to pass to the CoffeeScript compiler.

    @@ -782,11 +807,11 @@ same directory as the .js file.

  • -
  • +
  • - +

    Start up a new Node.js instance with the arguments in --nodejs passed to the node binary, preserving the other options.

    @@ -806,11 +831,11 @@ the node binary, preserving the other options.

  • -
  • +
  • - +

    Print the --help usage message and exit. Deprecated switches are not shown.

    @@ -823,11 +848,11 @@ shown.

  • -
  • +
  • - +

    Print the --version message and exit.

    diff --git a/documentation/docs/grammar.html b/documentation/docs/grammar.html index 811bdded..48cfdf66 100644 --- a/documentation/docs/grammar.html +++ b/documentation/docs/grammar.html @@ -243,7 +243,7 @@ just be passed through unaffected.

    -
      addLocationDataFn = (first, last) ->
    +            
      addLocationDataFn = (first, last) ->
         if not last
           "yy.addLocationDataFn(@#{first})"
         else
    @@ -1247,7 +1247,8 @@ or postfix, with a single expression.

    ] ForBody: [ - o 'FOR Range', -> source: LOC(2) new Value($2) + o 'FOR Range', -> source: (LOC(2) new Value($2)) + o 'FOR Range BY Expression', -> source: (LOC(2) new Value($2)), step: $4 o 'ForStart ForSource', -> $2.own = $1.own; $2.name = $1[0]; $2.index = $1[1]; $2 ] @@ -1416,6 +1417,9 @@ rules are necessary.

    o 'UNARY_MATH Expression', -> new Op $1 , $2 o '- Expression', (-> new Op '-', $2), prec: 'UNARY_MATH' o '+ Expression', (-> new Op '+', $2), prec: 'UNARY_MATH' + o 'YIELD Statement', -> new Op $1 , $2 + o 'YIELD Expression', -> new Op $1 , $2 + o 'YIELD FROM Expression', -> new Op $1.concat($2) , $3 o '-- SimpleAssignable', -> new Op '--', $2 o '++ SimpleAssignable', -> new Op '++', $2 @@ -1517,6 +1521,7 @@ down. Following these rules is what makes 2 + 3 * 4 parse as:

    ['left', 'COMPARE'] ['left', 'LOGIC'] ['nonassoc', 'INDENT', 'OUTDENT'] + ['right', 'YIELD'] ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'] ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'] ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'] @@ -1588,7 +1593,7 @@ precedence from low to high, and we have it high to low
    -
    exports.parser = new Parser
    +            
    exports.parser = new Parser
       tokens      : tokens.join ' '
       bnf         : grammar
       operators   : operators.reverse()
    diff --git a/documentation/docs/helpers.html b/documentation/docs/helpers.html
    index 1d185576..d123ef78 100644
    --- a/documentation/docs/helpers.html
    +++ b/documentation/docs/helpers.html
    @@ -134,7 +134,7 @@ arrays, count characters, that sort of thing.

    -
    exports.starts = (string, literal, start) ->
    +            
    exports.starts = (string, literal, start) ->
       literal is string.substr start, literal.length
  • @@ -150,7 +150,7 @@ arrays, count characters, that sort of thing.

    -
    exports.ends = (string, literal, back) ->
    +            
    exports.ends = (string, literal, back) ->
       len = literal.length
       literal is string.substr string.length - len - (back or 0), len
    @@ -167,7 +167,7 @@ arrays, count characters, that sort of thing.

    -
    exports.repeat = repeat = (str, n) ->
    +
    exports.repeat = repeat = (str, n) ->
    @@ -202,7 +202,7 @@ arrays, count characters, that sort of thing.

    -
    exports.compact = (array) ->
    +            
    exports.compact = (array) ->
       item for item in array when item
    @@ -218,7 +218,7 @@ arrays, count characters, that sort of thing.

    -
    exports.count = (string, substr) ->
    +            
    exports.count = (string, substr) ->
       num = pos = 0
       return 1/0 unless substr.length
       num++ while pos = 1 + string.indexOf substr, pos
    @@ -239,7 +239,7 @@ options hash to propagate down the tree without polluting other branches.

    -
    exports.merge = (options, overrides) ->
    +            
    exports.merge = (options, overrides) ->
       extend (extend {}, options), overrides
    @@ -255,7 +255,7 @@ options hash to propagate down the tree without polluting other branches.

    -
    extend = exports.extend = (object, properties) ->
    +            
    extend = exports.extend = (object, properties) ->
       for key, val of properties
         object[key] = val
       object
    @@ -274,7 +274,7 @@ Handy for getting a list of children from the nodes.

    -
    exports.flatten = flatten = (array) ->
    +            
    exports.flatten = flatten = (array) ->
       flattened = []
       for element in array
         if element instanceof Array
    @@ -297,7 +297,7 @@ looking for a particular method in an options hash.

    -
    exports.del = (obj, key) ->
    +            
    exports.del = (obj, key) ->
       val =  obj[key]
       delete obj[key]
       val
    @@ -315,7 +315,7 @@ looking for a particular method in an options hash.

    -
    exports.last = last = (array, back) -> array[array.length - (back or 0) - 1]
    +
    exports.last = last = (array, back) -> array[array.length - (back or 0) - 1]
    @@ -330,7 +330,7 @@ looking for a particular method in an options hash.

    -
    exports.some = Array::some ? (fn) ->
    +            
    exports.some = Array::some ? (fn) ->
       return true for e in this when fn e
       false
    @@ -349,7 +349,7 @@ can be compiled “normally”.

    -
    exports.invertLiterate = (code) ->
    +            
    exports.invertLiterate = (code) ->
       maybe_code = true
       lines = for line in code.split('\n')
         if maybe_code and /^([ ]{4}|[ ]{0,3}\t)/.test line
    @@ -398,8 +398,8 @@ The object is returned either way.

    -
    exports.addLocationDataFn = (first, last) ->
    -  (obj) ->
    +            
    exports.addLocationDataFn = (first, last) ->
    +  (obj) ->
         if ((typeof obj) is 'object') and (!!obj['updateLocationDataIfMissing'])
           obj.updateLocationDataIfMissing buildLocationData(first, last)
     
    @@ -419,7 +419,7 @@ The object is returned either way.

    -
    exports.locationDataToString = (obj) ->
    +            
    exports.locationDataToString = (obj) ->
       if ("2" of obj) and ("first_line" of obj[2]) then locationData = obj[2]
       else if "first_line" of obj then locationData = obj
     
    @@ -442,8 +442,8 @@ The object is returned either way.

    -
    exports.baseFileName = (file, stripExt = no, useWinPathSep = no) ->
    -  pathSep = if useWinPathSep then /\\|\// else /\//
    +            
    exports.baseFileName = (file, stripExt = no, useWinPathSep = no) ->
    +  pathSep = if useWinPathSep then /\\|\// else /\//
       parts = file.split(pathSep)
       file = parts[parts.length - 1]
       return file unless stripExt and file.indexOf('.') >= 0
    @@ -465,7 +465,7 @@ The object is returned either way.

    -
    exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file
    +
    exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file
    @@ -480,7 +480,7 @@ The object is returned either way.

    -
    exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
    +
    exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
    @@ -498,7 +498,7 @@ marker showing where the error is.

    -
    exports.throwSyntaxError = (message, location) ->
    +            
    exports.throwSyntaxError = (message, location) ->
       error = new SyntaxError message
       error.location = location
       error.toString = syntaxErrorToString
    @@ -536,7 +536,7 @@ it already.

    -
    exports.updateSyntaxError = (error, code, filename) ->
    +
    exports.updateSyntaxError = (error, code, filename) ->
    @@ -556,8 +556,8 @@ it already.

    error.filename or= filename error.stack = error.toString() error - -syntaxErrorToString = -> + +syntaxErrorToString = -> return Error::toString.call @ unless @code and @location {first_line, first_column, last_line, last_column} = @location @@ -601,7 +601,7 @@ it already.

    colorsEnabled = process.stdout.isTTY and not process.env.NODE_DISABLE_COLORS if @colorful ? colorsEnabled - colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m" + colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m" codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..] marker = colorize marker @@ -611,7 +611,7 @@ it already.

    #{marker} """ -exports.nameWhitespaceCharacter = (string) -> +exports.nameWhitespaceCharacter = (string) -> switch string when ' ' then 'space' when '\n' then 'newline' diff --git a/documentation/docs/index.html b/documentation/docs/index.html index dc584cda..9c9821c5 100644 --- a/documentation/docs/index.html +++ b/documentation/docs/index.html @@ -119,7 +119,7 @@
    -
    exports[key] = val for key, val of require './coffee-script'
    +
    exports[key] = val for key, val of require './coffee-script'
    diff --git a/documentation/docs/lexer.html b/documentation/docs/lexer.html index e08cd870..56246675 100644 --- a/documentation/docs/lexer.html +++ b/documentation/docs/lexer.html @@ -185,7 +185,7 @@ pushing some extra smarts into the Lexer.

    -
    exports.Lexer = class Lexer
    +
    exports.Lexer = class Lexer
    @@ -203,8 +203,7 @@ remaining code, or a custom recursive token-matching method within the code past the token, and begin again.

    Each tokenizing method is responsible for returning the number of characters it has consumed.

    -

    Before returning the token stream, run it through the Rewriter -unless explicitly asked not to.

    +

    Before returning the token stream, run it through the Rewriter.

    @@ -246,7 +245,6 @@ short-circuiting if any of them succeed. Their order determines precedence: @commentToken() or @whitespaceToken() or @lineToken() or - @heredocToken() or @stringToken() or @numberToken() or @regexToken() or @@ -270,8 +268,10 @@ short-circuiting if any of them succeed. Their order determines precedence: i += consumed + return {@tokens, index: i} if opts.untilBalanced and @ends.length is 0 + @closeIndentation() - @error "missing #{tag}" if tag = @ends.pop() + throwSyntaxError "missing #{end.tag}", end.origin[2] if end = @ends.pop() return @tokens if opts.rewrite is off (new Rewriter).rewrite @tokens
    @@ -365,6 +365,9 @@ though is means === otherwise.

    if id is 'own' and @tag() is 'FOR' @token 'OWN', id return id.length + if id is 'from' and @tag() is 'YIELD' + @token 'FROM', id + return id.length forcedIdentifier = colon or (prev = last @tokens) and (prev[0] in ['.', '?.', '::', '?::'] or not prev.spaced and prev[0] is '@') @@ -409,6 +412,7 @@ though is means === otherwise.

    else tag tagToken = @token tag, id, 0, idLength + tagToken.variable = not forcedIdentifier if poppedToken [tagToken[2].first_line, tagToken[2].first_column] = [poppedToken[2].first_line, poppedToken[2].first_column] @@ -460,28 +464,26 @@ Be careful not to interfere with ranges-in-progress.

    -

    Matches strings, including multi-line strings. Ensures that quotation marks -are balanced within the string’s contents, and within nested interpolations.

    +

    Matches strings, including multi-line strings, as well as heredocs, with or without +interpolation.

      stringToken: ->
    -    switch quote = @chunk.charAt 0
    -      when "'" then [string] = SIMPLESTR.exec(@chunk) || []
    -      when '"' then string = @balancedString @chunk, '"'
    -    return 0 unless string
    -    inner = string[1...-1]
    -    trimmed = @removeNewlines inner
    -    if quote is '"' and 0 < string.indexOf '#{', 1
    -      numBreak = pos = 0
    -      innerLen = inner.length
    -      numBreak++ while inner.charAt(pos++) is '\n' and pos < innerLen
    -      @interpolateString trimmed, strOffset: 1 + numBreak, lexedLength: string.length
    -    else
    -      @token 'STRING', quote + @escapeLines(trimmed) + quote, 0, string.length
    -    if octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test string
    -      @error "octal escape sequences #{string} are not allowed"
    -    string.length
    + [quote] = STRING_START.exec(@chunk) || [] + return 0 unless quote + regex = switch quote + when "'" then STRING_SINGLE + when '"' then STRING_DOUBLE + when "'''" then HEREDOC_SINGLE + when '"""' then HEREDOC_DOUBLE + heredoc = quote.length is 3 + + start = quote.length + {tokens, index: end} = @matchWithInterpolations @chunk[start..], regex, quote, start + $ = tokens.length - 1 + + if heredoc
    @@ -492,22 +494,35 @@ are balanced within the string’s contents, and within nested interpolations.
    -

    Matches heredocs, adjusting indentation to the correct level, as heredocs -preserve whitespace, but ignore indentation to the left.

    +

    Find the smallest indentation. It will be removed from all lines later.

    -
      heredocToken: ->
    -    return 0 unless match = HEREDOC.exec @chunk
    -    heredoc = match[0]
    -    quote = heredoc.charAt 0
    -    doc = @sanitizeHeredoc match[2], quote: quote, indent: null
    -    if quote is '"' and 0 <= doc.indexOf '#{'
    -      strOffset = if match[2].charAt(0) is '\n' then 4 else 3
    -      @interpolateString doc, heredoc: yes, strOffset: strOffset, lexedLength: heredoc.length
    +            
          indent = null
    +      doc = (token[1] for token, i in tokens when token[0] is 'NEOSTRING').join '#{}'
    +      while match = HEREDOC_INDENT.exec doc
    +        attempt = match[1]
    +        indent = attempt if indent is null or 0 < attempt.length < indent.length
    +      indentRegex = /// ^#{indent} ///gm if indent
    +      @mergeInterpolationTokens tokens, {quote: quote[0], start, end}, (value, i) =>
    +        value = @formatString value
    +        value = value.replace LEADING_BLANK_LINE,  '' if i is 0
    +        value = value.replace TRAILING_BLANK_LINE, '' if i is $
    +        value = value.replace indentRegex, ''
    +        value = value.replace MULTILINER, '\\n'
    +        value
         else
    -      @token 'STRING', @makeString(doc, quote, yes), 0, heredoc.length
    -    heredoc.length
    + @mergeInterpolationTokens tokens, {quote, start, end}, (value, i) => + value = @formatString value + value = value.replace STRING_OMIT, (match, offset) -> + if (i is 0 and offset is 0) or + (i is $ and offset + match.length is value.length) + '' + else + ' ' + value + + end
    @@ -526,10 +541,11 @@ preserve whitespace, but ignore indentation to the left.

    return 0 unless match = @chunk.match COMMENT [comment, here] = match if here - @token 'HERECOMMENT', - (@sanitizeHeredoc here, - herecomment: true, indent: repeat ' ', @indent), - 0, comment.length + if match = HERECOMMENT_ILLEGAL.exec comment + @error "block comments cannot contain #{match[0]}", match.index + if here.indexOf('\n') >= 0 + here = here.replace /// \n #{repeat ' ', @indent} ///g, '\n' + @token 'HERECOMMENT', here, 0, comment.length comment.length
    @@ -559,20 +575,53 @@ preserve whitespace, but ignore indentation to the left.

    -

    Matches regular expression literals. Lexing regular expressions is difficult -to distinguish from division, so we borrow some basic heuristics from -JavaScript and Ruby.

    +

    Matches regular expression literals, as well as multiline extended ones. +Lexing regular expressions is difficult to distinguish from division, so we +borrow some basic heuristics from JavaScript and Ruby.

      regexToken: ->
    -    return 0 if @chunk.charAt(0) isnt '/'
    -    return length if length = @heregexToken()
    +    switch
    +      when match = REGEX_ILLEGAL.exec @chunk
    +        @error "regular expressions cannot begin with #{match[2]}", match.index + match[1].length
    +      when @chunk[...3] is '///'
    +        {tokens, index} = @matchWithInterpolations @chunk[3..], HEREGEX, '///', 3
    +      when match = REGEX.exec @chunk
    +        [regex, closed] = match
    +        index = regex.length
    +        prev = last @tokens
    +        if prev
    +          if prev.spaced and prev[0] in CALLABLE and not prev.stringEnd and not prev.regexEnd
    +            return 0 if not closed or POSSIBLY_DIVISION.test regex
    +          else if prev[0] in NOT_REGEX
    +            return 0
    +        @error 'missing / (unclosed regex)' unless closed
    +      else
    +        return 0
     
    -    prev = last @tokens
    -    return 0 if prev and (prev[0] in (if prev.spaced then NOT_REGEX else NOT_SPACED_REGEX))
    -    return 0 unless match = REGEX.exec @chunk
    -    [match, regex, flags] = match
    + [flags] = REGEX_FLAGS.exec @chunk[index..] + end = index + flags.length + switch + when not VALID_FLAGS.test flags + @error "invalid regular expression flags #{flags}", index + when regex + @token 'REGEX', "#{regex}#{flags}" + when tokens.length is 1 + re = @formatHeregex(tokens[0][1]).replace(/\//g, '\\/') + @token 'REGEX', "/#{ re or '(?:)' }/#{flags}" + else + @token 'IDENTIFIER', 'RegExp', 0, 0 + @token 'CALL_START', '(', 0, 0 + @mergeInterpolationTokens tokens, {quote: '"', start: 3, end}, (value) => + @formatHeregex(value).replace(/\\/g, '\\\\') + if flags + @token ',', ',', index, 0 + @token 'STRING', '"' + flags + '"', index, flags.length + rparen = @token ')', ')', end, 0 + rparen.regexEnd = true + + end
    @@ -583,123 +632,6 @@ JavaScript and Ruby.

    -

    Avoid conflicts with floor division operator.

    - -
    - -
        return 0 if regex is '//'
    -    if regex[..1] is '/*' then @error 'regular expressions cannot begin with `*`'
    -    @token 'REGEX', "#{regex}#{flags}", 0, match.length
    -    match.length
    - - - - -
  • -
    - -
    - -
    -

    Matches multiline extended regular expressions.

    - -
    - -
      heregexToken: ->
    -    return 0 unless match = HEREGEX.exec @chunk
    -    [heregex, body, flags] = match
    -    if 0 > body.indexOf '#{'
    -      re = @escapeLines body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), yes
    -      if re.match /^\*/ then @error 'regular expressions cannot begin with `*`'
    -      @token 'REGEX', "/#{ re or '(?:)' }/#{flags}", 0, heregex.length
    -      return heregex.length
    -    @token 'IDENTIFIER', 'RegExp', 0, 0
    -    @token 'CALL_START', '(', 0, 0
    -    tokens = []
    -    for token in @interpolateString(body, regex: yes, strOffset: 3)
    -      [tag, value] = token
    -      if tag is 'TOKENS'
    -        tokens.push value...
    -      else if tag is 'NEOSTRING'
    -        continue unless value = value.replace HEREGEX_OMIT, '$1$2'
    -
    - -
  • - - -
  • -
    - -
    - -
    -

    Convert NEOSTRING into STRING

    - -
    - -
            value = value.replace /\\/g, '\\\\'
    -        token[0] = 'STRING'
    -        token[1] = @makeString(value, '"', yes)
    -        tokens.push token
    -      else
    -        @error "Unexpected #{tag}"
    -
    -      prev = last @tokens
    -      plusToken = ['+', '+']
    -      plusToken[2] = prev[2] # Copy location data
    -      tokens.push plusToken
    - -
  • - - -
  • -
    - -
    - -
    -

    Remove the extra “+”

    - -
    - -
        tokens.pop()
    -
    -    unless tokens[0]?[0] is 'STRING'
    -      @token 'STRING', '""', 0, 0
    -      @token '+', '+', 0, 0
    -    @tokens.push tokens...
    -
    -    if flags
    - -
  • - - -
  • -
    - -
    - -
    -

    Find the flags in the heregex

    - -
    - -
          flagsOffset = heregex.lastIndexOf flags
    -      @token ',', ',', flagsOffset, 0
    -      @token 'STRING', '"' + flags + '"', flagsOffset, flags.length
    -
    -    @token ')', ')', heregex.length-1, 0
    -    heregex.length
    - -
  • - - -
  • -
    - -
    - -

    Matches newlines, indents, and outdents, and determines which is which. If we can detect that the current line is continued onto the the next line, then the newline is suppressed:

    @@ -732,7 +664,7 @@ can close multiple indents, so we need to know how far in we happen to be.

    diff = size - @indent + @outdebt @token 'INDENT', diff, indent.length - size, size @indents.push diff - @ends.push 'OUTDENT' + @ends.push {tag: 'OUTDENT'} @outdebt = @indebt = 0 @indent = size else if size < @baseIndent @@ -745,11 +677,11 @@ can close multiple indents, so we need to know how far in we happen to be.

  • -
  • +
  • - +

    Record an outdent token or multiple tokens, if we happen to be moving back inwards past several recorded indents. Sets new @indent value.

    @@ -778,11 +710,11 @@ inwards past several recorded indents. Sets new @indent value.

  • -
  • +
  • - +

    pair might call outdentToken, so preserve decreasedIndent

    @@ -801,11 +733,11 @@ inwards past several recorded indents. Sets new @indent value.

  • -
  • +
  • - +

    Matches and consumes non-meaningful whitespace. Tag the previous token as being “spaced”, because there are some cases where it makes a difference.

    @@ -822,11 +754,11 @@ as being “spaced”, because there are some cases where it makes a difference.
  • -
  • +
  • - +

    Generate a newline token. Consecutive newlines get merged together.

    @@ -840,11 +772,11 @@ as being “spaced”, because there are some cases where it makes a difference.
  • -
  • +
  • - +

    Use a \ at a line-ending to suppress the newline. The slash is removed here once its job is done.

    @@ -858,11 +790,11 @@ The slash is removed here once its job is done.

  • -
  • +
  • - +

    We treat all other single characters as a token. E.g.: ( ) , . ! Multi-character operators are also literal tokens, so that Jison can assign @@ -898,27 +830,28 @@ parentheses that indicate a method call from regular parentheses, and so on.

    else if value in SHIFT then tag = 'SHIFT' else if value in LOGIC or value is '?' and prev?.spaced then tag = 'LOGIC' else if prev and not prev.spaced - if value is '(' and prev[0] in CALLABLE + if value is '(' and prev[0] in CALLABLE and not prev.stringEnd and not prev.regexEnd prev[0] = 'FUNC_EXIST' if prev[0] is '?' tag = 'CALL_START' else if value is '[' and prev[0] in INDEXABLE tag = 'INDEX_START' switch prev[0] when '?' then prev[0] = 'INDEX_SOAK' + token = @makeToken tag, value switch value - when '(', '{', '[' then @ends.push INVERSES[value] + when '(', '{', '[' then @ends.push {tag: INVERSES[value], origin: token} when ')', '}', ']' then @pair value - @token tag, value + @tokens.push token value.length
  • -
  • +
  • - +

    Token Manipulators

    @@ -927,11 +860,11 @@ parentheses that indicate a method call from regular parentheses, and so on.

  • -
  • +
  • - +
    @@ -939,39 +872,11 @@ parentheses that indicate a method call from regular parentheses, and so on.

  • -
  • +
  • - -
    -

    Sanitize a heredoc or herecomment by -erasing all external indentation on the left-hand side.

    - -
    - -
      sanitizeHeredoc: (doc, options) ->
    -    {indent, herecomment} = options
    -    if herecomment
    -      if HEREDOC_ILLEGAL.test doc
    -        @error "block comment cannot contain \"*/\", starting"
    -      return doc if doc.indexOf('\n') < 0
    -    else
    -      while match = HEREDOC_INDENT.exec doc
    -        attempt = match[1]
    -        indent = attempt if indent is null or 0 < attempt.length < indent.length
    -    doc = doc.replace /// \n #{indent} ///g, '\n' if indent
    -    doc = doc.replace /^\n/, '' unless herecomment
    -    doc
    - -
  • - - -
  • -
    - -
    - +

    A source of ambiguity in our grammar used to be parameter lists in function definitions versus argument lists in function calls. Walk backwards, tagging @@ -1000,11 +905,11 @@ parameters specially in order to make things easier for the parser.

  • -
  • +
  • - +

    Close up all remaining open blocks at the end of the file.

    @@ -1016,46 +921,146 @@ parameters specially in order to make things easier for the parser.

  • +
  • +
    + +
    + +
    +

    Match the contents of a delimited token and expand variables and expressions +inside it using Ruby-like notation for substitution of arbitrary +expressions.

    +
    "Hello #{name.capitalize()}."
    +

    If it encounters an interpolation, this method will recursively create a new +Lexer and tokenize until the { of #{ is balanced with a }.

    +
      +
    • str is the start of the token contents (with the starting delimiter +stripped off.)
    • +
    • regex matches the contents of a token (but not end, and not #{ if +interpolations are desired).
    • +
    • end is the terminator of the token.
    • +
    • offsetInChunk is the start of the interpolated string in the current +chunk, including the starting delimiter.
    • +
    +

    Examples of delimiters are ', ", ''', """ and ///.

    +

    This method allows us to have strings within interpolations within strings, +ad infinitum.

    + +
    + +
      matchWithInterpolations: (str, regex, end, offsetInChunk) ->
    +    tokens = []
    +    loop
    +      [strPart] = regex.exec str
    + +
  • + + +
  • +
    + +
    + +
    +

    Push a fake ‘NEOSTRING’ token, which will get turned into a real string later.

    + +
    + +
          tokens.push @makeToken 'NEOSTRING', strPart, offsetInChunk
    +
    +      str = str[strPart.length..]
    +      offsetInChunk += strPart.length
    +
    +      break unless str[...2] is '#{'
    + +
  • + + +
  • +
    + +
    + +
    +

    The 1s are to remove the # in #{.

    + +
    + +
          [line, column] = @getLineAndColumnFromChunk offsetInChunk + 1
    +      {tokens: nested, index} =
    +        new Lexer().tokenize str[1..], line: line, column: column, untilBalanced: on
    + +
  • + + +
  • +
    + +
    + +
    +

    Skip the trailing }.

    + +
    + +
          index += 1
    + +
  • + + +
  • +
    + +
    + +
    +

    Turn the leading and trailing { and } into parentheses. Unnecessary +parentheses will be removed later.

    + +
    + +
          [open, ..., close] = nested
    +      open[0]  = open[1]  = '('
    +      close[0] = close[1] = ')'
    +      close.origin = ['', 'end of interpolation', close[2]]
    + +
  • + + +
  • +
    + +
    + +
    +

    Remove leading ‘TERMINATOR’ (if any).

    + +
    + +
          nested.splice 1, 1 if nested[1]?[0] is 'TERMINATOR'
    + +
  • + +
  • -

    Matches a balanced group such as a single or double-quoted string. Pass in -a series of delimiters, all of which must be nested correctly within the -contents of the string. This method allows us to have strings within -interpolations within strings, ad infinitum.

    +

    Push a fake ‘TOKENS’ token, which will get turned into real tokens later.

    -
      balancedString: (str, end) ->
    -    continueCount = 0
    -    stack = [end]
    -    for i in [1...str.length]
    -      if continueCount
    -        --continueCount
    -        continue
    -      switch letter = str.charAt i
    -        when '\\'
    -          ++continueCount
    -          continue
    -        when end
    -          stack.pop()
    -          unless stack.length
    -            return str[0..i]
    -          end = stack[stack.length - 1]
    -          continue
    -      if end is '}' and letter in ['"', "'"]
    -        stack.push end = letter
    -      else if end is '}' and letter is '/' and match = (HEREGEX.exec(str[i..]) or REGEX.exec(str[i..]))
    -        continueCount += match[0].length - 1
    -      else if end is '}' and letter is '{'
    -        stack.push end = '}'
    -      else if end is '"' and prev is '#' and letter is '{'
    -        stack.push end = '}'
    -      prev = letter
    -    @error "missing #{ stack.pop() }, starting"
    +
          tokens.push ['TOKENS', nested]
    +
    +      str = str[index..]
    +      offsetInChunk += index
    +
    +    unless str[...end.length] is end
    +      @error "missing #{end}"
    +
    +    {tokens, index: offsetInChunk + end.length}
  • @@ -1066,31 +1071,24 @@ interpolations within strings, ad infinitum.

    -

    Expand variables and expressions inside double-quoted strings using -Ruby-like notation for substitution of arbitrary expressions.

    -
    "Hello #{name.capitalize()}."
    -

    If it encounters an interpolation, this method will recursively create a -new Lexer, tokenize the interpolated contents, and merge them into the -token stream.

    -
      -
    • str is the start of the string contents (IE with the “ or “”” stripped -off.)
    • -
    • options.offsetInChunk is the start of the interpolated string in the -current chunk, including the “ or “””, etc… If not provided, this is -assumed to be 0. options.lexedLength is the length of the -interpolated string, including both the start and end quotes. Both of these -values are ignored if options.regex is true.
    • -
    • options.strOffset is the offset of str, relative to the start of the -current chunk.
    • -
    +

    Merge the array tokens of the fake token types ‘TOKENS’ and ‘NEOSTRING’ +(as returned by matchWithInterpolations) into the token stream. The value +of ‘NEOSTRING’s are converted using fn and turned into strings using +quote first. The tokens are wrapped in parentheses if needed, using +start and end for their location data.

    -
      interpolateString: (str, options = {}) ->
    -    {heredoc, regex, offsetInChunk, strOffset, lexedLength} = options
    -    offsetInChunk ||= 0
    -    strOffset ||= 0
    -    lexedLength ||= str.length
    +
      mergeInterpolationTokens: (tokens, {quote, start, end}, fn) ->
    +    if interpolated = tokens.length > 1
    +      errorToken = @makeToken '', 'interpolation', start + tokens[0][1].length, 2
    +      @token '(', '(', 0, 0, errorToken
    +
    +    firstIndex = @tokens.length
    +    for token, i in tokens
    +      [tag, value] = token
    +      switch tag
    +        when 'TOKENS'
    @@ -1101,20 +1099,11 @@ current chunk.
    -

    Parse the string.

    +

    Optimize out empty interpolations (an empty pair of parentheses).

    -
        tokens = []
    -    pi = 0
    -    i  = -1
    -    while letter = str.charAt i += 1
    -      if letter is '\\'
    -        i += 1
    -        continue
    -      unless letter is '#' and str.charAt(i+1) is '{' and
    -             (expr = @balancedString str[i + 1..], '}')
    -        continue
    +
              continue if value.length is 2
    @@ -1125,23 +1114,14 @@ current chunk.
    -

    NEOSTRING is a fake token. This will be converted to a string below.

    +

    Push all the tokens in the fake ‘TOKENS’ token. These already have +sane location data.

    -
          tokens.push @makeToken('NEOSTRING', str[pi...i], strOffset + pi) if pi < i
    -      unless errorToken
    -        errorToken = @makeToken '', 'string interpolation', offsetInChunk + i + 1, 2
    -      inner = expr[1...-1]
    -      if inner.length
    -        [line, column] = @getLineAndColumnFromChunk(strOffset + i + 2)
    -        nested = new Lexer().tokenize inner, line: line, column: column, rewrite: off
    -        popped = nested.pop()
    -        popped = nested.shift() if nested[0]?[0] is 'TERMINATOR'
    -        if len = nested.length
    -          if len > 1
    -            nested.unshift @makeToken '(', '(', strOffset + i + 1, 0
    -            nested.push    @makeToken ')', ')', strOffset + i + 1 + inner.length, 0
    +
              locationToken = value[0]
    +          tokensToPush = value
    +        when 'NEOSTRING'
    @@ -1152,14 +1132,11 @@ current chunk.
    -

    Push a fake ‘TOKENS’ token, which will get turned into real tokens below.

    +

    Convert ‘NEOSTRING’ into ‘STRING’.

    -
              tokens.push ['TOKENS', nested]
    -      i += expr.length
    -      pi = i + 1
    -    tokens.push @makeToken('NEOSTRING', str[pi..], strOffset + pi) if i > pi < str.length
    +
              converted = fn token[1], i
    @@ -1170,11 +1147,17 @@ current chunk.
    -

    If regex, then return now and let the regex code deal with all these fake tokens

    +

    Optimize out empty strings. We ensure that the tokens stream always +starts with a string token, though, to make sure that the result +really is a string.

    -
        return tokens if regex
    +
              if converted.length is 0
    +            if i is 0
    +              firstEmptyStringIndex = @tokens.length
    +            else
    +              continue
    @@ -1185,11 +1168,18 @@ current chunk.
    -

    If we didn’t find any tokens, then just return an empty string.

    +

    However, there is one case where we can optimize away a starting +empty string.

    -
        return @token 'STRING', '""', offsetInChunk, lexedLength unless tokens.length
    +
              if i is 2 and firstEmptyStringIndex?
    +            @tokens.splice firstEmptyStringIndex, 2 # Remove empty string and the plus.
    +          token[0] = 'STRING'
    +          token[1] = @makeString converted, quote
    +          locationToken = token
    +          tokensToPush = [token]
    +      if @tokens.length > firstIndex
    @@ -1200,14 +1190,21 @@ current chunk.
    -

    If the first token is not a string, add a fake empty string to the beginning.

    +

    Create a 0-length “+” token.

    -
        tokens.unshift @makeToken('NEOSTRING', '', offsetInChunk) unless tokens[0][0] is 'NEOSTRING'
    +            
            plusToken = @token '+', '+'
    +        plusToken[2] =
    +          first_line:   locationToken[2].first_line
    +          first_column: locationToken[2].first_column
    +          last_line:    locationToken[2].first_line
    +          last_column:  locationToken[2].first_column
    +      @tokens.push tokensToPush...
     
    -    if interpolated = tokens.length > 1
    -      @token '(', '(', offsetInChunk, 0, errorToken
    + if interpolated + rparen = @token ')', ')', end, 0 + rparen.stringEnd = true
    @@ -1218,13 +1215,14 @@ current chunk.
    -

    Push all the tokens

    +

    Pairs up a closing token, ensuring that all listed pairs of tokens are +correctly balanced throughout the course of the token stream.

    -
        for token, i in tokens
    -      [tag, value] = token
    -      if i
    +
      pair: (tag) ->
    +    unless tag is wanted = last(@ends)?.tag
    +      @error "unmatched #{tag}" unless 'OUTDENT' is wanted
    @@ -1235,90 +1233,9 @@ current chunk.
    -

    Create a 0-length “+” token.

    - - - -
            plusToken = @token '+', '+' if i
    -        locationToken = if tag == 'TOKENS' then value[0] else token
    -        plusToken[2] =
    -          first_line: locationToken[2].first_line
    -          first_column: locationToken[2].first_column
    -          last_line: locationToken[2].first_line
    -          last_column: locationToken[2].first_column
    -      if tag is 'TOKENS'
    - - - - -
  • -
    - -
    - -
    -

    Push all the tokens in the fake ‘TOKENS’ token. These already have -sane location data.

    - -
    - -
            @tokens.push value...
    -      else if tag is 'NEOSTRING'
    - -
  • - - -
  • -
    - -
    - -
    -

    Convert NEOSTRING into STRING

    - -
    - -
            token[0] = 'STRING'
    -        token[1] = @makeString value, '"', heredoc
    -        @tokens.push token
    -      else
    -        @error "Unexpected #{tag}"
    -    if interpolated
    -      rparen = @makeToken ')', ')', offsetInChunk + lexedLength, 0
    -      rparen.stringEnd = true
    -      @tokens.push rparen
    -    tokens
    - -
  • - - -
  • -
    - -
    - -
    -

    Pairs up a closing token, ensuring that all listed pairs of tokens are -correctly balanced throughout the course of the token stream.

    - -
    - -
      pair: (tag) ->
    -    unless tag is wanted = last @ends
    -      @error "unmatched #{tag}" unless 'OUTDENT' is wanted
    - -
  • - - -
  • -
    - -
    - -

    Auto-close INDENT to support syntax like this:

    -
    el.click((event) ->
    -  el.hide())
    +
    el.click((event) ->
    +  el.hide())
     
    @@ -1329,11 +1246,11 @@ correctly balanced throughout the course of the token stream.

  • -
  • +
  • - +

    Helpers

    @@ -1342,11 +1259,11 @@ correctly balanced throughout the course of the token stream.

  • -
  • +
  • - +
    @@ -1354,11 +1271,11 @@ correctly balanced throughout the course of the token stream.

  • -
  • +
  • - +

    Returns the line and column number from an offset into the current chunk.

    offset is a number of characters into @chunk.

    @@ -1388,11 +1305,11 @@ correctly balanced throughout the course of the token stream.

  • -
  • +
  • - +

    Same as “token”, exception this just returns the token without adding it to the results.

    @@ -1407,11 +1324,11 @@ to the results.

  • -
  • +
  • - +

    Use length - 1 for the final offset - we’re supplying the last_line and the last_column, so if last_column == first_column, then we’re looking at a character of length 1.

    @@ -1429,11 +1346,11 @@ so if last_column == first_column, then we’re looking at a character of length
  • -
  • +
  • - +

    Add a token to the results. offset is the offset into the current @chunk where the token starts. @@ -1452,11 +1369,11 @@ not specified, the length of value will be used.

  • -
  • +
  • - +

    Peek at a tag in the current token stream.

    @@ -1468,11 +1385,11 @@ not specified, the length of value will be used.

  • -
  • +
  • - +

    Peek at a value in the current token stream.

    @@ -1484,11 +1401,11 @@ not specified, the length of value will be used.

  • -
  • +
  • - +

    Are we in the midst of an unfinished expression?

    @@ -1496,103 +1413,74 @@ not specified, the length of value will be used.

      unfinished: ->
         LINE_CONTINUER.test(@chunk) or
    -    @tag() in ['\\', '.', '?.', '?::', 'UNARY', 'MATH', 'UNARY_MATH', '+', '-',
    -               '**', 'SHIFT', 'RELATION', 'COMPARE', 'LOGIC', 'THROW', 'EXTENDS']
    + @tag() in ['\\', '.', '?.', '?::', 'UNARY', 'MATH', 'UNARY_MATH', '+', '-', 'YIELD', + '**', 'SHIFT', 'RELATION', 'COMPARE', 'LOGIC', 'THROW', 'EXTENDS'] + + formatString: (str) ->
  • -
  • +
  • - +
    -

    Remove newlines from beginning and (non escaped) from end of string literals.

    +

    Ignore escaped backslashes and remove escaped newlines.

    -
      removeNewlines: (str) ->
    -    str.replace(/^\s*\n\s*/, '')
    -       .replace(/([^\\]|\\\\)\s*\n\s*$/, '$1')
    - -
  • - - -
  • -
    - -
    - -
    -

    Converts newlines for string literals.

    - -
    - -
      escapeLines: (str, heredoc) ->
    - -
  • - - -
  • -
    - -
    - -
    -

    Ignore escaped backslashes and remove escaped newlines

    - -
    - -
        str = str.replace /\\[^\S\n]*(\n|\\)\s*/g, (escaped, character) ->
    +            
        str.replace /\\[^\S\n]*(\n|\\)\s*/g, (escaped, character) ->
           if character is '\n' then '' else escaped
    -    if heredoc
    -      str.replace MULTILINER, '\\n'
    -    else
    -      str.replace /\s*\n\s*/g, ' '
    + + formatHeregex: (str) -> + str.replace(HEREGEX_OMIT, '$1$2').replace(MULTILINER, '\\n')
  • -
  • +
  • - +
    -

    Constructs a string token by escaping quotes and newlines.

    +

    Constructs a string token by escaping quotes.

    -
      makeString: (body, quote, heredoc) ->
    +            
      makeString: (body, quote) ->
         return quote + quote unless body
  • -
  • +
  • - +
    -

    Ignore escaped backslashes and unescape quotes

    +

    Ignore escaped backslashes and unescape quotes.

        body = body.replace /// \\( #{quote} | \\ ) ///g, (match, contents) ->
           if contents is quote then contents else match
         body = body.replace /// #{quote} ///g, '\\$&'
    -    quote + @escapeLines(body, heredoc) + quote
    + if match = OCTAL_ESCAPE.exec body + @error "octal escape sequences are not allowed #{match[2]}", match.index + match[1].length + 1 + quote + body + quote
  • -
  • +
  • - +

    Throws a compiler error on the current position.

    @@ -1603,11 +1491,11 @@ not specified, the length of value will be used.

  • -
  • +
  • - +

    TODO: Are there some cases we could improve the error line number by passing the offset in the chunk where the error happened?

    @@ -1620,11 +1508,11 @@ passing the offset in the chunk where the error happened?

  • -
  • +
  • - +

    Constants

    @@ -1633,11 +1521,11 @@ passing the offset in the chunk where the error happened?

  • -
  • +
  • - +
    @@ -1645,11 +1533,11 @@ passing the offset in the chunk where the error happened?

  • -
  • +
  • - +

    Keywords that CoffeeScript shares in common with JavaScript.

    @@ -1658,7 +1546,7 @@ passing the offset in the chunk where the error happened?

    JS_KEYWORDS = [
       'true', 'false', 'null', 'this'
       'new', 'delete', 'typeof', 'in', 'instanceof'
    -  'return', 'throw', 'break', 'continue', 'debugger'
    +  'return', 'throw', 'break', 'continue', 'debugger', 'yield'
       'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
       'class', 'extends', 'super'
     ]
    @@ -1666,11 +1554,11 @@ passing the offset in the chunk where the error happened?

  • -
  • +
  • - +

    CoffeeScript-only keywords.

    @@ -1695,11 +1583,11 @@ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES
  • -
  • +
  • - +

    The list of keywords that are reserved by JavaScript, but not used, or are used by CoffeeScript internally. We throw an error when these are encountered, @@ -1709,21 +1597,20 @@ to avoid having a JavaScript error at runtime.

    RESERVED = [
       'case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
    -  'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind'
    -  '__indexOf', 'implements', 'interface', 'package', 'private', 'protected'
    -  'public', 'static', 'yield'
    +  'export', 'import', 'native', 'implements', 'interface', 'package', 'private'
    +  'protected', 'public', 'static'
     ]
     
    -STRICT_PROSCRIBED = ['arguments', 'eval']
    +STRICT_PROSCRIBED = ['arguments', 'eval', 'yield*']
  • -
  • +
  • - +

    The superset of both JavaScript keywords and reserved words, none of which may be used as identifiers or properties.

    @@ -1732,17 +1619,17 @@ be used as identifiers or properties.

    JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED)
     
    -exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED)
    -exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED
    +exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED) +exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED
  • -
  • +
  • - +

    The character code of the nasty Microsoft madness otherwise known as the BOM.

    @@ -1753,18 +1640,19 @@ be used as identifiers or properties.

  • -
  • +
  • - +

    Token matching regexes.

    IDENTIFIER = /// ^
    -  ( [$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]* )
    +  (?!\d)
    +  ( (?: (?!\s)[$\w\x7f-\uffff] )+ )
       ( [^\n\S]* : (?!:) )?  # Is this a property name?
     ///
     
    @@ -1775,8 +1663,6 @@ NUMBER     = ///
       ^ \d*\.?\d+ (?:e[+-]?\d+)?  # decimal
     ///i
     
    -HEREDOC    = /// ^ ("""|''') ((?: \\[\s\S] | [^\\] )*?) (?:\n[^\n\S]*)? \1 ///
    -
     OPERATOR   = /// ^ (
       ?: [-=]>             # function
        | [-+*/%<>&|^!?=]=  # compound assign / compare
    @@ -1795,76 +1681,103 @@ CODE       = /^[-=]>/
     
     MULTI_DENT = /^(?:\n[^\n\S]*)+/
     
    -SIMPLESTR  = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/
    -
     JSTOKEN    = /^`[^\\`]*(?:\\.[^\\`]*)*`/
  • -
  • +
  • - + +
    +

    String-matching-regexes.

    + +
    + +
    STRING_START   = /^(?:'''|"""|'|")/
    +
    +STRING_SINGLE  = /// ^(?: [^\\']  | \\[\s\S]                      )* ///
    +STRING_DOUBLE  = /// ^(?: [^\\"#] | \\[\s\S] |           \#(?!\{) )* ///
    +HEREDOC_SINGLE = /// ^(?: [^\\']  | \\[\s\S] | '(?!'')            )* ///
    +HEREDOC_DOUBLE = /// ^(?: [^\\"#] | \\[\s\S] | "(?!"") | \#(?!\{) )* ///
    +
    +STRING_OMIT    = /\s*\n\s*/g
    +HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g
    + +
  • + + +
  • +
    + +
    +

    Regex-matching-regexes.

    REGEX = /// ^
    -  (/ (?! [\s=] )   # disallow leading whitespace or equals signs
    -  [^ [ / \n \\ ]*  # every other thing
    -  (?:
    -    (?: \\[\s\S]   # anything escaped
    -      | \[         # character class
    -           [^ \] \n \\ ]*
    -           (?: \\[\s\S] [^ \] \n \\ ]* )*
    -         ]
    -    ) [^ [ / \n \\ ]*
    -  )*
    -  /) ([imgy]{0,4}) (?!\w)
    +  / (?!/) (
    +  ?: [^ [ / \n \\ ]  # every other thing
    +   | \\.             # anything (but newlines) escaped
    +   | \[              # character class
    +       (?: \\. | [^ \] \n \\ ] )*
    +     ]
    +  )* (/)?
     ///
     
    -HEREGEX      = /// ^ /{3} ((?:\\?[\s\S])+?) /{3} ([imgy]{0,4}) (?!\w) ///
    +REGEX_FLAGS  = /^\w*/
    +VALID_FLAGS  = /^(?!.*(.).*\1)[imgy]*$/
     
    -HEREGEX_OMIT = ///
    +HEREGEX      = /// ^(?: [^\\/#] | \\[\s\S] | /(?!//) | \#(?!\{) )* ///
    +
    +HEREGEX_OMIT = ///
         ((?:\\\\)+)     # consume (and preserve) an even number of backslashes
       | \\(\s|/)        # preserve escaped whitespace and "de-escape" slashes
       | \s+(?:#.*)?     # remove whitespace and comments
    -///g
    +///g + +REGEX_ILLEGAL = /// ^ ( / | /{3}\s*) (\*) /// + +POSSIBLY_DIVISION = /// ^ /=?\s ///
  • -
  • +
  • - +
    -

    Token cleaning regexes.

    +

    Other regexes.

    -
    MULTILINER      = /\n/g
    +            
    MULTILINER          = /\n/g
     
    -HEREDOC_INDENT  = /\n+([^\n\S]*)/g
    +HERECOMMENT_ILLEGAL = /\*\//
     
    -HEREDOC_ILLEGAL = /\*\//
    +LINE_CONTINUER      = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) ///
     
    -LINE_CONTINUER  = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) ///
    +OCTAL_ESCAPE        = /// ^ ((?: \\. | [^\\] )*) (\\ (?: 0[0-7] | [1-7] )) ///
     
    -TRAILING_SPACES = /\s+$/
    +LEADING_BLANK_LINE = /^[^\n\S]*\n/ +TRAILING_BLANK_LINE = /\n[^\n\S]*$/ + +TRAILING_SPACES = /\s+$/
  • -
  • +
  • - +

    Compound assignment tokens.

    @@ -1878,11 +1791,11 @@ TRAILING_SPACES = /\s+$/
  • -
  • +
  • - +

    Unary tokens.

    @@ -1895,11 +1808,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Logical tokens.

    @@ -1910,11 +1823,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Bit-shifting tokens.

    @@ -1925,11 +1838,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Comparison tokens.

    @@ -1940,11 +1853,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Mathematical tokens.

    @@ -1955,11 +1868,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Relational tokens that are negatable with not prefix.

    @@ -1970,11 +1883,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - +

    Boolean tokens.

    @@ -1985,45 +1898,11 @@ UNARY_MATH = ['!', '~
  • -
  • +
  • - -
    -

    Tokens which a regular expression will never immediately follow, but which -a division operator might.

    -

    See: http://www.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions

    -

    Our list is shorter, due to sans-parentheses method calls.

    - -
    - -
    NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']
    - -
  • - - -
  • -
    - -
    - -
    -

    If the previous token is not spaced, there are more preceding tokens that -force a division parse:

    - -
    - -
    NOT_SPACED_REGEX = NOT_REGEX.concat ')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'
    - -
  • - - -
  • -
    - -
    - +

    Tokens which could legitimately be invoked or indexed. An opening parentheses or bracket following these tokens will be recorded as the start @@ -2031,17 +1910,34 @@ of a function invocation or indexing operation.

    -
    CALLABLE  = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']
    -INDEXABLE = CALLABLE.concat 'NUMBER', 'BOOL', 'NULL', 'UNDEFINED'
    +
    CALLABLE  = ['IDENTIFIER', ')', ']', '?', '@', 'THIS', 'SUPER']
    +INDEXABLE = CALLABLE.concat ['NUMBER', 'STRING', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '}', '::']
  • -
  • +
  • - + +
    +

    Tokens which a regular expression will never immediately follow (except spaced +CALLABLEs in some cases), but which a division operator can.

    +

    See: http://www-archive.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions

    + +
    + +
    NOT_REGEX = INDEXABLE.concat ['++', '--']
    + +
  • + + +
  • +
    + +
    +

    Tokens that, when immediately preceding a WHEN, indicate that the WHEN occurs at the start of a line. We disambiguate these from trailing whens to @@ -2054,11 +1950,11 @@ avoid an ambiguity in the grammar.

  • -
  • +
  • - +

    Additional indent in front of these is ignored.

    diff --git a/documentation/docs/nodes.html b/documentation/docs/nodes.html index 630df8ef..29577d40 100644 --- a/documentation/docs/nodes.html +++ b/documentation/docs/nodes.html @@ -157,8 +157,8 @@ addLocationDataFn, locationDataToString, throwSyntaxError} =
    exports.extend = extend
    -exports.addLocationDataFn = addLocationDataFn
    +
    exports.extend = extend
    +exports.addLocationDataFn = addLocationDataFn
  • @@ -207,7 +207,7 @@ all the CodeFragments’ code snippets, in order.

    -
    exports.CodeFragment = class CodeFragment
    +            
    exports.CodeFragment = class CodeFragment
       constructor: (parent, code) ->
         @code = "#{code}"
         @locationData = parent?.locationData
    @@ -266,7 +266,7 @@ scope, and indentation level.

    -
    exports.Base = class Base
    +            
    exports.Base = class Base
     
       compile: (o, lvl) ->
         fragmentsToText @compileToFragments o, lvl
    @@ -327,7 +327,11 @@ object with their parent closure, to preserve the expected lexical scope.

    else meth = 'call' func = new Value func, [new Access new Literal meth] - (new Call func, args).compileNode o
    + parts = (new Call func, args).compileNode o + if func.isGenerator + parts.unshift @makeCode "(yield* " + parts.push @makeCode ")" + parts
    @@ -609,7 +613,7 @@ indented block of code — the implementation of a function, a clause in an -
    exports.Block = class Block extends Base
    +            
    exports.Block = class Block extends Base
       constructor: (nodes) ->
         @expressions = compact flatten nodes or []
     
    @@ -829,7 +833,7 @@ clean up obvious double-parentheses.

    o.indent = if o.bare then '' else TAB o.level = LEVEL_TOP @spaced = yes - o.scope = new Scope null, this, null
    + o.scope = new Scope null, this, null, o.referencedVars ? []
    @@ -951,7 +955,7 @@ JavaScript without translation, such as: strings, numbers, -
    exports.Literal = class Literal extends Base
    +            
    exports.Literal = class Literal extends Base
       constructor: (@value) ->
     
       makeReturn: ->
    @@ -1029,7 +1033,7 @@ make sense.

    -
    exports.Return = class Return extends Base
    +            
    exports.Return = class Return extends Base
       constructor: (@expression) ->
     
       children: ['expression']
    @@ -1091,7 +1095,7 @@ or vanilla.

    -
    exports.Value = class Value extends Base
    +            
    exports.Value = class Value extends Base
       constructor: (base, props, tag) ->
         return base if not props and base instanceof Value
         @base       = base
    @@ -1254,7 +1258,7 @@ evaluate anything twice when building the soak chain.

      unfoldSoak: (o) ->
    -    @unfoldedSoak ?= do =>
    +    @unfoldedSoak ?= do =>
           if ifn = @base.unfoldSoak o
             ifn.body.properties.push @properties...
             return ifn
    @@ -1296,14 +1300,14 @@ at the same position.

    -
    exports.Comment = class Comment extends Base
    +            
    exports.Comment = class Comment extends Base
       constructor: (@comment) ->
     
       isStatement:     YES
       makeReturn:      THIS
     
       compileNode: (o, level) ->
    -    comment = @comment.replace /^(\s*)#/gm, "$1 *"
    +    comment = @comment.replace /^(\s*)# /gm, "$1 * "
         code = "/*#{multident comment, @tab}#{if '\n' in comment then "\n#{@tab}" else ''} */"
         code = o.indent + code if (level or o.level) is LEVEL_TOP
         [@makeCode("\n"), @makeCode(code)]
    @@ -1335,7 +1339,7 @@ calls against the prototype’s function of the same name.

    -
    exports.Call = class Call extends Base
    +            
    exports.Call = class Call extends Base
       constructor: (variable, @args = [], @soak) ->
         @isNew    = false
         @isSuper  = variable is 'super'
    @@ -1569,7 +1573,7 @@ After goog.inherits from the
     
                 
    -
    exports.Extends = class Extends extends Base
    +            
    exports.Extends = class Extends extends Base
       constructor: (@child, @parent) ->
     
       children: ['child', 'parent']
    @@ -1588,7 +1592,7 @@ After goog.inherits from the
      compileToFragments: (o) ->
    -    new Call(new Value(new Literal utility 'extends'), [@child, @parent]).compileToFragments o
    + new Call(new Value(new Literal utility 'extends', o), [@child, @parent]).compileToFragments o
    @@ -1617,7 +1621,7 @@ an access into the object’s prototype.

    -
    exports.Access = class Access extends Base
    +            
    exports.Access = class Access extends Base
       constructor: (@name, tag) ->
         @name.asKey = yes
         @soak  = tag is 'soak'
    @@ -1661,7 +1665,7 @@ an access into the object’s prototype.

    -
    exports.Index = class Index extends Base
    +            
    exports.Index = class Index extends Base
       constructor: (@index) ->
     
       children: ['index']
    @@ -1700,7 +1704,7 @@ corresponding array of integers at runtime.

    -
    exports.Range = class Range extends Base
    +            
    exports.Range = class Range extends Base
     
       children: ['from', 'to']
     
    @@ -1866,7 +1870,7 @@ needed to iterate over the values in the range. Used by comprehensions.

    cond = "#{@fromVar} <= #{@toVar}" body = "var #{vars}; #{cond} ? #{i} <#{@equals} #{@toVar} : #{i} >#{@equals} #{@toVar}; #{cond} ? #{i}++ : #{i}--" post = "{ #{result}.push(#{i}); }\n#{idt}return #{result};\n#{o.indent}" - hasArgs = (node) -> node?.contains isLiteralArguments + hasArgs = (node) -> node?.contains isLiteralArguments args = ', arguments' if hasArgs(@from) or hasArgs(@to) [@makeCode "(function() {#{pre}\n#{idt}for (#{body})#{post}}).apply(this#{args ? ''})"]
    @@ -1898,7 +1902,7 @@ is the index of the beginning.

    -
    exports.Slice = class Slice extends Base
    +            
    exports.Slice = class Slice extends Base
     
       children: ['range']
     
    @@ -1976,7 +1980,7 @@ is the index of the beginning.

    -
    exports.Obj = class Obj extends Base
    +            
    exports.Obj = class Obj extends Base
       constructor: (props, @generated = false) ->
         @objects = @properties = props or []
     
    @@ -2044,7 +2048,7 @@ is the index of the beginning.

    -
    exports.Arr = class Arr extends Base
    +            
    exports.Arr = class Arr extends Base
       constructor: (objs) ->
         @objects = objs or []
     
    @@ -2102,7 +2106,7 @@ list of prototype property assignments.

    -
    exports.Class = class Class extends Base
    +            
    exports.Class = class Class extends Base
       constructor: (@variable, @parent, @body = new Block) ->
         @boundFuncs = []
         @body.classBody = yes
    @@ -2172,7 +2176,7 @@ constructor.

      addBoundFunctions: (o) ->
         for bvar in @boundFuncs
           lhs = (new Value (new Literal "this"), [new Access bvar]).compile o
    -      @ctor.body.unshift new Literal "#{lhs} = #{utility 'bind'}(#{lhs}, this)"
    +      @ctor.body.unshift new Literal "#{lhs} = #{utility 'bind', o}(#{lhs}, this)"
         return
    @@ -2369,7 +2373,7 @@ property of an object — including within object literals.

    -
    exports.Assign = class Assign extends Base
    +            
    exports.Assign = class Assign extends Base
       constructor: (@variable, @value, @context, options) ->
         @param = options and options.param
         @subpattern = options and options.subpattern
    @@ -2558,7 +2562,7 @@ for details.

    if not expandedIdx and obj instanceof Splat name = obj.name.unwrap().value obj = obj.unwrap() - val = "#{olen} <= #{vvarText}.length ? #{ utility 'slice' }.call(#{vvarText}, #{i}" + val = "#{olen} <= #{vvarText}.length ? #{ utility 'slice', o }.call(#{vvarText}, #{i}" if rest = olen - i - 1 ivar = o.scope.freeVariable 'i' val += ", #{ivar} = #{vvarText}.length - #{rest}) : (#{ivar} = #{i}, [])" @@ -2715,11 +2719,13 @@ has no children — they’re within the inner scope.

    -
    exports.Code = class Code extends Base
    +            
    exports.Code = class Code extends Base
       constructor: (params, body, tag) ->
    -    @params  = params or []
    -    @body    = body or new Block
    -    @bound   = tag is 'boundfunc'
    +    @params      = params or []
    +    @body        = body or new Block
    +    @bound       = tag is 'boundfunc'
    +    @isGenerator = !!@body.contains (node) ->
    +      node instanceof Op and node.operator in ['yield', 'yield*']
     
       children: ['params', 'body']
     
    @@ -2781,9 +2787,8 @@ a closure.

    for param in @params when param not instanceof Expansion o.scope.parameter param.asReference o for param in @params when param.splat or param instanceof Expansion - for {name: p} in @params when param not instanceof Expansion - if p.this then p = p.properties[0].name - if p.value then o.scope.add p.value, 'var', yes + for p in @params when p not instanceof Expansion and p.name.value + o.scope.add p.name.value, 'var', yes splats = new Assign new Value(new Arr(p.asReference o for p in @params)), new Value new Literal 'arguments' break @@ -2807,12 +2812,13 @@ a closure.

    o.scope.parameter fragmentsToText params[i] uniqs = [] @eachParamName (name, node) -> - node.error "multiple parameters named '#{name}'" if name in uniqs + node.error "multiple parameters named #{name}" if name in uniqs uniqs.push name @body.makeReturn() unless wasEmpty or @noReturn - code = 'function' - code += ' ' + @name if @ctor - code += '(' + code = 'function' + code += '*' if @isGenerator + code += ' ' + @name if @ctor + code += '(' answer = [@makeCode(code)] for p, i in params if i then answer.push @makeCode ", " @@ -2872,7 +2878,7 @@ as well as be a splat, gathering up a group of parameters into an array.

    -
    exports.Param = class Param extends Base
    +            
    exports.Param = class Param extends Base
       constructor: (@name, @value, @splat) ->
         if (name = @name.unwrapAll().value) in STRICT_PROSCRIBED
           @name.error "parameter name \"#{name}\" is not allowed"
    @@ -2886,9 +2892,8 @@ as well as be a splat, gathering up a group of parameters into an array.

    return @reference if @reference node = @name if node.this - node = node.properties[0].name - if node.value.reserved - node = new Literal o.scope.freeVariable node.value + name = "at_#{node.properties[0].name.value}" + node = new Literal o.scope.freeVariable name else if node.isComplex() node = new Literal o.scope.freeVariable 'arg' node = new Value node @@ -2918,9 +2923,7 @@ to that name.

      eachName: (iterator, name = @name)->
    -    atParam = (obj) ->
    -      node = obj.properties[0].name
    -      iterator node.value, node unless node.value.reserved
    + atParam = (obj) -> iterator "@#{obj.properties[0].name.value}", obj
    @@ -3078,7 +3081,7 @@ or as part of a destructuring assignment.

    -
    exports.Splat = class Splat extends Base
    +            
    exports.Splat = class Splat extends Base
     
       children: ['name']
     
    @@ -3117,12 +3120,12 @@ splats, to a proper array.

    node = list[0] fragments = node.compileToFragments o, LEVEL_LIST return fragments if apply - return [].concat node.makeCode("#{ utility 'slice' }.call("), fragments, node.makeCode(")") + return [].concat node.makeCode("#{ utility 'slice', o }.call("), fragments, node.makeCode(")") args = list[index..] for node, i in args compiledNode = node.compileToFragments o, LEVEL_LIST args[i] = if node instanceof Splat - then [].concat node.makeCode("#{ utility 'slice' }.call("), compiledNode, node.makeCode(")") + then [].concat node.makeCode("#{ utility 'slice', o }.call("), compiledNode, node.makeCode(")") else [].concat node.makeCode("["), compiledNode, node.makeCode("]") if index is 0 node = list[0] @@ -3160,7 +3163,7 @@ parameter list.

    -
    exports.Expansion = class Expansion extends Base
    +            
    exports.Expansion = class Expansion extends Base
     
       isComplex: NO
     
    @@ -3200,7 +3203,7 @@ flexibility or more speed than a comprehension can provide.

    -
    exports.While = class While extends Base
    +            
    exports.While = class While extends Base
       constructor: (condition, options) ->
         @condition = if options?.invert then condition.invert() else condition
         @guard     = options?.guard
    @@ -3290,7 +3293,7 @@ CoffeeScript operations into their JavaScript equivalents.

    -
    exports.Op = class Op extends Base
    +            
    exports.Op = class Op extends Base
       constructor: (op, first, second, flip ) ->
         return new In first, second if op is 'in'
         if op is 'do'
    @@ -3318,9 +3321,10 @@ CoffeeScript operations into their JavaScript equivalents.

      CONVERSIONS =
    -    '==': '==='
    -    '!=': '!=='
    -    'of': 'in'
    + '==': '===' + '!=': '!==' + 'of': 'in' + 'yieldfrom': 'yield*'
    @@ -3343,11 +3347,15 @@ CoffeeScript operations into their JavaScript equivalents.

    isSimpleNumber: NO + isYield: -> + @operator in ['yield', 'yield*'] + isUnary: -> not @second isComplex: -> - not (@isUnary() and @operator in ['+', '-']) or @first.isComplex()
    + not (@isUnary() and @operator in ['+', '-'] and + @first instanceof Value and @first.isSimpleNumber())
    @@ -3434,6 +3442,7 @@ as the chained expression is wrapped.

    @error 'delete operand may not be argument or var' if @operator in ['--', '++'] and @first.unwrapAll().value in STRICT_PROSCRIBED @error "cannot increment/decrement \"#{@first.unwrapAll().value}\"" + return @compileYield o if @isYield() return @compileUnary o if @isUnary() return @compileChain o if isChain switch @operator @@ -3523,6 +3532,19 @@ used sequentially. For example:

    parts.reverse() if @flip @joinFragmentArrays parts, '' + compileYield: (o) -> + parts = [] + op = @operator + if not o.scope.parent? + @error 'yield statements must occur within a function generator.' + if 'expression' in Object.keys @first + parts.push @first.expression.compileToFragments o, LEVEL_OP if @first.expression? + else + parts.push [@makeCode "(#{op} "] + parts.push @first.compileToFragments o, LEVEL_OP + parts.push [@makeCode ")"] + @joinFragmentArrays parts, '' + compilePower: (o) ->
    @@ -3547,7 +3569,7 @@ used sequentially. For example:

    new Call(floor, [div]).compileToFragments o compileModulo: (o) -> - mod = new Value new Literal utility 'modulo' + mod = new Value new Literal utility 'modulo', o new Call(mod, [@first, @second]).compileToFragments o toString: (idt) -> @@ -3566,7 +3588,7 @@ used sequentially. For example:

    -
    exports.In = class In extends Base
    +            
    exports.In = class In extends Base
       constructor: (@object, @array) ->
     
       children: ['object', 'array']
    @@ -3606,7 +3628,7 @@ used sequentially. For example:

    compileLoopTest: (o) -> [sub, ref] = @object.cache o, LEVEL_LIST - fragments = [].concat @makeCode(utility('indexOf') + ".call("), @array.compileToFragments(o, LEVEL_LIST), + fragments = [].concat @makeCode(utility('indexOf', o) + ".call("), @array.compileToFragments(o, LEVEL_LIST), @makeCode(", "), ref, @makeCode(") " + if @negated then '< 0' else '>= 0') return fragments if fragmentsToText(sub) is fragmentsToText(ref) fragments = sub.concat @makeCode(', '), fragments @@ -3641,7 +3663,7 @@ used sequentially. For example:

    -
    exports.Try = class Try extends Base
    +            
    exports.Try = class Try extends Base
       constructor: (@attempt, @errorVariable, @recovery, @ensure) ->
     
       children: ['attempt', 'recovery', 'ensure']
    @@ -3716,7 +3738,7 @@ is optional, the catch is not.

    -
    exports.Throw = class Throw extends Base
    +            
    exports.Throw = class Throw extends Base
       constructor: (@expression) ->
     
       children: ['expression']
    @@ -3770,7 +3792,7 @@ table.

    -
    exports.Existence = class Existence extends Base
    +            
    exports.Existence = class Existence extends Base
       constructor: (@expression) ->
     
       children: ['expression']
    @@ -3830,7 +3852,7 @@ parentheses, but no longer — you can put in as many as you please.

    -
    exports.Parens = class Parens extends Base
    +            
    exports.Parens = class Parens extends Base
       constructor: (@body) ->
     
       children: ['body']
    @@ -3879,7 +3901,7 @@ you can map and filter in a single pass.

    -
    exports.For = class For extends While
    +            
    exports.For = class For extends While
       constructor: (body, source) ->
         {@source, @guard, @step, @name, @index} = source
         @body    = Block.wrap [body]
    @@ -3977,7 +3999,7 @@ some cannot.

    varPart = "\n#{idt1}#{namePart};" if namePart if @object forPartFragments = [@makeCode("#{kvar} in #{svar}")] - guardPart = "\n#{idt1}if (!#{utility 'hasProp'}.call(#{svar}, #{kvar})) continue;" if @own + guardPart = "\n#{idt1}if (!#{utility 'hasProp', o}.call(#{svar}, #{kvar})) continue;" if @own bodyFragments = body.compileToFragments merge(o, indent: idt1), LEVEL_TOP if bodyFragments and (bodyFragments.length > 0) bodyFragments = [].concat @makeCode("\n"), bodyFragments, @makeCode("\n") @@ -4031,7 +4053,7 @@ some cannot.

    -
    exports.Switch = class Switch extends Base
    +            
    exports.Switch = class Switch extends Base
       constructor: (@subject, @cases, @otherwise) ->
     
       children: ['subject', 'cases', 'otherwise']
    @@ -4098,7 +4120,7 @@ because ternaries are already proper expressions, and don’t need conversion.
                 
    -            
    exports.If = class If extends Base
    +            
    exports.If = class If extends Base
       constructor: (condition, @body, options = {}) ->
         @condition = if options.type is 'unless' then condition.invert() else condition
         @elseBody  = null
    @@ -4264,10 +4286,10 @@ to the superclass for super() calls, and copies of any static prope
     
                 
    -
      extends: -> "
    +            
      extends: (o) -> "
         function(child, parent) {
           for (var key in parent) {
    -        if (#{utility 'hasProp'}.call(parent, key)) child[key] = parent[key];
    +        if (#{utility 'hasProp', o}.call(parent, key)) child[key] = parent[key];
           }
           function ctor() {
             this.constructor = child;
    @@ -4450,12 +4472,16 @@ IS_REGEX = /^\//
    -
    utility = (name) ->
    -  ref = "__#{name}"
    -  Scope.root.assign ref, UTILITIES[name]()
    -  ref
    -
    -multident = (code, tab) ->
    +            
    utility = (name, o) ->
    +  {root} = o.scope
    +  if name of root.utilities
    +    root.utilities[name]
    +  else
    +    ref = root.freeVariable "_#{name}"
    +    root.assign ref, UTILITIES[name] o
    +    root.utilities[name] = ref
    +
    +multident = (code, tab) ->
       code = code.replace /\n/g, '$&' + tab
       code.replace /\s+$/, ''
    @@ -4480,11 +4506,11 @@ Examples: 0, -1, 1, 2e3, 2e-3, -0xfe, 0xfe

    parseInt x, 16 else parseFloat x - -isLiteralArguments = (node) -> + +isLiteralArguments = (node) -> node instanceof Literal and node.value is 'arguments' and not node.asKey - -isLiteralThis = (node) -> + +isLiteralThis = (node) -> (node instanceof Literal and node.value is 'this' and not node.asKey) or (node instanceof Code and node.bound) or (node instanceof Call and node.isSuper)
    diff --git a/documentation/docs/optparse.html b/documentation/docs/optparse.html index 67f59eb6..ccf2375d 100644 --- a/documentation/docs/optparse.html +++ b/documentation/docs/optparse.html @@ -138,7 +138,7 @@ option) list, and all subsequent arguments are left unparsed.

    -
    exports.OptionParser = class OptionParser
    +
    exports.OptionParser = class OptionParser
    diff --git a/documentation/docs/register.html b/documentation/docs/register.html index 1fcd9536..f839fe80 100644 --- a/documentation/docs/register.html +++ b/documentation/docs/register.html @@ -173,8 +173,8 @@ This is a horrible thing that should not be required.

      Module = require 'module'
    -
    -  findExtension = (filename) ->
    +
    +  findExtension = (filename) ->
         extensions = path.basename(filename).split '.'
    @@ -210,7 +210,7 @@ This is a horrible thing that should not be required.

    return curExtension if Module._extensions[curExtension] '.js' - Module::load = (filename) -> + Module::load = (filename) -> @filename = filename @paths = Module._nodeModulePaths path.dirname filename extension = findExtension filename @@ -234,7 +234,7 @@ to fork both CoffeeScript files, and JavaScript files, directly.

    if child_process
       {fork} = child_process
       binary = require.resolve '../../bin/coffee'
    -  child_process.fork = (path, args, options) ->
    +  child_process.fork = (path, args, options) ->
         if helpers.isCoffee path
           unless Array.isArray args
             options = args or {}
    diff --git a/documentation/docs/repl.html b/documentation/docs/repl.html
    index bfb12499..4e39ab8b 100644
    --- a/documentation/docs/repl.html
    +++ b/documentation/docs/repl.html
    @@ -188,11 +188,11 @@ parens. Unwrap all that.

    -

    Generate the AST of the clean input.

    +

    Tokenize the clean input.

    -
          ast = CoffeeScript.nodes input
    +
          tokens = CoffeeScript.tokens input
    @@ -203,20 +203,13 @@ parens. Unwrap all that.

    -

    Add assignment to _ variable to force the input to be an expression.

    +

    Collect referenced variable names just like in CoffeeScript.compile.

    -
          ast = new Block [
    -        new Assign (new Value new Literal '_'), ast, '='
    -      ]
    -      js = ast.compile bare: yes, locals: Object.keys(context)
    -      result = if context is global
    -        vm.runInThisContext js, filename
    -      else
    -        vm.runInContext js, context, filename
    -      cb null, result
    -    catch err
    +
          referencedVars = (
    +        token[1] for token in tokens when token.variable and token[1].charAt(0) is '_'
    +      )
    @@ -227,15 +220,11 @@ parens. Unwrap all that.

    -

    AST’s compile does not add source code information to syntax errors.

    +

    Generate the AST of the tokens.

    -
          updateSyntaxError err, input
    -      cb err
    -
    -addMultilineHandler = (repl) ->
    -  {rli, inputStream, outputStream} = repl
    +
          ast = CoffeeScript.nodes tokens
    @@ -246,6 +235,49 @@ parens. Unwrap all that.

    +

    Add assignment to _ variable to force the input to be an expression.

    + +
    + +
          ast = new Block [
    +        new Assign (new Value new Literal '_'), ast, '='
    +      ]
    +      js = ast.compile {bare: yes, locals: Object.keys(context), referencedVars}
    +      result = if context is global
    +        vm.runInThisContext js, filename
    +      else
    +        vm.runInContext js, context, filename
    +      cb null, result
    +    catch err
    + + + + +
  • +
    + +
    + +
    +

    AST’s compile does not add source code information to syntax errors.

    + +
    + +
          updateSyntaxError err, input
    +      cb err
    +
    +addMultilineHandler = (repl) ->
    +  {rli, inputStream, outputStream} = repl
    + +
  • + + +
  • +
    + +
    + +

    Node 0.11.12 changed API, prompt is now _prompt.

    @@ -261,11 +293,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Proxy node’s line listener

    @@ -286,11 +318,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Handle Ctrl-v

    @@ -303,11 +335,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    allow arbitrarily switching between modes any time before multiple lines are entered

    @@ -322,11 +354,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    no-op unless the current line is empty

    @@ -337,11 +369,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    eval, print, loop

    @@ -356,11 +388,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    XXX: multiline hack

    @@ -378,11 +410,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Store and load command history from a file

    @@ -395,11 +427,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Get file info and at most maxSize of command history

    @@ -411,11 +443,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Read last size bytes from the file

    @@ -428,11 +460,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Set the history on the interpreter

    @@ -443,11 +475,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    If the history file was truncated we should pop off a potential partial line

    @@ -458,11 +490,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Shift off the final blank newline

    @@ -480,11 +512,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Save the latest command in the file

    @@ -498,11 +530,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Add a command to show the history stack

    @@ -513,17 +545,17 @@ parens. Unwrap all that.

    action: -> repl.outputStream.write "#{repl.rli.history[..].reverse().join '\n'}\n" repl.displayPrompt() - -getCommandId = (repl, commandName) ->
  • + +getCommandId = (repl, commandName) ->
    -
  • +
  • - +

    Node 0.11 changed API, a command such as ‘.help’ is now stored as ‘help’

    @@ -532,9 +564,9 @@ parens. Unwrap all that.

      commandsHaveLeadingDot = repl.commands['.help']?
       if commandsHaveLeadingDot then ".#{commandName}" else commandName
     
    -module.exports =
    +module.exports =
       start: (opts = {}) ->
    -    [major, minor, build] = process.versions.node.split('.').map (n) -> parseInt(n)
    +    [major, minor, build] = process.versions.node.split('.').map (n) -> parseInt(n)
     
         if major is 0 and minor < 8
           console.warn "Node 0.8.0+ required for CoffeeScript REPL"
    @@ -551,11 +583,11 @@ parens. Unwrap all that.

  • -
  • +
  • - +

    Adapt help inherited from the node REPL

    diff --git a/documentation/docs/rewriter.html b/documentation/docs/rewriter.html index 4c4b5dab..5c4e0cb4 100644 --- a/documentation/docs/rewriter.html +++ b/documentation/docs/rewriter.html @@ -270,11 +270,11 @@ calls that close on the same line, just before their outdent.

      closeOpenCalls: ->
    -    condition = (token, i) ->
    +    condition = (token, i) ->
           token[0] in [')', 'CALL_END'] or
           token[0] is 'OUTDENT' and @tag(i - 1) is ')'
    -
    -    action = (token, i) ->
    +
    +    action = (token, i) ->
           @tokens[if token[0] is 'OUTDENT' then i - 1 else i][0] = 'CALL_END'
     
         @scanTokens (token, i) ->
    @@ -296,10 +296,10 @@ Match it with its paired close.

      closeOpenIndexes: ->
    -    condition = (token, i) ->
    +    condition = (token, i) ->
           token[0] in [']', 'INDEX_END']
    -
    -    action = (token, i) ->
    +
    +    action = (token, i) ->
           token[0] = 'INDEX_END'
     
         @scanTokens (token, i) ->
    @@ -408,7 +408,7 @@ add them.

    [tag] = token [prevTag] = prevToken = if i > 0 then tokens[i - 1] else [] [nextTag] = if i < tokens.length - 1 then tokens[i + 1] else [] - stackTop = -> stack[stack.length - 1] + stackTop = -> stack[stack.length - 1] startIdx = i
  • @@ -425,7 +425,7 @@ and spliced, when returning for getting a new token.

    -
          forward   = (n) -> i - startIdx + n
    +
          forward   = (n) -> i - startIdx + n
    @@ -440,9 +440,9 @@ and spliced, when returning for getting a new token.

    -
          inImplicit        = -> stackTop()?[2]?.ours
    -      inImplicitCall    = -> inImplicit() and stackTop()?[0] is '('
    -      inImplicitObject  = -> inImplicit() and stackTop()?[0] is '{'
    +
          inImplicit        = -> stackTop()?[2]?.ours
    +      inImplicitCall    = -> inImplicit() and stackTop()?[0] is '('
    +      inImplicitObject  = -> inImplicit() and stackTop()?[0] is '{'
    @@ -458,26 +458,26 @@ class declaration or if-conditionals)

    -
          inImplicitControl = -> inImplicit and stackTop()?[0] is 'CONTROL'
    -
    -      startImplicitCall = (j) ->
    +            
          inImplicitControl = -> inImplicit and stackTop()?[0] is 'CONTROL'
    +
    +      startImplicitCall = (j) ->
             idx = j ? i
             stack.push ['(', idx, ours: yes]
             tokens.splice idx, 0, generate 'CALL_START', '('
             i += 1 if not j?
    -
    -      endImplicitCall = ->
    +
    +      endImplicitCall = ->
             stack.pop()
    -        tokens.splice i, 0, generate 'CALL_END', ')'
    +        tokens.splice i, 0, generate 'CALL_END', ')', ['', 'end of input', token[2]]
             i += 1
    -
    -      startImplicitObject = (j, startsLine = yes) ->
    +
    +      startImplicitObject = (j, startsLine = yes) ->
             idx = j ? i
             stack.push ['{', idx, sameLine: yes, startsLine: startsLine, ours: yes]
             tokens.splice idx, 0, generate '{', generate(new String('{')), token
             i += 1 if not j?
    -
    -      endImplicitObject = (j) ->
    +
    +      endImplicitObject = (j) ->
             j = j ? i
             stack.pop()
             tokens.splice j, 0, generate '}', '}', token
    @@ -580,7 +580,7 @@ f a, f() b, f? c, h[0] d etc.

    -
          if (tag in IMPLICIT_FUNC and token.spaced and not token.stringEnd or
    +            
          if (tag in IMPLICIT_FUNC and token.spaced and not token.stringEnd and not token.regexEnd or
               tag is '?' and i > 0 and not tokens[i - 1].spaced) and
              (nextTag in IMPLICIT_CALL or
               nextTag in IMPLICIT_UNSPACED_CALL and
    @@ -619,7 +619,8 @@ that creates grammatical ambiguities.

    -
          if tag in IMPLICIT_FUNC and @matchTags(i + 1, 'INDENT', null, ':') and
    +            
          if tag in IMPLICIT_FUNC and not token.stringEnd and not token.regexEnd and
    +         @matchTags(i + 1, 'INDENT', null, ':') and
              not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH',
               'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])
             startImplicitCall i + 1
    @@ -707,7 +708,7 @@ that creates grammatical ambiguities.

    End implicit calls when chaining method calls like e.g.:

    -
    f ->
    +
    f ->
       a
     .g b, ->
       c
    @@ -878,15 +879,15 @@ blocks are added.

      normalizeLines: ->
         starter = indent = outdent = null
    -
    -    condition = (token, i) ->
    +
    +    condition = (token, i) ->
           token[1] isnt ';' and token[0] in SINGLE_CLOSERS and
           not (token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE) and
           not (token[0] is 'ELSE' and starter isnt 'THEN') and
           not (token[0] in ['CATCH', 'FINALLY'] and starter in ['->', '=>']) or
           token[0] in CALL_CLOSERS and @tokens[i - 1].newLine
    -
    -    action = (token, i) ->
    +
    +    action = (token, i) ->
           @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
     
         @scanTokens (token, i, tokens) ->
    @@ -930,13 +931,13 @@ different precedence.

      tagPostfixConditionals: ->
     
         original = null
    -
    -    condition = (token, i) ->
    +
    +    condition = (token, i) ->
           [tag] = token
           [prevTag] = @tokens[i - 1]
           tag is 'TERMINATOR' or (tag is 'INDENT' and prevTag not in SINGLE_LINERS)
    -
    -    action = (token, i) ->
    +
    +    action = (token, i) ->
           if token[0] isnt 'INDENT' or (token.generated and not token.fromThen)
             original[0] = 'POST_' + original[0]
     
    @@ -1048,7 +1049,7 @@ look things up from either end.

    -
    exports.INVERSES = INVERSES = {}
    +
    exports.INVERSES = INVERSES = {}
    @@ -1115,7 +1116,7 @@ EXPRESSION_END = []
    IMPLICIT_CALL    = [
       'IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS'
    -  'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY',
    +  'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'YIELD'
       'UNARY_MATH', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'
     ]
     
    diff --git a/documentation/docs/scope.html b/documentation/docs/scope.html
    index e62df5ff..bfe3770e 100644
    --- a/documentation/docs/scope.html
    +++ b/documentation/docs/scope.html
    @@ -127,7 +127,7 @@ with external scopes.

    {extend, last} = require './helpers'
     
    -exports.Scope = class Scope
    +exports.Scope = class Scope
    @@ -138,11 +138,18 @@ with external scopes.

    -

    The root is the top-level Scope object for a given file.

    +

    Initialize a scope with its parent, for lookups up the chain, +as well as a reference to the Block node it belongs to, which is +where it should declare its variables, a reference to the function that +it belongs to, and a list of variables referenced in the source code +and therefore should be avoided when generating variables.

    -
      @root: null
    +
      constructor: (@parent, @expressions, @method, @referencedVars) ->
    +    @variables = [{name: 'arguments', type: 'arguments'}]
    +    @positions = {}
    +    @utilities = {} unless @parent
    @@ -153,17 +160,11 @@ with external scopes.

    -

    Initialize a scope with its parent, for lookups up the chain, -as well as a reference to the Block node it belongs to, which is -where it should declare its variables, and a reference to the function that -it belongs to.

    +

    The @root is the top-level Scope object for a given file.

    -
      constructor: (@parent, @expressions, @method) ->
    -    @variables = [{name: 'arguments', type: 'arguments'}]
    -    @positions = {}
    -    Scope.root = this unless @parent
    +
        @root = @parent?.root ? this
    @@ -312,7 +313,10 @@ compiler-generated variable. _var, _var2, and so on…
      freeVariable: (name, reserve=true) ->
         index = 0
    -    index++ while @check((temp = @temporary name, index))
    +    loop
    +      temp = @temporary name, index
    +      break unless @check(temp) or temp in @root.referencedVars
    +      index++
         @add temp, 'var', yes if reserve
         temp
    diff --git a/documentation/docs/sourcemap.html b/documentation/docs/sourcemap.html index 0d9bf1aa..07aeb2c1 100644 --- a/documentation/docs/sourcemap.html +++ b/documentation/docs/sourcemap.html @@ -513,7 +513,7 @@ bits of the original value encoded into the first byte of the VLQ encoded value.
    -
    module.exports = SourceMap
    +
    module.exports = SourceMap
    diff --git a/documentation/docs/underscore.html b/documentation/docs/underscore.html index 1d5307bb..2f8a7769 100644 --- a/documentation/docs/underscore.html +++ b/documentation/docs/underscore.html @@ -214,7 +214,7 @@ nativeKeys = Object.keys
    -
    if typeof(exports) != 'undefined' then exports._ = _
    +
    if typeof(exports) != 'undefined' then exports._ = _
    @@ -285,7 +285,7 @@ Handles objects implementing forEach, arrays, and raw objects.<
    -
    _.each = (obj, iterator, context) ->
    +            
    _.each = (obj, iterator, context) ->
       try
         if nativeForEach and obj.forEach is nativeForEach
           obj.forEach iterator, context
    @@ -311,7 +311,7 @@ Handles objects implementing forEach, arrays, and raw objects.<
     
                 
    -
    _.map = (obj, iterator, context) ->
    +            
    _.map = (obj, iterator, context) ->
       return obj.map(iterator, context) if nativeMap and obj.map is nativeMap
       results = []
       _.each obj, (value, index, list) ->
    @@ -332,7 +332,7 @@ Handles objects implementing forEach, arrays, and raw objects.<
     
                 
    -
    _.reduce = (obj, iterator, memo, context) ->
    +            
    _.reduce = (obj, iterator, memo, context) ->
       if nativeReduce and obj.reduce is nativeReduce
         iterator = _.bind iterator, context if context
         return obj.reduce iterator, memo
    @@ -354,7 +354,7 @@ JavaScript 1.8’s version of reduceRight, if available.

    -
    _.reduceRight = (obj, iterator, memo, context) ->
    +            
    _.reduceRight = (obj, iterator, memo, context) ->
       if nativeReduceRight and obj.reduceRight is nativeReduceRight
         iterator = _.bind iterator, context if context
         return obj.reduceRight iterator, memo
    @@ -374,7 +374,7 @@ JavaScript 1.8’s version of reduceRight, if available.

    -
    _.detect = (obj, iterator, context) ->
    +            
    _.detect = (obj, iterator, context) ->
       result = null
       _.each obj, (value, index, list) ->
         if iterator.call context, value, index, list
    @@ -396,7 +396,7 @@ JavaScript 1.8’s version of reduceRight, if available.

    -
    _.filter = (obj, iterator, context) ->
    +            
    _.filter = (obj, iterator, context) ->
       return obj.filter iterator, context if nativeFilter and obj.filter is nativeFilter
       results = []
       _.each obj, (value, index, list) ->
    @@ -416,7 +416,7 @@ JavaScript 1.8’s version of reduceRight, if available.

    -
    _.reject = (obj, iterator, context) ->
    +            
    _.reject = (obj, iterator, context) ->
       results = []
       _.each obj, (value, index, list) ->
         results.push value if not iterator.call context, value, index, list
    @@ -436,7 +436,7 @@ JavaScript 1.6’s every, if it is present.

    -
    _.every = (obj, iterator, context) ->
    +            
    _.every = (obj, iterator, context) ->
       iterator ||= _.identity
       return obj.every iterator, context if nativeEvery and obj.every is nativeEvery
       result = true
    @@ -458,7 +458,7 @@ JavaScript 1.6’s some, if it exists.

    -
    _.some = (obj, iterator, context) ->
    +            
    _.some = (obj, iterator, context) ->
       iterator ||= _.identity
       return obj.some iterator, context if nativeSome and obj.some is nativeSome
       result = false
    @@ -480,7 +480,7 @@ based on ===.

    -
    _.include = (obj, target) ->
    +            
    _.include = (obj, target) ->
       return _.indexOf(obj, target) isnt -1 if nativeIndexOf and obj.indexOf is nativeIndexOf
       return true for own key, val of obj when val is target
       false
    @@ -498,7 +498,7 @@ based on ===.

    -
    _.invoke = (obj, method) ->
    +            
    _.invoke = (obj, method) ->
       args = _.rest arguments, 2
       (if method then val[method] else val).apply(val, args) for val in obj
    @@ -515,11 +515,8 @@ based on ===.

    -
    _.pluck = (obj, key) ->
    -  _.map(obj, (val) -> val[key])
    -
    -
    -
    +
    _.pluck = (obj, key) ->
    +  _.map(obj, (val) -> val[key])
    @@ -534,7 +531,7 @@ based on ===.

    -
    _.max = (obj, iterator, context) ->
    +            
    _.max = (obj, iterator, context) ->
       return Math.max.apply(Math, obj) if not iterator and _.isArray(obj)
       result = computed: -Infinity
       _.each obj, (value, index, list) ->
    @@ -555,7 +552,7 @@ based on ===.

    -
    _.min = (obj, iterator, context) ->
    +            
    _.min = (obj, iterator, context) ->
       return Math.min.apply(Math, obj) if not iterator and _.isArray(obj)
       result = computed: Infinity
       _.each obj, (value, index, list) ->
    @@ -576,16 +573,13 @@ based on ===.

    -
    _.sortBy = (obj, iterator, context) ->
    -  _.pluck(((_.map obj, (value, index, list) ->
    +            
    _.sortBy = (obj, iterator, context) ->
    +  _.pluck(((_.map obj, (value, index, list) ->
         {value: value, criteria: iterator.call(context, value, index, list)}
    -  ).sort((left, right) ->
    +  ).sort((left, right) ->
         a = left.criteria; b = right.criteria
         if a < b then -1 else if a > b then 1 else 0
    -  )), 'value')
    -
    -
    -
    + )), 'value')
    @@ -601,7 +595,7 @@ be inserted so as to maintain order. Uses binary search.

    -
    _.sortedIndex = (array, obj, iterator) ->
    +            
    _.sortedIndex = (array, obj, iterator) ->
       iterator ||= _.identity
       low =  0
       high = array.length
    @@ -623,7 +617,7 @@ be inserted so as to maintain order. Uses binary search.

    -
    _.toArray = (iterable) ->
    +            
    _.toArray = (iterable) ->
       return []                   if (!iterable)
       return iterable.toArray()   if (iterable.toArray)
       return iterable             if (_.isArray(iterable))
    @@ -643,7 +637,7 @@ be inserted so as to maintain order. Uses binary search.

    -
    _.size = (obj) -> _.toArray(obj).length
    +
    _.size = (obj) -> _.toArray(obj).length
    @@ -685,7 +679,7 @@ with map.

    -
    _.first = (array, n, guard) ->
    +            
    _.first = (array, n, guard) ->
       if n and not guard then slice.call(array, 0, n) else array[0]
    @@ -704,7 +698,7 @@ check allows it to work with map.

    -
    _.rest = (array, index, guard) ->
    +            
    _.rest = (array, index, guard) ->
       slice.call(array, if _.isUndefined(index) or guard then 1 else index)
    @@ -720,7 +714,7 @@ check allows it to work with map.

    -
    _.last = (array) -> array[array.length - 1]
    +
    _.last = (array) -> array[array.length - 1]
    @@ -735,7 +729,7 @@ check allows it to work with map.

    -
    _.compact = (array) -> item for item in array when item
    +
    _.compact = (array) -> item for item in array when item
    @@ -750,7 +744,7 @@ check allows it to work with map.

    -
    _.flatten = (array) ->
    +            
    _.flatten = (array) ->
       _.reduce array, (memo, value) ->
         return memo.concat(_.flatten(value)) if _.isArray value
         memo.push value
    @@ -770,7 +764,7 @@ check allows it to work with map.

    -
    _.without = (array) ->
    +            
    _.without = (array) ->
       values = _.rest arguments
       val for val in _.toArray(array) when not _.include values, val
    @@ -788,7 +782,7 @@ been sorted, you have the option of using a faster algorithm.

    -
    _.uniq = (array, isSorted) ->
    +            
    _.uniq = (array, isSorted) ->
       memo = []
       for el, i in _.toArray array
         memo.push el if i is 0 || (if isSorted is true then _.last(memo) isnt el else not _.include(memo, el))
    @@ -808,9 +802,9 @@ passed-in arrays.

    -
    _.intersect = (array) ->
    +            
    _.intersect = (array) ->
       rest = _.rest arguments
    -  _.select _.uniq(array), (item) ->
    +  _.select _.uniq(array), (item) ->
         _.all rest, (other) ->
           _.indexOf(other, item) >= 0
    @@ -828,7 +822,7 @@ an index go together.

    -
    _.zip = ->
    +            
    _.zip = ->
       length =  _.max _.pluck arguments, 'length'
       results = new Array length
       for i in [0...length]
    @@ -850,7 +844,7 @@ item in an array, or -1 if the item is not included in the array.

    -
    _.indexOf = (array, item) ->
    +            
    _.indexOf = (array, item) ->
       return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf
       i = 0; l = array.length
       while l - i
    @@ -871,7 +865,7 @@ if possible.

    -
    _.lastIndexOf = (array, item) ->
    +            
    _.lastIndexOf = (array, item) ->
       return array.lastIndexOf(item) if nativeLastIndexOf and array.lastIndexOf is nativeLastIndexOf
       i = array.length
       while i
    @@ -892,7 +886,7 @@ if possible.

    -
    _.range = (start, stop, step) ->
    +            
    _.range = (start, stop, step) ->
       a         = arguments
       solo      = a.length <= 1
       i = start = if solo then 0 else a[0]
    @@ -947,9 +941,9 @@ optionally). Binding with arguments is also known as curry.

    -
    _.bind = (func, obj) ->
    -  args = _.rest arguments, 2
    -  -> func.apply obj or root, args.concat arguments
    +
    _.bind = (func, obj) ->
    +  args = _.rest arguments, 2
    +  -> func.apply obj or root, args.concat arguments
    @@ -965,7 +959,7 @@ all callbacks defined on an object belong to it.

    -
    _.bindAll = (obj) ->
    +            
    _.bindAll = (obj) ->
       funcs = if arguments.length > 1 then _.rest(arguments) else _.functions(obj)
       _.each funcs, (f) -> obj[f] = _.bind obj[f], obj
       obj
    @@ -984,7 +978,7 @@ it with the arguments supplied.

    -
    _.delay = (func, wait) ->
    +            
    _.delay = (func, wait) ->
       args = _.rest arguments, 2
       setTimeout((-> func.apply(func, args)), wait)
    @@ -1001,10 +995,10 @@ it with the arguments supplied.

    -
    _.memoize = (func, hasher) ->
    +            
    _.memoize = (func, hasher) ->
       memo = {}
    -  hasher or= _.identity
    -  ->
    +  hasher or= _.identity
    +  ->
         key = hasher.apply this, arguments
         return memo[key] if key of memo
         memo[key] = func.apply this, arguments
    @@ -1023,7 +1017,7 @@ cleared.

    -
    _.defer = (func) ->
    +            
    _.defer = (func) ->
       _.delay.apply _, [func, 1].concat _.rest arguments
    @@ -1041,7 +1035,7 @@ conditionally execute the original function.

    -
    _.wrap = (func, wrapper) ->
    +            
    _.wrap = (func, wrapper) ->
       -> wrapper.apply wrapper, [func].concat arguments
    @@ -1058,9 +1052,9 @@ consuming the return value of the function that follows.

    -
    _.compose = ->
    -  funcs = arguments
    -  ->
    +            
    _.compose = ->
    +  funcs = arguments
    +  ->
         args = arguments
         for i in [funcs.length - 1..0] by -1
           args = [funcs[i].apply(this, args)]
    @@ -1121,7 +1115,7 @@ consuming the return value of the function that follows.

    -
    _.values = (obj) ->
    +            
    _.values = (obj) ->
       _.map obj, _.identity
    @@ -1137,11 +1131,8 @@ consuming the return value of the function that follows.

    -
    _.functions = (obj) ->
    -  _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()
    -
    -
    -
    +
    _.functions = (obj) ->
    +  _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()
    @@ -1156,7 +1147,7 @@ consuming the return value of the function that follows.

    -
    _.extend = (obj) ->
    +            
    _.extend = (obj) ->
       for source in _.rest(arguments)
         obj[key] = val for key, val of source
       obj
    @@ -1174,7 +1165,7 @@ consuming the return value of the function that follows.

    -
    _.clone = (obj) ->
    +            
    _.clone = (obj) ->
       return obj.slice 0 if _.isArray obj
       _.extend {}, obj
    @@ -1192,7 +1183,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.tap = (obj, interceptor) ->
    +            
    _.tap = (obj, interceptor) ->
       interceptor obj
       obj
    @@ -1209,7 +1200,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isEqual = (a, b) ->
    +
    _.isEqual = (a, b) ->
    @@ -1425,7 +1416,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isEmpty = (obj) ->
    +            
    _.isEmpty = (obj) ->
       return obj.length is 0 if _.isArray(obj) or _.isString(obj)
       return false for own key of obj
       true
    @@ -1443,7 +1434,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isElement   = (obj) -> obj and obj.nodeType is 1
    +
    _.isElement   = (obj) -> obj and obj.nodeType is 1
    @@ -1473,7 +1464,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isArguments = (obj) -> obj and obj.callee
    +
    _.isArguments = (obj) -> obj and obj.callee
    @@ -1488,7 +1479,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isFunction  = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)
    +
    _.isFunction  = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)
    @@ -1503,7 +1494,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isString    = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))
    +
    _.isString    = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))
    @@ -1518,7 +1509,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isNumber    = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'
    +
    _.isNumber    = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'
    @@ -1533,7 +1524,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isBoolean   = (obj) -> obj is true or obj is false
    +
    _.isBoolean   = (obj) -> obj is true or obj is false
    @@ -1548,7 +1539,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isDate      = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)
    +
    _.isDate      = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)
    @@ -1563,7 +1554,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isRegExp    = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))
    +
    _.isRegExp    = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))
    @@ -1579,7 +1570,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isNaN       = (obj) -> _.isNumber(obj) and window.isNaN(obj)
    +
    _.isNaN       = (obj) -> _.isNumber(obj) and window.isNaN(obj)
    @@ -1594,7 +1585,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isNull      = (obj) -> obj is null
    +
    _.isNull      = (obj) -> obj is null
    @@ -1609,7 +1600,7 @@ The primary purpose of this method is to “tap into” a method chain, in order
    -
    _.isUndefined = (obj) -> typeof obj is 'undefined'
    +
    _.isUndefined = (obj) -> typeof obj is 'undefined'
    @@ -1650,7 +1641,7 @@ previous owner. Returns a reference to the Underscore object.

    -
    _.noConflict = ->
    +            
    _.noConflict = ->
       root._ = previousUnderscore
       this
    @@ -1667,7 +1658,7 @@ previous owner. Returns a reference to the Underscore object.

    -
    _.identity = (value) -> value
    +
    _.identity = (value) -> value
    @@ -1682,7 +1673,7 @@ previous owner. Returns a reference to the Underscore object.

    -
    _.times = (n, iterator, context) ->
    +            
    _.times = (n, iterator, context) ->
       iterator.call context, i for i in [0...n]
    @@ -1698,7 +1689,7 @@ previous owner. Returns a reference to the Underscore object.

    -
    _.breakLoop = -> throw breaker
    +
    _.breakLoop = -> throw breaker
    @@ -1714,7 +1705,7 @@ they’re correctly added to the OOP wrapper as well.

    -
    _.mixin = (obj) ->
    +            
    _.mixin = (obj) ->
       for name in _.functions(obj)
         addToWrapper name, _[name] = obj[name]
    @@ -1733,7 +1724,7 @@ Useful for temporary DOM ids.

    idCounter = 0
    -_.uniqueId = (prefix) ->
    +_.uniqueId = (prefix) ->
       (prefix or '') + idCounter++
    @@ -1772,7 +1763,7 @@ With alterations for arbitrary delimiters, and to preserve whitespace.

    -
    _.template = (str, data) ->
    +            
    _.template = (str, data) ->
       c = _.templateSettings
       endMatch = new RegExp("'(?=[^"+c.end.substr(0, 1)+"]*"+escapeRegExp(c.end)+")","g")
       fn = new Function 'obj',
    @@ -1971,7 +1962,7 @@ underscore functions. Wrapped objects may be chained.

    -
    wrapper::chain = ->
    +            
    wrapper::chain = ->
       this._chain = true
       this
    @@ -1988,7 +1979,7 @@ underscore functions. Wrapped objects may be chained.

    -
    wrapper::value = -> this._wrapped
    +
    wrapper::value = -> this._wrapped
    diff --git a/documentation/index.html.js b/documentation/index.html.js index 33208282..9b0bff1e 100644 --- a/documentation/index.html.js +++ b/documentation/index.html.js @@ -110,7 +110,7 @@

    Latest Version: - 1.8.0 + 1.9.0

    npm install -g coffee-script
    @@ -416,6 +416,13 @@ Expressions if the incoming argument is missing (null or undefined).

    <%= codeFor('default_args', 'fill("cup")') %> +

    + CoffeeScript function support + ES6 generator functions + through the yield keyword. A generator in CoffeeScript is simply a function + that yields. +

    + <%= codeFor('generators', 'ps.next().value') %>

    @@ -1196,6 +1203,25 @@ Expressions Change Log +

    + <%= releaseHeader('2015-01-29', '1.9.0', '1.8.0') %> +

      +
    • + CoffeeScript now supports ES6 generators. A generator is simply a function + that yields. +
    • +
    • + Improved error reporting for string interpolation. +
    • +
    • + Changed strategy for the generation of internal compiler variable names. +
    • +
    • + Fixed REPL compatibility with latest versions of Node and IO.js. +
    • +
    +

    +

    <%= releaseHeader('2014-08-26', '1.8.0', '1.7.1') %>

      diff --git a/documentation/js/aliases.js b/documentation/js/aliases.js index a092aeab..e98bac65 100644 --- a/documentation/js/aliases.js +++ b/documentation/js/aliases.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var volume, winner; if (ignition === true) { diff --git a/documentation/js/array_comprehensions.js b/documentation/js/array_comprehensions.js index 4eff2092..04b1cbdc 100644 --- a/documentation/js/array_comprehensions.js +++ b/documentation/js/array_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var courses, dish, food, foods, i, _i, _j, _k, _len, _len1, _len2, _ref; _ref = ['toast', 'cheese', 'wine']; diff --git a/documentation/js/block_comment.js b/documentation/js/block_comment.js index afeb29c6..6682facb 100644 --- a/documentation/js/block_comment.js +++ b/documentation/js/block_comment.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 /* SkinnyMochaHalfCaffScript Compiler v1.0 diff --git a/documentation/js/cake_tasks.js b/documentation/js/cake_tasks.js index 22a9720c..2782664b 100644 --- a/documentation/js/cake_tasks.js +++ b/documentation/js/cake_tasks.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var fs; fs = require('fs'); @@ -10,5 +10,5 @@ task('build:parser', 'rebuild the Jison parser', function(options) { require('jison'); code = require('./lib/grammar').parser.generate(); dir = options.output || 'lib'; - return fs.writeFile("" + dir + "/parser.js", code); + return fs.writeFile(dir + "/parser.js", code); }); diff --git a/documentation/js/chaining.js b/documentation/js/chaining.js index 26122f23..31e34c4d 100644 --- a/documentation/js/chaining.js +++ b/documentation/js/chaining.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 $('body').click(function(e) { return $('.box').fadeIn('fast').addClass('.active'); }).css('background', 'white'); diff --git a/documentation/js/classes.js b/documentation/js/classes.js index 45b2e9b6..ee5e369c 100644 --- a/documentation/js/classes.js +++ b/documentation/js/classes.js @@ -1,11 +1,11 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var Animal, Horse, Snake, sam, tom, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __hasProp = {}.hasOwnProperty; Animal = (function() { - function Animal(name) { - this.name = name; + function Animal(_at_name) { + this.name = _at_name; } Animal.prototype.move = function(meters) { diff --git a/documentation/js/comparisons.js b/documentation/js/comparisons.js index 917398ac..bf8fc966 100644 --- a/documentation/js/comparisons.js +++ b/documentation/js/comparisons.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var cholesterol, healthy; cholesterol = 127; diff --git a/documentation/js/conditionals.js b/documentation/js/conditionals.js index e1bd6a33..f71122ad 100644 --- a/documentation/js/conditionals.js +++ b/documentation/js/conditionals.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var date, mood; if (singing) { diff --git a/documentation/js/constructor_destructuring.js b/documentation/js/constructor_destructuring.js index 771bb0be..01ab01f1 100644 --- a/documentation/js/constructor_destructuring.js +++ b/documentation/js/constructor_destructuring.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var Person, tim; Person = (function() { diff --git a/documentation/js/default_args.js b/documentation/js/default_args.js index 5c1b8099..90c3acf8 100644 --- a/documentation/js/default_args.js +++ b/documentation/js/default_args.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var fill; fill = function(container, liquid) { diff --git a/documentation/js/do.js b/documentation/js/do.js index 79e8ef1e..07544623 100644 --- a/documentation/js/do.js +++ b/documentation/js/do.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var filename, _fn, _i, _len; _fn = function(filename) { diff --git a/documentation/js/embedded.js b/documentation/js/embedded.js index f2170f84..aaf8e8b1 100644 --- a/documentation/js/embedded.js +++ b/documentation/js/embedded.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var hi; hi = function() { diff --git a/documentation/js/existence.js b/documentation/js/existence.js index ee3bc821..c30063cf 100644 --- a/documentation/js/existence.js +++ b/documentation/js/existence.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var footprints, solipsism, speed; if ((typeof mind !== "undefined" && mind !== null) && (typeof world === "undefined" || world === null)) { diff --git a/documentation/js/expansion.js b/documentation/js/expansion.js index b4ee95f9..9d14106a 100644 --- a/documentation/js/expansion.js +++ b/documentation/js/expansion.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var first, last, text, _ref; text = "Every literary critic believes he will outwit history and have the last word"; diff --git a/documentation/js/expressions.js b/documentation/js/expressions.js index 6637c131..d31d4ca9 100644 --- a/documentation/js/expressions.js +++ b/documentation/js/expressions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var eldest, grade; grade = function(student) { diff --git a/documentation/js/expressions_assignment.js b/documentation/js/expressions_assignment.js index 09b957e0..58cd3696 100644 --- a/documentation/js/expressions_assignment.js +++ b/documentation/js/expressions_assignment.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var one, six, three, two; six = (one = 1) + (two = 2) + (three = 3); diff --git a/documentation/js/expressions_comprehension.js b/documentation/js/expressions_comprehension.js index c73532e1..f3b82c26 100644 --- a/documentation/js/expressions_comprehension.js +++ b/documentation/js/expressions_comprehension.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var globals, name; globals = ((function() { diff --git a/documentation/js/expressions_try.js b/documentation/js/expressions_try.js index 0669f89c..5a570060 100644 --- a/documentation/js/expressions_try.js +++ b/documentation/js/expressions_try.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var error; alert((function() { diff --git a/documentation/js/fat_arrow.js b/documentation/js/fat_arrow.js index 4f865045..ba638934 100644 --- a/documentation/js/fat_arrow.js +++ b/documentation/js/fat_arrow.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var Account; Account = function(customer, cart) { diff --git a/documentation/js/functions.js b/documentation/js/functions.js index e3fb9554..5467951a 100644 --- a/documentation/js/functions.js +++ b/documentation/js/functions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var cube, square; square = function(x) { diff --git a/documentation/js/generators.js b/documentation/js/generators.js new file mode 100644 index 00000000..c4f41166 --- /dev/null +++ b/documentation/js/generators.js @@ -0,0 +1,13 @@ +// Generated by CoffeeScript 1.9.0 +var perfectSquares; + +perfectSquares = function*() { + var num; + num = 0; + while (true) { + num += 1; + (yield num * num); + } +}; + +window.ps || (window.ps = perfectSquares()); diff --git a/documentation/js/heredocs.js b/documentation/js/heredocs.js index 62b6bcd4..ee3e9e60 100644 --- a/documentation/js/heredocs.js +++ b/documentation/js/heredocs.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var html; html = "\n cup of coffeescript\n"; diff --git a/documentation/js/heregexes.js b/documentation/js/heregexes.js index 31ff0244..99dfb3ac 100644 --- a/documentation/js/heregexes.js +++ b/documentation/js/heregexes.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var OPERATOR; OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/; diff --git a/documentation/js/interpolation.js b/documentation/js/interpolation.js index f5a2f03a..6da0ac68 100644 --- a/documentation/js/interpolation.js +++ b/documentation/js/interpolation.js @@ -1,8 +1,8 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var author, quote, sentence; author = "Wittgenstein"; quote = "A picture is a fact. -- " + author; -sentence = "" + (22 / 7) + " is a decent approximation of π"; +sentence = (22 / 7) + " is a decent approximation of π"; diff --git a/documentation/js/multiple_return_values.js b/documentation/js/multiple_return_values.js index cc751aa3..066d1779 100644 --- a/documentation/js/multiple_return_values.js +++ b/documentation/js/multiple_return_values.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var city, forecast, temp, weatherReport, _ref; weatherReport = function(location) { diff --git a/documentation/js/object_comprehensions.js b/documentation/js/object_comprehensions.js index 0ec47eb5..fafaeafb 100644 --- a/documentation/js/object_comprehensions.js +++ b/documentation/js/object_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var age, ages, child, yearsOld; yearsOld = { @@ -12,7 +12,7 @@ ages = (function() { _results = []; for (child in yearsOld) { age = yearsOld[child]; - _results.push("" + child + " is " + age); + _results.push(child + " is " + age); } return _results; })(); diff --git a/documentation/js/object_extraction.js b/documentation/js/object_extraction.js index b1ef21b1..925bd30e 100644 --- a/documentation/js/object_extraction.js +++ b/documentation/js/object_extraction.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var city, futurists, name, street, _ref, _ref1; futurists = { diff --git a/documentation/js/objects_and_arrays.js b/documentation/js/objects_and_arrays.js index 9a8eeb86..d4829617 100644 --- a/documentation/js/objects_and_arrays.js +++ b/documentation/js/objects_and_arrays.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var bitlist, kids, singers, song; song = ["do", "re", "mi", "fa", "so"]; diff --git a/documentation/js/objects_reserved.js b/documentation/js/objects_reserved.js index adf221ae..d48dd0d0 100644 --- a/documentation/js/objects_reserved.js +++ b/documentation/js/objects_reserved.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 $('.account').attr({ "class": 'active' }); diff --git a/documentation/js/overview.js b/documentation/js/overview.js index 5a7b5543..4e6cf4cb 100644 --- a/documentation/js/overview.js +++ b/documentation/js/overview.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var cubes, list, math, num, number, opposite, race, square, __slice = [].slice; diff --git a/documentation/js/parallel_assignment.js b/documentation/js/parallel_assignment.js index c64939b1..c56b857f 100644 --- a/documentation/js/parallel_assignment.js +++ b/documentation/js/parallel_assignment.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var theBait, theSwitch, _ref; theBait = 1000; diff --git a/documentation/js/patterns_and_splats.js b/documentation/js/patterns_and_splats.js index 6d76c209..e80bf73a 100644 --- a/documentation/js/patterns_and_splats.js +++ b/documentation/js/patterns_and_splats.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var close, contents, open, tag, _i, _ref, __slice = [].slice; diff --git a/documentation/js/prototypes.js b/documentation/js/prototypes.js index 3f4266fc..dcf0f95b 100644 --- a/documentation/js/prototypes.js +++ b/documentation/js/prototypes.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 String.prototype.dasherize = function() { return this.replace(/_/g, "-"); }; diff --git a/documentation/js/range_comprehensions.js b/documentation/js/range_comprehensions.js index 61db1a1c..7ae1510b 100644 --- a/documentation/js/range_comprehensions.js +++ b/documentation/js/range_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var countdown, num; countdown = (function() { diff --git a/documentation/js/scope.js b/documentation/js/scope.js index 28231621..9be2b487 100644 --- a/documentation/js/scope.js +++ b/documentation/js/scope.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var changeNumbers, inner, outer; outer = 1; diff --git a/documentation/js/slices.js b/documentation/js/slices.js index dc58b5f7..6391c417 100644 --- a/documentation/js/slices.js +++ b/documentation/js/slices.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var copy, end, middle, numbers, start; numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; diff --git a/documentation/js/soaks.js b/documentation/js/soaks.js index e33e4fc3..ec113b27 100644 --- a/documentation/js/soaks.js +++ b/documentation/js/soaks.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var zip, _ref; zip = typeof lottery.drawWinner === "function" ? (_ref = lottery.drawWinner().address) != null ? _ref.zipcode : void 0 : void 0; diff --git a/documentation/js/splats.js b/documentation/js/splats.js index 6b9b0abc..8404139c 100644 --- a/documentation/js/splats.js +++ b/documentation/js/splats.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var awardMedals, contenders, gold, rest, silver, __slice = [].slice; diff --git a/documentation/js/splices.js b/documentation/js/splices.js index e27048b7..365cf8b1 100644 --- a/documentation/js/splices.js +++ b/documentation/js/splices.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var numbers, _ref; numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; diff --git a/documentation/js/strings.js b/documentation/js/strings.js index 78fe4a2a..7e121f97 100644 --- a/documentation/js/strings.js +++ b/documentation/js/strings.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var mobyDick; mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world..."; diff --git a/documentation/js/switch.js b/documentation/js/switch.js index 0854ce22..8eb663d3 100644 --- a/documentation/js/switch.js +++ b/documentation/js/switch.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 switch (day) { case "Mon": go(work); diff --git a/documentation/js/switch_with_no_expression.js b/documentation/js/switch_with_no_expression.js index 0e3ec973..47d51614 100644 --- a/documentation/js/switch_with_no_expression.js +++ b/documentation/js/switch_with_no_expression.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var grade, score; score = 76; diff --git a/documentation/js/try.js b/documentation/js/try.js index 3e6e70bf..ddfb2356 100644 --- a/documentation/js/try.js +++ b/documentation/js/try.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var error; try { diff --git a/documentation/js/while.js b/documentation/js/while.js index 39620926..17d7105e 100644 --- a/documentation/js/while.js +++ b/documentation/js/while.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 var lyrics, num; if (this.studyingEconomics) { @@ -16,7 +16,7 @@ lyrics = (function() { var _results; _results = []; while (num -= 1) { - _results.push("" + num + " little monkeys, jumping on the bed. One fell out and bumped his head."); + _results.push(num + " little monkeys, jumping on the bed. One fell out and bumped his head."); } return _results; })(); diff --git a/extras/coffee-script.js b/extras/coffee-script.js index a9f57a32..7772fc66 100644 --- a/extras/coffee-script.js +++ b/extras/coffee-script.js @@ -1,5 +1,5 @@ /** - * CoffeeScript Compiler v1.8.0 + * CoffeeScript Compiler v1.9.0 * http://coffeescript.org * * Copyright 2011, Jeremy Ashkenas @@ -8,5 +8,5 @@ (function(root){var CoffeeScript=function(){function require(e){return require[e]}return require["./helpers"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a;e.starts=function(e,t,n){return t===e.substr(n,t.length)},e.ends=function(e,t,n){var i;return i=t.length,t===e.substr(e.length-i-(n||0),i)},e.repeat=s=function(e,t){var n;for(n="";t>0;)1&t&&(n+=e),t>>>=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],t&&r.push(t);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,s;for(n=[],r=0,s=e.length;s>r;r++)t=e[r],t instanceof Array?n=n.concat(i(t)):n.push(t);return n},e.del=function(e,t){var n;return n=e[t],delete e[t],n},e.last=r=function(e,t){return e[e.length-(t||0)-1]},e.some=null!=(a=Array.prototype.some)?a:function(e){var t,n,i;for(n=0,i=this.length;i>n;n++)if(t=this[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,s,o;for(s=e.split("\n"),o=[],n=0,r=s.length;r>n;n++)t=s[n],i&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(i=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){return"object"==typeof i&&i.updateLocationDataIfMissing&&i.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?t.first_line+1+":"+(t.first_column+1)+"-"+(t.last_line+1+":"+(t.last_column+1)):"No location data"},e.baseFileName=function(e,t,n){var i,r;return null==t&&(t=!1),null==n&&(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],t&&e.indexOf(".")>=0?(i=e.split("."),i.pop(),"coffee"===i[i.length-1]&&i.length>1&&i.pop(),i.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=o,n.stack=""+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===o&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=""+e),e},o=function(){var e,t,n,i,r,o,a,c,h,l,u,p,d;return this.code&&this.location?(p=this.location,a=p.first_line,o=p.first_column,h=p.last_line,c=p.last_column,null==h&&(h=a),null==c&&(c=o),r=this.filename||"[stdin]",e=this.code.split("\n")[a],u=o,i=a===h?c+1:e.length,l=e.slice(0,u).replace(/[^\s]/g," ")+s("^",i-u),"undefined"!=typeof process&&null!==process&&(n=process.stdout.isTTY&&!process.env.NODE_DISABLE_COLORS),(null!=(d=this.colorful)?d:n)&&(t=function(e){return""+e+""},e=e.slice(0,u)+t(e.slice(u,i))+e.slice(i),l=t(l)),r+":"+(a+1)+":"+(o+1)+": error: "+this.message+"\n"+e+"\n"+l):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case" ":return"space";case"\n":return"newline";case"\r":return"carriage return";case" ":return"tab";default:return e}}}.call(this),t.exports}(),require["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n&&(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){var i,o,a,c,h;for(a=this.tokens,i=0;o=a[e];){if(0===i&&t.call(this,o,e))return n.call(this,o,e);if(!o||0>i)return n.call(this,o,e-1);c=o[0],k.call(s,c)>=0?i+=1:(h=o[0],k.call(r,h)>=0&&(i-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,r;for(r=this.tokens,e=n=0,i=r.length;i>n&&(t=r[e][0],"TERMINATOR"===t);e=++n);return e?this.tokens.splice(0,e):void 0},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return")"===(n=e[0])||"CALL_END"===n||"OUTDENT"===e[0]&&")"===this.tag(t-1)},e=function(e,t){return this.tokens["OUTDENT"===e[0]?t-1:t][0]="CALL_END"},this.scanTokens(function(n,i){return"CALL_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e){var t;return"]"===(t=e[0])||"INDEX_END"===t},e=function(e){return e[0]="INDEX_END"},this.scanTokens(function(n,i){return"INDEX_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.matchTags=function(){var e,t,n,i,r,s,o;for(t=arguments[0],i=arguments.length>=2?w.call(arguments,1):[],e=0,n=r=0,s=i.length;s>=0?s>r:r>s;n=s>=0?++r:--r){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=i[n]&&("string"==typeof i[n]&&(i[n]=[i[n]]),o=this.tag(t+n+e),0>k.call(i[n],o)))return!1}return!0},e.prototype.looksObjectish=function(e){return this.matchTags(e,"@",null,":")||this.matchTags(e,null,":")},e.prototype.findTagsBackwards=function(e,t){var n,i,o,a,c,h,l;for(n=[];e>=0&&(n.length||(a=this.tag(e),0>k.call(t,a)&&(c=this.tag(e),0>k.call(s,c)||this.tokens[e].generated)&&(h=this.tag(e),0>k.call(u,h))));)i=this.tag(e),k.call(r,i)>=0&&n.push(this.tag(e)),o=this.tag(e),k.call(s,o)>=0&&n.length&&n.pop(),e-=1;return l=this.tag(e),k.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e;return e=[],this.scanTokens(function(t,i,l){var p,d,m,g,y,b,v,w,T,C,F,L,E,N,x,D,S,R,A,I,_,O,$,j,M,B,P,V;if(O=t[0],F=(L=i>0?l[i-1]:[])[0],T=(l.length-1>i?l[i+1]:[])[0],S=function(){return e[e.length-1]},R=i,m=function(e){return i-R+e},g=function(){var e,t;return null!=(e=S())?null!=(t=e[2])?t.ours:void 0:void 0},y=function(){var e;return g()&&"("===(null!=(e=S())?e[0]:void 0)},v=function(){var e;return g()&&"{"===(null!=(e=S())?e[0]:void 0)},b=function(){var e;return g&&"CONTROL"===(null!=(e=S())?e[0]:void 0)},A=function(t){var n;return n=null!=t?t:i,e.push(["(",n,{ours:!0}]),l.splice(n,0,f("CALL_START","(")),null==t?i+=1:void 0},p=function(){return e.pop(),l.splice(i,0,f("CALL_END",")",["","end of input",t[2]])),i+=1},I=function(n,r){var s;return null==r&&(r=!0),s=null!=n?n:i,e.push(["{",s,{sameLine:!0,startsLine:r,ours:!0}]),l.splice(s,0,f("{",f(new String("{")),t)),null==n?i+=1:void 0},d=function(n){return n=null!=n?n:i,e.pop(),l.splice(n,0,f("}","}",t)),i+=1},y()&&("IF"===O||"TRY"===O||"FINALLY"===O||"CATCH"===O||"CLASS"===O||"SWITCH"===O))return e.push(["CONTROL",i,{ours:!0}]),m(1);if("INDENT"===O&&g()){if("=>"!==F&&"->"!==F&&"["!==F&&"("!==F&&","!==F&&"{"!==F&&"TRY"!==F&&"ELSE"!==F&&"="!==F)for(;y();)p();return b()&&e.pop(),e.push([O,i]),m(1)}if(k.call(s,O)>=0)return e.push([O,i]),m(1);if(k.call(r,O)>=0){for(;g();)y()?p():v()?d():e.pop();e.pop()}if((k.call(c,O)>=0&&t.spaced&&!t.stringEnd&&!t.regexEnd||"?"===O&&i>0&&!l[i-1].spaced)&&(k.call(o,T)>=0||k.call(h,T)>=0&&!(null!=($=l[i+1])?$.spaced:void 0)&&!(null!=(j=l[i+1])?j.newLine:void 0)))return"?"===O&&(O=t[0]="FUNC_EXIST"),A(i+1),m(2);if(k.call(c,O)>=0&&!t.stringEnd&&!t.regexEnd&&this.matchTags(i+1,"INDENT",null,":")&&!this.findTagsBackwards(i,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return A(i+1),e.push(["INDENT",i+2]),m(3);if(":"===O){for(E="@"===this.tag(i-2)?i-2:i-1;"HERECOMMENT"===this.tag(E-2);)E-=2;return this.insideForDeclaration="FOR"===T,_=0===E||(M=this.tag(E-1),k.call(u,M)>=0)||l[E-1].newLine,S()&&(B=S(),D=B[0],x=B[1],("{"===D||"INDENT"===D&&"{"===this.tag(x-1))&&(_||","===this.tag(E-1)||"{"===this.tag(E-1)))?m(1):(I(E,!!_),m(2))}if(v()&&k.call(u,O)>=0&&(S()[2].sameLine=!1),w="OUTDENT"===F||L.newLine,k.call(a,O)>=0||k.call(n,O)>=0&&w)for(;g();)if(P=S(),D=P[0],x=P[1],V=P[2],N=V.sameLine,_=V.startsLine,y()&&","!==F)p();else if(v()&&!this.insideForDeclaration&&N&&"TERMINATOR"!==O&&":"!==F&&d());else{if(!v()||"TERMINATOR"!==O||","===F||_&&this.looksObjectish(i+1))break;d()}if(!(","!==O||this.looksObjectish(i+1)||!v()||this.insideForDeclaration||"TERMINATOR"===T&&this.looksObjectish(i+2)))for(C="OUTDENT"===T?1:0;v();)d(i+C);return m(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,r,s,o,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(s=null!=(a=n[t+1])?a[2]:void 0)?(r=s.first_line,i=s.first_column):(o=null!=(c=n[t-1])?c[2]:void 0)?(r=o.last_line,i=o.last_column):r=i=0,e[2]={first_line:r,first_column:i,last_line:r,last_column:i},1):1})},e.prototype.normalizeLines=function(){var e,t,r,s,o;return o=r=s=null,t=function(e,t){var r,s,a,c;return";"!==e[1]&&(r=e[0],k.call(p,r)>=0)&&!("TERMINATOR"===e[0]&&(s=this.tag(t+1),k.call(i,s)>=0))&&!("ELSE"===e[0]&&"THEN"!==o)&&!!("CATCH"!==(a=e[0])&&"FINALLY"!==a||"->"!==o&&"=>"!==o)||(c=e[0],k.call(n,c)>=0&&this.tokens[t-1].newLine)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,s)},this.scanTokens(function(n,a,c){var h,l,u,p,f,m;if(l=n[0],"TERMINATOR"===l){if("ELSE"===this.tag(a+1)&&"OUTDENT"!==this.tag(a-1))return c.splice.apply(c,[a,1].concat(w.call(this.indentation()))),1;if(p=this.tag(a+1),k.call(i,p)>=0)return c.splice(a,1),0}if("CATCH"===l)for(h=u=1;2>=u;h=++u)if("OUTDENT"===(f=this.tag(a+h))||"TERMINATOR"===f||"FINALLY"===f)return c.splice.apply(c,[a+h,0].concat(w.call(this.indentation()))),2+h;return k.call(d,l)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==l||"IF"!==this.tag(a+1))?(o=l,m=this.indentation(c[a]),r=m[0],s=m[1],"THEN"===o&&(r.fromThen=!0),c.splice(a+1,0,r),this.detectEnd(a+2,t,e),"THEN"===l&&c.splice(a,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,i;return i=e[0],n=this.tokens[t-1][0],"TERMINATOR"===i||"INDENT"===i&&0>k.call(d,n)},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,r){return"IF"!==i[0]?1:(n=i,this.detectEnd(r+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return t=["INDENT",2],n=["OUTDENT",2],e?(t.generated=n.generated=!0,t.origin=n.origin=e):t.explicit=n.explicit=!0,[t,n]},e.prototype.generate=f,e.prototype.tag=function(e){var t;return null!=(t=this.tokens[e])?t[0]:void 0},e}(),t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"]],e.INVERSES=l={},s=[],r=[],y=0,b=t.length;b>y;y++)v=t[y],m=v[0],g=v[1],s.push(l[g]=m),r.push(l[m]=g);i=["CATCH","THEN","ELSE","FINALLY"].concat(r),c=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],o=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","YIELD","UNARY_MATH","SUPER","THROW","@","->","=>","[","(","{","--","++"],h=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],u=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"]}.call(this),t.exports}(),require["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v,k,w,T,C,F,L,E,N,x,D,S,R,A,I,_,O,$,j,M,B,P,V,U,q,H,W,G,Y,X,z,K,J,Z,Q,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut,pt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};lt=require("./rewriter"),U=lt.Rewriter,k=lt.INVERSES,ut=require("./helpers"),nt=ut.count,ct=ut.starts,tt=ut.compact,st=ut.last,at=ut.repeat,it=ut.invertLiterate,ot=ut.locationDataToString,ht=ut.throwSyntaxError,e.Lexer=x=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,r,s;for(null==t&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;this.chunk=e.slice(r);)if(n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n,t.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:r};return this.closeIndentation(),(i=this.ends.pop())&&ht("missing "+i.tag,i.origin[2]),t.rewrite===!1?this.tokens:(new U).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(K,""),et.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=it(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,r,c,h,l,u,p,d,f,m,g;return(h=y.exec(this.chunk))?(c=h[0],i=h[1],e=h[2],r=i.length,l=void 0,"own"===i&&"FOR"===this.tag()?(this.token("OWN",i),i.length):"from"===i&&"YIELD"===this.tag()?(this.token("FROM",i),i.length):(n=e||(u=st(this.tokens))&&("."===(f=u[0])||"?."===f||"::"===f||"?::"===f||!u.spaced&&"@"===u[0]),p="IDENTIFIER",!n&&(pt.call(C,i)>=0||pt.call(a,i)>=0)&&(p=i.toUpperCase(),"WHEN"===p&&(m=this.tag(),pt.call(L,m)>=0)?p="LEADING_WHEN":"FOR"===p?this.seenFor=!0:"UNLESS"===p?p="IF":pt.call(J,p)>=0?p="UNARY":pt.call(P,p)>=0&&("INSTANCEOF"!==p&&this.seenFor?(p="FOR"+p,this.seenFor=!1):(p="RELATION","!"===this.value()&&(l=this.tokens.pop(),i="!"+i)))),pt.call(T,i)>=0&&(n?(p="IDENTIFIER",i=new String(i),i.reserved=!0):pt.call(V,i)>=0&&this.error('reserved word "'+i+'"')),n||(pt.call(s,i)>=0&&(i=o[i]),p=function(){switch(i){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":return"STATEMENT";default:return p}}()),d=this.token(p,i,0,r),d.variable=!n,l&&(g=[l[2].first_line,l[2].first_column],d[2].first_line=g[0],d[2].first_column=g[1]),e&&(t=c.lastIndexOf(":"),this.token(":",":",t,e.length)),c.length)):0},e.prototype.numberToken=function(){var e,t,n,i,r;return(n=I.exec(this.chunk))?(i=n[0],/^0[BOX]/.test(i)?this.error("radix prefix '"+i+"' must be lowercase"):/E/.test(i)&&!/^0x/.test(i)?this.error("exponential notation '"+i+"' must be indicated with a lowercase 'e'"):/^0\d*[89]/.test(i)?this.error("decimal literal '"+i+"' must not be prefixed with '0'"):/^0\d+/.test(i)&&this.error("octal literal '"+i+"' must be prefixed with '0o'"),t=i.length,(r=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(r[1],8).toString(16)),(e=/^0b([01]+)/.exec(i))&&(i="0x"+parseInt(e[1],2).toString(16)),this.token("NUMBER",i,0,t),t):0},e.prototype.stringToken=function(){var e,t,n,i,r,s,o,a,c,h,l,u,m,g,y,b;if(h=(X.exec(this.chunk)||[])[0],!h)return 0;if(l=function(){switch(h){case"'":return Y;case'"':return W;case"'''":return f;case'"""':return p}}(),r=3===h.length,u=h.length,y=this.matchWithInterpolations(this.chunk.slice(u),l,h,u),g=y.tokens,i=y.index,e=g.length-1,r){for(o=null,n=function(){var e,t,n;for(n=[],s=e=0,t=g.length;t>e;s=++e)m=g[s],"NEOSTRING"===m[0]&&n.push(m[1]);return n}().join("#{}");c=d.exec(n);)t=c[1],(null===o||(b=t.length)>0&&o.length>b)&&(o=t);o&&(a=RegExp("^"+o,"gm")),this.mergeInterpolationTokens(g,{quote:h[0],start:u,end:i},function(t){return function(n,i){return n=t.formatString(n),0===i&&(n=n.replace(F,"")),i===e&&(n=n.replace(z,"")),n=n.replace(a,""),n=n.replace(S,"\\n")}}(this))}else this.mergeInterpolationTokens(g,{quote:h,start:u,end:i},function(t){return function(n,i){return n=t.formatString(n),n=n.replace(G,function(t,r){return 0===i&&0===r||i===e&&r+t.length===n.length?"":" "})}}(this));return i},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&((n=u.exec(e))&&this.error("block comments cannot contain "+n[0],n.index),t.indexOf("\n")>=0&&(t=t.replace(RegExp("\\n"+at(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",t,0,e.length)),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=w.exec(this.chunk))?(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length):0},e.prototype.regexToken=function(){var e,t,n,r,s,o,a,c,h,l,u,p,d;switch(!1){case!(s=B.exec(this.chunk)):this.error("regular expressions cannot begin with "+s[2],s.index+s[1].length);break;case"///"!==this.chunk.slice(0,3):u=this.matchWithInterpolations(this.chunk.slice(3),m,"///",3),l=u.tokens,r=u.index;break;case!(s=j.exec(this.chunk)):if(c=s[0],e=s[1],r=c.length,o=st(this.tokens))if(o.spaced&&(p=o[0],pt.call(i,p)>=0)&&!o.stringEnd&&!o.regexEnd){if(!e||$.test(c))return 0}else if(d=o[0],pt.call(A,d)>=0)return 0;e||this.error("missing / (unclosed regex)");break;default:return 0}switch(n=M.exec(this.chunk.slice(r))[0],t=r+n.length,!1){case!!Q.test(n):this.error("invalid regular expression flags "+n,r);break;case!c:this.token("REGEX",""+c+n);break;case 1!==l.length:a=this.formatHeregex(l[0][1]).replace(/\//g,"\\/"),this.token("REGEX","/"+(a||"(?:)")+"/"+n);break;default:this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(l,{quote:'"',start:3,end:t},function(e){return function(t){return e.formatHeregex(t).replace(/\\/g,"\\\\")}}(this)),n&&(this.token(",",",",r,0),this.token("STRING",'"'+n+'"',r,n.length)),h=this.token(")",")",t,0),h.regexEnd=!0}return t},e.prototype.lineToken=function(){var e,t,n,i,r;if(!(n=R.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,r=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),r-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(r>this.indent){if(i)return this.indebt=r-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=r,t.length;e=r-this.indent+this.outdebt,this.token("INDENT",e,t.length-r,r),this.indents.push(e),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=r}else this.baseIndent>r?this.error("missing indentation",t.length):(this.indebt=0,this.outdentToken(this.indent-r,i,t.length));return t.length},e.prototype.outdentToken=function(e,t,n){var i,r,s,o;for(i=this.indent-e;e>0;)s=this.indents[this.indents.length-1],s?s===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.outdebt>s?(this.outdebt-=s,e-=s):(r=this.indents.pop()+this.outdebt,n&&(o=this.chunk[n],pt.call(b,o)>=0)&&(i-=r-e,e=r),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",e,0,n),e-=r):e=0;for(r&&(this.outdebt-=e);";"===this.value();)this.tokens.pop();return"TERMINATOR"===this.tag()||t||this.token("TERMINATOR","\n",n,0),this.indent=i,this},e.prototype.whitespaceToken=function(){var e,t,n;return(e=et.exec(this.chunk))||(t="\n"===this.chunk.charAt(0))?(n=st(this.tokens),n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0):0},e.prototype.newlineToken=function(e){for(;";"===this.value();)this.tokens.pop();return"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return"\\"===this.value()&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,s,o,a,c,u,p;if((e=O.exec(this.chunk))?(o=e[0],r.test(o)&&this.tagParameters()):o=this.chunk.charAt(0),n=o,t=st(this.tokens),"="===o&&t&&(!t[1].reserved&&(a=t[1],pt.call(T,a)>=0)&&this.error('reserved word "'+this.value()+"\" can't be assigned"),"||"===(c=t[1])||"&&"===c))return t[0]="COMPOUND_ASSIGN",t[1]+="=",o.length;if(";"===o)this.seenFor=!1,n="TERMINATOR";else if(pt.call(D,o)>=0)n="MATH";else if(pt.call(h,o)>=0)n="COMPARE";else if(pt.call(l,o)>=0)n="COMPOUND_ASSIGN";else if(pt.call(J,o)>=0)n="UNARY";else if(pt.call(Z,o)>=0)n="UNARY_MATH";else if(pt.call(q,o)>=0)n="SHIFT";else if(pt.call(N,o)>=0||"?"===o&&(null!=t?t.spaced:void 0))n="LOGIC";else if(t&&!t.spaced)if("("===o&&(u=t[0],pt.call(i,u)>=0)&&!t.stringEnd&&!t.regexEnd)"?"===t[0]&&(t[0]="FUNC_EXIST"),n="CALL_START";else if("["===o&&(p=t[0],pt.call(v,p)>=0))switch(n="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(s=this.makeToken(n,o),o){case"(":case"{":case"[":this.ends.push({tag:k[o],origin:s});break;case")":case"}":case"]":this.pair(o)}return this.tokens.push(s),o.length},e.prototype.tagParameters=function(){var e,t,n,i;if(")"!==this.tag())return this;for(t=[],i=this.tokens,e=i.length,i[--e][0]="PARAM_END";n=i[--e];)switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return"("===n[0]?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.matchWithInterpolations=function(t,n,i,r){var s,o,a,c,h,l,u,p,d,f,m;for(p=[];;){if(u=n.exec(t)[0],p.push(this.makeToken("NEOSTRING",u,r)),t=t.slice(u.length),r+=u.length,"#{"!==t.slice(0,2))break;d=this.getLineAndColumnFromChunk(r+1),c=d[0],o=d[1],f=(new e).tokenize(t.slice(1),{line:c,column:o,untilBalanced:!0}),h=f.tokens,a=f.index,a+=1,l=h[0],s=h[h.length-1],l[0]=l[1]="(",s[0]=s[1]=")",s.origin=["","end of interpolation",s[2]],"TERMINATOR"===(null!=(m=h[1])?m[0]:void 0)&&h.splice(1,1),p.push(["TOKENS",h]),t=t.slice(a),r+=a}return t.slice(0,i.length)!==i&&this.error("missing "+i),{tokens:p,index:r+i.length}},e.prototype.mergeInterpolationTokens=function(e,t,n){var i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v,k,w;for(p=t.quote,f=t.start,r=t.end,(h=e.length>1)&&(s=this.makeToken("","interpolation",f+e[0][1].length,2),this.token("(","(",0,0,s)),a=this.tokens.length,c=v=0,k=e.length;k>v;c=++v){switch(g=e[c],m=g[0],b=g[1],m){case"TOKENS":if(2===b.length)continue;l=b[0],y=b;break;case"NEOSTRING":if(i=n(g[1],c),0===i.length){if(0!==c)continue;o=this.tokens.length}2===c&&null!=o&&this.tokens.splice(o,2),g[0]="STRING",g[1]=this.makeString(i,p),l=g,y=[g]}this.tokens.length>a&&(u=this.token("+","+"),u[2]={first_line:l[2].first_line,first_column:l[2].first_column,last_line:l[2].first_line,last_column:l[2].first_column}),(w=this.tokens).push.apply(w,y)}return h?(d=this.token(")",")",r,0),d.stringEnd=!0):void 0},e.prototype.pair=function(e){var t,n;return e!==(t=null!=(n=st(this.ends))?n.tag:void 0)?("OUTDENT"!==t&&this.error("unmatched "+e),this.outdentToken(st(this.indents),!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,r;return 0===e?[this.chunkLine,this.chunkColumn]:(r=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),n=nt(r,"\n"),t=this.chunkColumn,n>0?(i=r.split("\n"),t=st(i).length):t+=r.length,[this.chunkLine+n,t])},e.prototype.makeToken=function(e,t,n,i){var r,s,o,a,c;return null==n&&(n=0),null==i&&(i=t.length),s={},a=this.getLineAndColumnFromChunk(n),s.first_line=a[0],s.first_column=a[1],r=Math.max(0,i-1),c=this.getLineAndColumnFromChunk(n+r),s.last_line=c[0],s.last_column=c[1],o=[e,t,s]},e.prototype.token=function(e,t,n,i,r){var s;return s=this.makeToken(e,t,n,i),r&&(s.origin=r),this.tokens.push(s),s},e.prototype.tag=function(e,t){var n;return(n=st(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=st(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.unfinished=function(){var e;return E.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"UNARY_MATH"===e||"+"===e||"-"===e||"YIELD"===e||"**"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.formatString=function(e){return e.replace(/\\[^\S\n]*(\n|\\)\s*/g,function(e,t){return"\n"===t?"":e})},e.prototype.formatHeregex=function(e){return e.replace(g,"$1$2").replace(S,"\\n")},e.prototype.makeString=function(e,t){var n;return e?(e=e.replace(RegExp("\\\\("+t+"|\\\\)","g"),function(e,n){return n===t?n:e}),e=e.replace(RegExp(""+t,"g"),"\\$&"),(n=_.exec(e))&&this.error("octal escape sequences are not allowed "+n[2],n.index+n[1].length+1),t+e+t):t+t},e.prototype.error=function(e,t){var n,i,r;return null==t&&(t=0),r=this.getLineAndColumnFromChunk(t),i=r[0],n=r[1],ht(e,{first_line:i,first_column:n})},e}(),C=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],a=["undefined","then","unless","until","loop","of","by","when"],o={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},s=function(){var e;e=[];for(rt in o)e.push(rt);return e}(),a=a.concat(s),V=["case","default","function","var","void","with","const","let","enum","export","import","native","implements","interface","package","private","protected","public","static"],H=["arguments","eval","yield*"],T=C.concat(V).concat(H),e.RESERVED=V.concat(C).concat(a).concat(H),e.STRICT_PROSCRIBED=H,t=65279,y=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,I=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,O=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,et=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,r=/^[-=]>/,R=/^(?:\n[^\n\S]*)+/,w=/^`[^\\`]*(?:\\.[^\\`]*)*`/,X=/^(?:'''|"""|'|")/,Y=/^(?:[^\\']|\\[\s\S])*/,W=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,f=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,p=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,G=/\s*\n\s*/g,d=/\n+([^\n\S]*)(?=\S)/g,j=/^\/(?!\/)(?:[^[\/\n\\]|\\.|\[(?:\\.|[^\]\n\\])*])*(\/)?/,M=/^\w*/,Q=/^(?!.*(.).*\1)[imgy]*$/,m=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/,g=/((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g,B=/^(\/|\/{3}\s*)(\*)/,$=/^\/=?\s/,S=/\n/g,u=/\*\//,E=/^\s*(?:,|\??\.(?![.\d])|::)/,_=/^((?:\\.|[^\\])*)(\\(?:0[0-7]|[1-7]))/,F=/^[^\n\S]*\n/,z=/\n[^\n\S]*$/,K=/\s+$/,l=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],J=["NEW","TYPEOF","DELETE","DO"],Z=["!","~"],N=["&&","||","&","|","^"],q=["<<",">>",">>>"],h=["==","!=","<",">","<=",">="],D=["*","/","%","//","%%"],P=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],i=["IDENTIFIER",")","]","?","@","THIS","SUPER"],v=i.concat(["NUMBER","STRING","REGEX","BOOL","NULL","UNDEFINED","}","::"]),A=v.concat(["++","--"]),L=["INDENT","OUTDENT","TERMINATOR"],b=[")","}","]"]}.call(this),t.exports}(),require["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[1,20],i=[1,73],r=[1,71],s=[1,72],o=[1,50],a=[1,51],c=[1,52],h=[1,53],l=[1,54],u=[1,55],p=[1,45],d=[1,46],f=[1,27],m=[1,60],g=[1,61],y=[1,70],b=[1,43],v=[1,26],k=[1,58],w=[1,59],T=[1,57],C=[1,38],F=[1,44],L=[1,56],E=[1,65],N=[1,66],x=[1,67],D=[1,68],S=[1,42],R=[1,64],A=[1,29],I=[1,30],_=[1,31],O=[1,32],$=[1,33],j=[1,34],M=[1,35],B=[1,74],P=[1,6,26,102],V=[1,84],U=[1,77],q=[1,76],H=[1,75],W=[1,78],G=[1,79],Y=[1,80],X=[1,81],z=[1,82],K=[1,83],J=[1,87],Z=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],Q=[1,93],et=[1,94],tt=[1,95],nt=[1,96],it=[1,98],rt=[1,99],st=[1,92],ot=[2,108],at=[1,6,25,26,49,54,57,66,67,68,69,71,73,74,78,84,85,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],ct=[2,75],ht=[1,104],lt=[2,54],ut=[1,108],pt=[1,113],dt=[1,114],ft=[1,116],mt=[1,6,25,26,40,49,54,57,66,67,68,69,71,73,74,78,84,85,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],gt=[2,72],yt=[1,6,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],bt=[1,151],vt=[1,153],kt=[1,148],wt=[1,6,25,26,40,49,54,57,66,67,68,69,71,73,74,78,80,84,85,86,91,93,102,104,105,106,110,111,126,129,130,133,134,135,136,137,138,139,140,141,142],Tt=[2,91],Ct=[1,6,25,26,43,49,54,57,66,67,68,69,71,73,74,78,84,85,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],Ft=[1,6,25,26,40,43,49,54,57,66,67,68,69,71,73,74,78,80,84,85,86,91,93,102,104,105,106,110,111,117,118,126,129,130,133,134,135,136,137,138,139,140,141,142],Lt=[1,199],Et=[1,198],Nt=[2,52],xt=[1,209],Dt=[6,25,26,49,54],St=[6,25,26,40,49,54,57],Rt=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,129,130,136,138,139,140,141],At=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126],It=[1,228],_t=[2,129],Ot=[1,6,25,26,40,49,54,57,66,67,68,69,71,73,74,78,84,85,86,91,93,102,104,105,106,110,111,117,118,126,129,130,135,136,137,138,139,140,141],$t=[1,237],jt=[6,25,26,54,86,91],Mt=[1,6,25,26,49,54,57,73,78,86,91,93,102,111,126],Bt=[1,6,25,26,49,54,57,73,78,86,91,93,102,105,111,126],Pt=[117,118],Vt=[54,117,118],Ut=[1,248],qt=[6,25,26,54,78],Ht=[6,25,26,43,54,78],Wt=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,129,130,138,139,140,141],Gt=[11,28,30,31,33,34,35,36,37,38,45,46,47,51,52,73,76,79,83,88,89,90,96,100,101,104,106,108,110,119,125,127,128,129,130,131,133,134],Yt=[2,118],Xt=[6,25,26],zt=[2,53],Kt=[1,259],Jt=[1,260],Zt=[1,6,25,26,49,54,57,73,78,86,91,93,98,99,102,104,105,106,110,111,121,123,126,129,130,135,136,137,138,139,140,141],Qt=[26,121,123],en=[1,6,26,49,54,57,73,78,86,91,93,102,105,111,126],tn=[2,67],nn=[1,282],rn=[1,283],sn=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,121,126,129,130,135,136,137,138,139,140,141],on=[1,6,25,26,49,54,57,73,78,86,91,93,102,104,106,110,111,126],an=[1,294],cn=[1,295],hn=[6,25,26,54],ln=[1,6,25,26,49,54,57,73,78,86,91,93,98,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],un=[25,54],pn={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,STRING:31,Literal:32,JS:33,REGEX:34,DEBUGGER:35,UNDEFINED:36,NULL:37,BOOL:38,Assignable:39,"=":40,AssignObj:41,ObjAssignable:42,":":43,ThisProperty:44,RETURN:45,HERECOMMENT:46,PARAM_START:47,ParamList:48,PARAM_END:49,FuncGlyph:50,"->":51,"=>":52,OptComma:53,",":54,Param:55,ParamVar:56,"...":57,Array:58,Object:59,Splat:60,SimpleAssignable:61,Accessor:62,Parenthetical:63,Range:64,This:65,".":66,"?.":67,"::":68,"?::":69,Index:70,INDEX_START:71,IndexValue:72,INDEX_END:73,INDEX_SOAK:74,Slice:75,"{":76,AssignList:77,"}":78,CLASS:79,EXTENDS:80,OptFuncExist:81,Arguments:82,SUPER:83,FUNC_EXIST:84,CALL_START:85,CALL_END:86,ArgList:87,THIS:88,"@":89,"[":90,"]":91,RangeDots:92,"..":93,Arg:94,SimpleArgs:95,TRY:96,Catch:97,FINALLY:98,CATCH:99,THROW:100,"(":101,")":102,WhileSource:103,WHILE:104,WHEN:105,UNTIL:106,Loop:107,LOOP:108,ForBody:109,FOR:110,BY:111,ForStart:112,ForSource:113,ForVariables:114,OWN:115,ForValue:116,FORIN:117,FOROF:118,SWITCH:119,Whens:120,ELSE:121,When:122,LEADING_WHEN:123,IfBlock:124,IF:125,POST_IF:126,UNARY:127,UNARY_MATH:128,"-":129,"+":130,YIELD:131,FROM:132,"--":133,"++":134,"?":135,MATH:136,"**":137,SHIFT:138,COMPARE:139,LOGIC:140,RELATION:141,COMPOUND_ASSIGN:142,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",111:"BY",115:"OWN",117:"FORIN",118:"FOROF",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"UNARY_MATH",129:"-",130:"+",131:"YIELD",132:"FROM",133:"--",134:"++",135:"?",136:"MATH",137:"**",138:"SHIFT",139:"COMPARE",140:"LOGIC",141:"RELATION",142:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[55,1],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,4],[109,2],[112,2],[112,3],[116,1],[116,1],[116,1],[116,1],[114,1],[114,3],[113,2],[113,2],[113,4],[113,4],[113,4],[113,6],[113,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,i,r,s,o){var a=s.length-1; switch(r){case 1:return this.$=i.addLocationDataFn(o[a],o[a])(new i.Block);case 2:return this.$=s[a];case 3:this.$=i.addLocationDataFn(o[a],o[a])(i.Block.wrap([s[a]]));break;case 4:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].push(s[a]));break;case 5:this.$=s[a-1];break;case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 28:case 41:case 42:case 43:case 44:case 52:case 53:case 63:case 64:case 65:case 66:case 71:case 72:case 75:case 79:case 85:case 129:case 130:case 132:case 162:case 163:case 179:case 185:this.$=s[a];break;case 10:case 25:case 26:case 27:case 29:case 30:case 31:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(s[a]));break;case 23:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Block);break;case 24:case 86:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-1]);break;case 32:this.$=i.addLocationDataFn(o[a],o[a])(new i.Undefined);break;case 33:this.$=i.addLocationDataFn(o[a],o[a])(new i.Null);break;case 34:this.$=i.addLocationDataFn(o[a],o[a])(new i.Bool(s[a]));break;case 35:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a]));break;case 36:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a]));break;case 37:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1]));break;case 38:case 68:case 73:case 74:case 76:case 77:case 78:case 164:case 165:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(s[a]));break;case 39:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),s[a],"object"));break;case 40:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(s[a-4])),s[a-1],"object"));break;case 45:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Return(s[a]));break;case 46:this.$=i.addLocationDataFn(o[a],o[a])(new i.Return);break;case 47:this.$=i.addLocationDataFn(o[a],o[a])(new i.Comment(s[a]));break;case 48:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Code(s[a-3],s[a],s[a-1]));break;case 49:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Code([],s[a],s[a-1]));break;case 50:this.$=i.addLocationDataFn(o[a],o[a])("func");break;case 51:this.$=i.addLocationDataFn(o[a],o[a])("boundfunc");break;case 54:case 91:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 55:case 92:case 124:case 166:this.$=i.addLocationDataFn(o[a],o[a])([s[a]]);break;case 56:case 93:case 125:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].concat(s[a]));break;case 57:case 94:case 126:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-3].concat(s[a]));break;case 58:case 95:case 128:this.$=i.addLocationDataFn(o[a-5],o[a])(s[a-5].concat(s[a-2]));break;case 59:this.$=i.addLocationDataFn(o[a],o[a])(new i.Param(s[a]));break;case 60:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Param(s[a-1],null,!0));break;case 61:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Param(s[a-2],s[a]));break;case 62:case 131:this.$=i.addLocationDataFn(o[a],o[a])(new i.Expansion);break;case 67:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Splat(s[a-1]));break;case 69:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].add(s[a]));break;case 70:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(s[a-1],[].concat(s[a])));break;case 80:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a]));break;case 81:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a],"soak"));break;case 82:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"))),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 83:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"),"soak")),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 84:this.$=i.addLocationDataFn(o[a],o[a])(new i.Access(new i.Literal("prototype")));break;case 87:this.$=i.addLocationDataFn(o[a-1],o[a])(i.extend(s[a],{soak:!0}));break;case 88:this.$=i.addLocationDataFn(o[a],o[a])(new i.Index(s[a]));break;case 89:this.$=i.addLocationDataFn(o[a],o[a])(new i.Slice(s[a]));break;case 90:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Obj(s[a-2],s[a-3].generated));break;case 96:this.$=i.addLocationDataFn(o[a],o[a])(new i.Class);break;case 97:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(null,null,s[a]));break;case 98:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(null,s[a]));break;case 99:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(null,s[a-1],s[a]));break;case 100:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(s[a]));break;case 101:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(s[a-1],null,s[a]));break;case 102:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(s[a-2],s[a]));break;case 103:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Class(s[a-3],s[a-1],s[a]));break;case 104:case 105:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(s[a-2],s[a],s[a-1]));break;case 106:this.$=i.addLocationDataFn(o[a],o[a])(new i.Call("super",[new i.Splat(new i.Literal("arguments"))]));break;case 107:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Call("super",s[a]));break;case 108:this.$=i.addLocationDataFn(o[a],o[a])(!1);break;case 109:this.$=i.addLocationDataFn(o[a],o[a])(!0);break;case 110:this.$=i.addLocationDataFn(o[a-1],o[a])([]);break;case 111:case 127:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-2]);break;case 112:case 113:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(new i.Literal("this")));break;case 114:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(i.addLocationDataFn(o[a-1])(new i.Literal("this")),[i.addLocationDataFn(o[a])(new i.Access(s[a]))],"this"));break;case 115:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Arr([]));break;case 116:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Arr(s[a-2]));break;case 117:this.$=i.addLocationDataFn(o[a],o[a])("inclusive");break;case 118:this.$=i.addLocationDataFn(o[a],o[a])("exclusive");break;case 119:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Range(s[a-3],s[a-1],s[a-2]));break;case 120:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Range(s[a-2],s[a],s[a-1]));break;case 121:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(s[a-1],null,s[a]));break;case 122:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(null,s[a],s[a-1]));break;case 123:this.$=i.addLocationDataFn(o[a],o[a])(new i.Range(null,null,s[a]));break;case 133:this.$=i.addLocationDataFn(o[a-2],o[a])([].concat(s[a-2],s[a]));break;case 134:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Try(s[a]));break;case 135:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Try(s[a-1],s[a][0],s[a][1]));break;case 136:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Try(s[a-2],null,null,s[a]));break;case 137:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Try(s[a-3],s[a-2][0],s[a-2][1],s[a]));break;case 138:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-1],s[a]]);break;case 139:this.$=i.addLocationDataFn(o[a-2],o[a])([i.addLocationDataFn(o[a-1])(new i.Value(s[a-1])),s[a]]);break;case 140:this.$=i.addLocationDataFn(o[a-1],o[a])([null,s[a]]);break;case 141:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Throw(s[a]));break;case 142:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Parens(s[a-1]));break;case 143:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Parens(s[a-2]));break;case 144:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a]));break;case 145:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{guard:s[a]}));break;case 146:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a],{invert:!0}));break;case 147:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{invert:!0,guard:s[a]}));break;case 148:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].addBody(s[a]));break;case 149:case 150:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([s[a-1]]))));break;case 151:this.$=i.addLocationDataFn(o[a],o[a])(s[a]);break;case 152:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(s[a]));break;case 153:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(i.addLocationDataFn(o[a])(i.Block.wrap([s[a]]))));break;case 154:case 155:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a-1],s[a]));break;case 156:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a],s[a-1]));break;case 157:this.$=i.addLocationDataFn(o[a-1],o[a])({source:i.addLocationDataFn(o[a])(new i.Value(s[a]))});break;case 158:this.$=i.addLocationDataFn(o[a-3],o[a])({source:i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),step:s[a]});break;case 159:this.$=i.addLocationDataFn(o[a-1],o[a])(function(){return s[a].own=s[a-1].own,s[a].name=s[a-1][0],s[a].index=s[a-1][1],s[a]}());break;case 160:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a]);break;case 161:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return s[a].own=!0,s[a]}());break;case 167:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-2],s[a]]);break;case 168:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a]});break;case 169:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a],object:!0});break;case 170:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a]});break;case 171:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a],object:!0});break;case 172:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],step:s[a]});break;case 173:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],guard:s[a-2],step:s[a]});break;case 174:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],step:s[a-2],guard:s[a]});break;case 175:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Switch(s[a-3],s[a-1]));break;case 176:this.$=i.addLocationDataFn(o[a-6],o[a])(new i.Switch(s[a-5],s[a-3],s[a-1]));break;case 177:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Switch(null,s[a-1]));break;case 178:this.$=i.addLocationDataFn(o[a-5],o[a])(new i.Switch(null,s[a-3],s[a-1]));break;case 180:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].concat(s[a]));break;case 181:this.$=i.addLocationDataFn(o[a-2],o[a])([[s[a-1],s[a]]]);break;case 182:this.$=i.addLocationDataFn(o[a-3],o[a])([[s[a-2],s[a-1]]]);break;case 183:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}));break;case 184:this.$=i.addLocationDataFn(o[a-4],o[a])(s[a-4].addElse(i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}))));break;case 186:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].addElse(s[a]));break;case 187:case 188:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([s[a-2]])),{type:s[a-1],statement:!0}));break;case 189:case 190:case 193:case 194:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op(s[a-1],s[a]));break;case 191:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("-",s[a]));break;case 192:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("+",s[a]));break;case 195:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-2].concat(s[a-1]),s[a]));break;case 196:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a]));break;case 197:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a]));break;case 198:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a-1],null,!0));break;case 199:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a-1],null,!0));break;case 200:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Existence(s[a-1]));break;case 201:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("+",s[a-2],s[a]));break;case 202:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("-",s[a-2],s[a]));break;case 203:case 204:case 205:case 206:case 207:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-1],s[a-2],s[a]));break;case 208:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return"!"===s[a-1].charAt(0)?new i.Op(s[a-1].slice(1),s[a-2],s[a]).invert():new i.Op(s[a-1],s[a-2],s[a])}());break;case 209:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a],s[a-1]));break;case 210:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1],s[a-3]));break;case 211:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a],s[a-2]));break;case 212:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Extends(s[a-2],s[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{1:[3]},{1:[2,2],6:B},t(P,[2,3]),t(P,[2,6],{112:69,103:85,109:86,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(P,[2,7],{112:69,103:88,109:89,104:E,106:N,110:D,126:J}),t(Z,[2,11],{81:90,62:91,70:97,66:Q,67:et,68:tt,69:nt,71:it,74:rt,84:st,85:ot}),t(Z,[2,12],{70:97,81:100,62:101,66:Q,67:et,68:tt,69:nt,71:it,74:rt,84:st,85:ot}),t(Z,[2,13]),t(Z,[2,14]),t(Z,[2,15]),t(Z,[2,16]),t(Z,[2,17]),t(Z,[2,18]),t(Z,[2,19]),t(Z,[2,20]),t(Z,[2,21]),t(Z,[2,22]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(at,ct,{40:[1,102]}),t(at,[2,76]),t(at,[2,77]),t(at,[2,78]),t(at,[2,79]),t([1,6,25,26,49,54,57,66,67,68,69,71,73,74,78,84,86,91,93,102,104,105,106,110,111,126,129,130,135,136,137,138,139,140,141],[2,106],{82:103,85:ht}),t([6,25,49,54],lt,{48:105,55:106,56:107,27:109,44:110,58:111,59:112,28:i,57:ut,76:y,89:pt,90:dt}),{24:115,25:ft},{7:117,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:119,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:120,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:121,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:123,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,132:[1,124],133:j,134:M},{12:126,13:127,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:128,44:63,58:47,59:48,61:125,63:23,64:24,65:25,76:y,83:v,88:k,89:w,90:T,101:L},{12:126,13:127,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:128,44:63,58:47,59:48,61:129,63:23,64:24,65:25,76:y,83:v,88:k,89:w,90:T,101:L},t(mt,gt,{80:[1,133],133:[1,130],134:[1,131],142:[1,132]}),t(Z,[2,185],{121:[1,134]}),{24:135,25:ft},{24:136,25:ft},t(Z,[2,151]),{24:137,25:ft},{7:138,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,139],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(yt,[2,96],{32:22,63:23,64:24,65:25,58:47,59:48,29:49,27:62,44:63,12:126,13:127,39:128,24:140,61:142,25:ft,28:i,30:r,31:s,33:o,34:a,35:c,36:h,37:l,38:u,76:y,80:[1,141],83:v,88:k,89:w,90:T,101:L}),{7:143,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,135,136,137,138,139,140,141],[2,46],{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,39:21,32:22,63:23,64:24,65:25,50:28,61:36,124:37,103:39,107:40,109:41,58:47,59:48,29:49,27:62,44:63,112:69,8:118,7:144,11:n,28:i,30:r,31:s,33:o,34:a,35:c,36:h,37:l,38:u,45:p,46:d,47:f,51:m,52:g,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,108:x,119:S,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M}),t(Z,[2,47]),t(mt,[2,73]),t(mt,[2,74]),t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{4:145,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,146],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:147,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:bt,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,87:149,88:k,89:w,90:T,91:kt,94:150,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(at,[2,112]),t(at,[2,113],{27:154,28:i}),{25:[2,50]},{25:[2,51]},t(wt,[2,68]),t(wt,[2,71]),{7:155,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:156,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:157,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:159,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:158,25:ft,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{27:164,28:i,44:165,58:166,59:167,64:160,76:y,89:pt,90:T,114:161,115:[1,162],116:163},{113:168,117:[1,169],118:[1,170]},t([6,25,54,78],Tt,{77:171,41:172,42:173,10:174,27:175,29:176,44:177,28:i,30:r,31:s,46:d,89:pt}),t(Ct,[2,26]),t(Ct,[2,27]),t(Ft,[2,25]),t(P,[2,5],{7:4,8:5,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,39:21,32:22,63:23,64:24,65:25,50:28,61:36,124:37,103:39,107:40,109:41,58:47,59:48,29:49,27:62,44:63,112:69,5:178,11:n,28:i,30:r,31:s,33:o,34:a,35:c,36:h,37:l,38:u,45:p,46:d,47:f,51:m,52:g,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,104:E,106:N,108:x,110:D,119:S,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M}),t(Z,[2,200]),{7:179,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:180,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:181,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:182,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:183,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:184,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:185,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:186,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:187,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,150]),t(Z,[2,155]),{7:188,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,149]),t(Z,[2,154]),{82:189,85:ht},t(wt,[2,69]),{85:[2,109]},{27:190,28:i},{27:191,28:i},t(wt,[2,84],{27:192,28:i}),{27:193,28:i},t(wt,[2,85]),{7:195,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:Lt,58:47,59:48,61:36,63:23,64:24,65:25,72:194,75:196,76:y,79:b,83:v,88:k,89:w,90:T,92:197,93:Et,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{70:200,71:it,74:rt},{82:201,85:ht},t(wt,[2,70]),{6:[1,203],7:202,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,204],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(at,[2,107]),{7:207,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:bt,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,86:[1,205],87:206,88:k,89:w,90:T,94:150,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([6,25],Nt,{53:210,49:[1,208],54:xt}),t(Dt,[2,55]),t(Dt,[2,59],{40:[1,212],57:[1,211]}),t(Dt,[2,62]),t(St,[2,63]),t(St,[2,64]),t(St,[2,65]),t(St,[2,66]),{27:154,28:i},{7:207,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:bt,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,87:149,88:k,89:w,90:T,91:kt,94:150,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,49]),{4:214,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,213],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,129,130,136,137,138,139,140,141],[2,189],{112:69,103:85,109:86,135:H}),{103:88,104:E,106:N,109:89,110:D,112:69,126:J},t(Rt,[2,190],{112:69,103:85,109:86,135:H,137:G}),t(Rt,[2,191],{112:69,103:85,109:86,135:H,137:G}),t(Rt,[2,192],{112:69,103:85,109:86,135:H,137:G}),t(Z,[2,193],{112:69,103:88,109:89}),t(At,[2,194],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{7:215,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,196],{66:gt,67:gt,68:gt,69:gt,71:gt,74:gt,84:gt,85:gt}),{62:91,66:Q,67:et,68:tt,69:nt,70:97,71:it,74:rt,81:90,84:st,85:ot},{62:101,66:Q,67:et,68:tt,69:nt,70:97,71:it,74:rt,81:100,84:st,85:ot},t([66,67,68,69,71,74,84,85],ct),t(Z,[2,197],{66:gt,67:gt,68:gt,69:gt,71:gt,74:gt,84:gt,85:gt}),t(Z,[2,198]),t(Z,[2,199]),{6:[1,218],7:216,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,217],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:219,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{24:220,25:ft,125:[1,221]},t(Z,[2,134],{97:222,98:[1,223],99:[1,224]}),t(Z,[2,148]),t(Z,[2,156]),{25:[1,225],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},{120:226,122:227,123:It},t(Z,[2,97]),{7:229,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(yt,[2,100],{24:230,25:ft,66:gt,67:gt,68:gt,69:gt,71:gt,74:gt,84:gt,85:gt,80:[1,231]}),t(At,[2,141],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(At,[2,45],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{6:B,102:[1,232]},{4:233,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([6,25,54,91],_t,{112:69,103:85,109:86,92:234,57:[1,235],93:Et,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Ot,[2,115]),t([6,25,91],Nt,{53:236,54:$t}),t(jt,[2,124]),{7:207,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:bt,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,87:238,88:k,89:w,90:T,94:150,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(jt,[2,130]),t(jt,[2,131]),t(Ft,[2,114]),{24:239,25:ft,103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},t(Mt,[2,144],{112:69,103:85,109:86,104:E,105:[1,240],106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Mt,[2,146],{112:69,103:85,109:86,104:E,105:[1,241],106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Z,[2,152]),t(Bt,[2,153],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,126,129,130,135,136,137,138,139,140,141],[2,157],{111:[1,242]}),t(Pt,[2,160]),{27:164,28:i,44:165,58:166,59:167,76:y,89:pt,90:dt,114:243,116:163},t(Pt,[2,166],{54:[1,244]}),t(Vt,[2,162]),t(Vt,[2,163]),t(Vt,[2,164]),t(Vt,[2,165]),t(Z,[2,159]),{7:245,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:246,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([6,25,78],Nt,{53:247,54:Ut}),t(qt,[2,92]),t(qt,[2,38],{43:[1,249]}),t(qt,[2,41]),t(Ht,[2,42]),t(Ht,[2,43]),t(Ht,[2,44]),t(P,[2,4]),t(Wt,[2,201],{112:69,103:85,109:86,135:H,136:W,137:G}),t(Wt,[2,202],{112:69,103:85,109:86,135:H,136:W,137:G}),t(Rt,[2,203],{112:69,103:85,109:86,135:H,137:G}),t(Rt,[2,204],{112:69,103:85,109:86,135:H,137:G}),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,138,139,140,141],[2,205],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G}),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,139,140],[2,206],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,141:K}),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,140],[2,207],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,141:K}),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,111,126,139,140,141],[2,208],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y}),t(Bt,[2,188],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Bt,[2,187],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(at,[2,104]),t(wt,[2,80]),t(wt,[2,81]),t(wt,[2,82]),t(wt,[2,83]),{73:[1,250]},{57:Lt,73:[2,88],92:251,93:Et,103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},{73:[2,89]},{7:252,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,73:[2,123],76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Gt,[2,117]),t(Gt,Yt),t(wt,[2,87]),t(at,[2,105]),t(At,[2,35],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{7:253,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:254,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(at,[2,110]),t([6,25,86],Nt,{53:255,54:$t}),t(jt,_t,{112:69,103:85,109:86,57:[1,256],104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{50:257,51:m,52:g},t(Xt,zt,{56:107,27:109,44:110,58:111,59:112,55:258,28:i,57:ut,76:y,89:pt,90:dt}),{6:Kt,25:Jt},t(Dt,[2,60]),{7:261,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Zt,[2,23]),{6:B,26:[1,262]},t(At,[2,195],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(At,[2,209],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{7:263,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:264,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(At,[2,212],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Z,[2,186]),{7:265,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,135],{98:[1,266]}),{24:267,25:ft},{24:270,25:ft,27:268,28:i,59:269,76:y},{120:271,122:227,123:It},{26:[1,272],121:[1,273],122:274,123:It},t(Qt,[2,179]),{7:276,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,95:275,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(en,[2,98],{112:69,103:85,109:86,24:277,25:ft,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Z,[2,101]),{7:278,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(at,[2,142]),{6:B,26:[1,279]},{7:280,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t([11,28,30,31,33,34,35,36,37,38,45,46,47,51,52,76,79,83,88,89,90,96,100,101,104,106,108,110,119,125,127,128,129,130,131,133,134],Yt,{6:tn,25:tn,54:tn,91:tn}),{6:nn,25:rn,91:[1,281]},t([6,25,26,86,91],zt,{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,39:21,32:22,63:23,64:24,65:25,50:28,61:36,124:37,103:39,107:40,109:41,58:47,59:48,29:49,27:62,44:63,112:69,8:118,60:152,7:207,94:284,11:n,28:i,30:r,31:s,33:o,34:a,35:c,36:h,37:l,38:u,45:p,46:d,47:f,51:m,52:g,57:vt,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,104:E,106:N,108:x,110:D,119:S,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M}),t(Xt,Nt,{53:285,54:$t}),t(sn,[2,183]),{7:286,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:287,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:288,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Pt,[2,161]),{27:164,28:i,44:165,58:166,59:167,76:y,89:pt,90:dt,116:289},t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,106,110,126],[2,168],{112:69,103:85,109:86,105:[1,290],111:[1,291],129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(on,[2,169],{112:69,103:85,109:86,105:[1,292],129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{6:an,25:cn,78:[1,293]},t([6,25,26,78],zt,{42:173,10:174,27:175,29:176,44:177,41:296,28:i,30:r,31:s,46:d,89:pt}),{7:297,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,298],27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(wt,[2,86]),{7:299,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,73:[2,121],76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{73:[2,122],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},t(At,[2,36],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{26:[1,300],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},{6:nn,25:rn,86:[1,301]},t(jt,tn),{24:302,25:ft},t(Dt,[2,56]),{27:109,28:i,44:110,55:303,56:107,57:ut,58:111,59:112,76:y,89:pt,90:dt},t(hn,lt,{55:106,56:107,27:109,44:110,58:111,59:112,48:304,28:i,57:ut,76:y,89:pt,90:dt}),t(Dt,[2,61],{112:69,103:85,109:86,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Zt,[2,24]),{26:[1,305],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},t(At,[2,211],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{24:306,25:ft,103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},{24:307,25:ft},t(Z,[2,136]),{24:308,25:ft},{24:309,25:ft},t(ln,[2,140]),{26:[1,310],121:[1,311],122:274,123:It},t(Z,[2,177]),{24:312,25:ft},t(Qt,[2,180]),{24:313,25:ft,54:[1,314]},t(un,[2,132],{112:69,103:85,109:86,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Z,[2,99]),t(en,[2,102],{112:69,103:85,109:86,24:315,25:ft,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{102:[1,316]},{91:[1,317],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},t(Ot,[2,116]),{7:207,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,94:318,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:207,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:bt,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,57:vt,58:47,59:48,60:152,61:36,63:23,64:24,65:25,76:y,79:b,83:v,87:319,88:k,89:w,90:T,94:150,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(jt,[2,125]),{6:nn,25:rn,26:[1,320]},t(Bt,[2,145],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Bt,[2,147],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Bt,[2,158],{112:69,103:85,109:86,104:E,106:N,110:D,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(Pt,[2,167]),{7:321,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:322,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:323,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Ot,[2,90]),{10:174,27:175,28:i,29:176,30:r,31:s,41:324,42:173,44:177,46:d,89:pt},t(hn,Tt,{41:172,42:173,10:174,27:175,29:176,44:177,77:325,28:i,30:r,31:s,46:d,89:pt}),t(qt,[2,93]),t(qt,[2,39],{112:69,103:85,109:86,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{7:326,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{73:[2,120],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},t(Z,[2,37]),t(at,[2,111]),t(Z,[2,48]),t(Dt,[2,57]),t(Xt,Nt,{53:327,54:xt}),t(Z,[2,210]),t(sn,[2,184]),t(Z,[2,137]),t(ln,[2,138]),t(ln,[2,139]),t(Z,[2,175]),{24:328,25:ft},{26:[1,329]},t(Qt,[2,181],{6:[1,330]}),{7:331,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},t(Z,[2,103]),t(at,[2,143]),t(at,[2,119]),t(jt,[2,126]),t(Xt,Nt,{53:332,54:$t}),t(jt,[2,127]),t([1,6,25,26,49,54,57,73,78,86,91,93,102,104,105,106,110,126],[2,170],{112:69,103:85,109:86,111:[1,333],129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(on,[2,172],{112:69,103:85,109:86,105:[1,334],129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(At,[2,171],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(qt,[2,94]),t(Xt,Nt,{53:335,54:Ut}),{26:[1,336],103:85,104:E,106:N,109:86,110:D,112:69,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K},{6:Kt,25:Jt,26:[1,337]},{26:[1,338]},t(Z,[2,178]),t(Qt,[2,182]),t(un,[2,133],{112:69,103:85,109:86,104:E,106:N,110:D,126:V,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),{6:nn,25:rn,26:[1,339]},{7:340,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{7:341,8:118,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:s,32:22,33:o,34:a,35:c,36:h,37:l,38:u,39:21,44:63,45:p,46:d,47:f,50:28,51:m,52:g,58:47,59:48,61:36,63:23,64:24,65:25,76:y,79:b,83:v,88:k,89:w,90:T,96:C,100:F,101:L,103:39,104:E,106:N,107:40,108:x,109:41,110:D,112:69,119:S,124:37,125:R,127:A,128:I,129:_,130:O,131:$,133:j,134:M},{6:an,25:cn,26:[1,342]},t(qt,[2,40]),t(Dt,[2,58]),t(Z,[2,176]),t(jt,[2,128]),t(At,[2,173],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(At,[2,174],{112:69,103:85,109:86,129:U,130:q,135:H,136:W,137:G,138:Y,139:X,140:z,141:K}),t(qt,[2,95])],defaultActions:{60:[2,50],61:[2,51],92:[2,109],196:[2,89]},parseError:function(e,t){if(!t.recoverable)throw Error(e); this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||p,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],r=[null],s=[],o=this.table,a="",c=0,h=0,l=0,u=2,p=1,d=s.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,f.yylloc===void 0&&(f.yylloc={});var y=f.yylloc;s.push(y);var b=f.options&&f.options.ranges;this.parseError="function"==typeof m.yy.parseError?m.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,k,w,T,C,F,L,E,N,x={};;){if(w=i[i.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((null===v||v===void 0)&&(v=t()),T=o[w]&&o[w][v]),T===void 0||!T.length||!T[0]){var D="";N=[];for(F in o[w])this.terminals_[F]&&F>u&&N.push("'"+this.terminals_[F]+"'");D=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(c+1)+": Unexpected "+(v==p?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(D,{text:f.match,token:this.terminals_[v]||v,line:f.yylineno,loc:y,expected:N})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+v);switch(T[0]){case 1:i.push(v),r.push(f.yytext),s.push(f.yylloc),i.push(T[1]),v=null,k?(v=k,k=null):(h=f.yyleng,a=f.yytext,c=f.yylineno,y=f.yylloc,l>0&&l--);break;case 2:if(L=this.productions_[T[1]][1],x.$=r[r.length-L],x._$={first_line:s[s.length-(L||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(L||1)].first_column,last_column:s[s.length-1].last_column},b&&(x._$.range=[s[s.length-(L||1)].range[0],s[s.length-1].range[1]]),C=this.performAction.apply(x,[a,h,c,m.yy,T[1],r,s].concat(d)),C!==void 0)return C;L&&(i=i.slice(0,2*-1*L),r=r.slice(0,-1*L),s=s.slice(0,-1*L)),i.push(this.productions_[T[1]][0]),r.push(x.$),s.push(x._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0}};return e.prototype=pn,pn.Parser=e,new e}();return require!==void 0&&e!==void 0&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=require("fs").readFileSync(require("path").normalize(t[1]),"utf8");return e.parser.parse(n)},t!==void 0&&require.main===t&&e.main(process.argv.slice(1))),t.exports}(),require["./scope"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};r=require("./helpers"),n=r.extend,i=r.last,e.Scope=t=function(){function e(e,t,n,i){var r,s;this.parent=e,this.expressions=t,this.method=n,this.referencedVars=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(this.utilities={}),this.root=null!=(r=null!=(s=this.parent)?s.root:void 0)?r:this}return e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return(null!=(e=this.method)?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){return this.shared&&this.parent.check(e,!0)?void 0:this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||(null!=(t=this.parent)?t.check(e):void 0))},e.prototype.temporary=function(e,t){return e.length>1?"_"+e+(t>1?t-1:""):"_"+(t+parseInt(e,36)).toString(36).replace(/\d/g,"a")},e.prototype.type=function(e){var t,n,i,r;for(r=this.variables,n=0,i=r.length;i>n;n++)if(t=r[n],t.name===e)return t.type;return null},e.prototype.freeVariable=function(e,t){var n,i;for(null==t&&(t=!0),n=0;;){if(i=this.temporary(e,n),!(this.check(i)||s.call(this.root.referencedVars,i)>=0))break;n++}return t&&this.add(i,"var",!0),i},e.prototype.assign=function(e,t){return this.add(e,{value:t,assigned:!0},!0),this.hasAssignments=!0},e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},e.prototype.declaredVariables=function(){var e,t,n,i,r,s;for(e=[],t=[],s=this.variables,i=0,r=s.length;r>i;i++)n=s[i],"var"===n.type&&("_"===n.name.charAt(0)?t:e).push(n.name);return e.sort().concat(t.sort())},e.prototype.assignedVariables=function(){var e,t,n,i,r;for(i=this.variables,r=[],t=0,n=i.length;n>t;t++)e=i[t],e.type.assigned&&r.push(e.name+" = "+e.type.value);return r},e}()}.call(this),t.exports}(),require["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v,k,w,T,C,F,L,E,N,x,D,S,R,A,I,_,O,$,j,M,B,P,V,U,q,H,W,G,Y,X,z,K,J,Z,Q,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut,pt,dt,ft,mt,gt,yt,bt,vt,kt,wt,Tt=function(e,t){function n(){this.constructor=e}for(var i in t)Ct.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Ct={}.hasOwnProperty,Ft=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},Lt=[].slice;Error.stackTraceLimit=1/0,q=require("./scope").Scope,kt=require("./lexer"),M=kt.RESERVED,U=kt.STRICT_PROSCRIBED,wt=require("./helpers"),nt=wt.compact,ot=wt.flatten,st=wt.extend,pt=wt.merge,it=wt.del,gt=wt.starts,rt=wt.ends,lt=wt.last,mt=wt.some,tt=wt.addLocationDataFn,ut=wt.locationDataToString,yt=wt.throwSyntaxError,e.extend=st,e.addLocationDataFn=tt,et=function(){return!0},A=function(){return!1},X=function(){return this},R=function(){return this.negated=!this.negated,this},e.CodeFragment=h=function(){function e(e,t){var n;this.code=""+t,this.locationData=null!=e?e.locationData:void 0,this.type=(null!=e?null!=(n=e.constructor)?n.name:void 0:void 0)||"unknown"}return e.prototype.toString=function(){return""+this.code+(this.locationData?": "+ut(this.locationData):"")},e}(),at=function(e){var t;return function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.code);return r}().join("")},e.Base=r=function(){function e(){}return e.prototype.compile=function(e,t){return at(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=st({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==x&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var n,i,r,a,h,l;return(a=this.jumps())&&a.error("cannot use a pure statement in an expression"),e.sharedScope=!0,r=new c([],s.wrap([this])),n=[],((i=this.contains(ct))||this.contains(ht))&&(n=[new D("this")],i?(h="apply",n.push(new D("arguments"))):h="call",r=new Z(r,[new t(new D(h))])),l=new o(r,n).compileNode(e),r.isGenerator&&(l.unshift(this.makeCode("(yield* ")),l.push(this.makeCode(")"))),l},e.prototype.cache=function(e,t,n){var r,s;return this.isComplex()?(r=new D(n||e.scope.freeVariable("ref")),s=new i(r,this),t?[s.compileToFragments(e,t),[this.makeCode(r.value)]]:[s,r]):(r=t?this.compileToFragments(e,t):this,[r,r])},e.prototype.cacheToCodeFragments=function(e){return[at(e[0]),at(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new o(new D(e+".push"),[t]):new P(t)},e.prototype.contains=function(e){var t;return t=void 0,this.traverseChildren(!1,function(n){return e(n)?(t=n,!1):void 0}),t},e.prototype.lastNonComment=function(e){var t;for(t=e.length;t--;)if(!(e[t]instanceof l))return e[t];return null},e.prototype.toString=function(e,t){var n;return null==e&&(e=""),null==t&&(t=this.constructor.name),n="\n"+e+t,this.soak&&(n+="?"),this.eachChild(function(t){return n+=t.toString(e+Y)}),n},e.prototype.eachChild=function(e){var t,n,i,r,s,o,a,c;if(!this.children)return this;for(a=this.children,i=0,s=a.length;s>i;i++)if(t=a[i],this[t])for(c=ot([this[t]]),r=0,o=c.length;o>r;r++)if(n=c[r],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var i;return i=t(n),i!==!1?n.traverseChildren(e,t):void 0})},e.prototype.invert=function(){return new O("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=A,e.prototype.jumps=A,e.prototype.isComplex=et,e.prototype.isChainable=A,e.prototype.isAssignable=A,e.prototype.unwrap=X,e.prototype.unfoldSoak=A,e.prototype.assigns=A,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return yt(e,this.locationData)},e.prototype.makeCode=function(e){return new h(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,r,s,o;for(n=[],r=s=0,o=e.length;o>s;r=++s)i=e[r],r&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=s=function(e){function t(e){this.expressions=nt(ot(e||[]))}return Tt(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,i,r;for(r=this.expressions,n=0,i=r.length;i>n;n++)if(t=r[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,r,s;for(s=this.expressions,i=0,r=s.length;r>i;i++)if(t=s[i],n=t.jumps(e))return n},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof l)){this.expressions[n]=t.makeReturn(e),t instanceof P&&!t.expression&&this.expressions.splice(n,1);break}return this},t.prototype.compileToFragments=function(e,n){return null==e&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,i,r,s,o,a,c,h,l;for(this.tab=e.indent,a=e.level===x,i=[],l=this.expressions,s=c=0,h=l.length;h>c;s=++c)o=l[s],o=o.unwrapAll(),o=o.unfoldSoak(e)||o,o instanceof t?i.push(o.compileNode(e)):a?(o.front=!0,r=o.compileToFragments(e),o.isStatement(e)||(r.unshift(this.makeCode(""+this.tab)),r.push(this.makeCode(";"))),i.push(r)):i.push(o.compileToFragments(e,L));return a?this.spaced?[].concat(this.joinFragmentArrays(i,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(i,"\n"):(n=i.length?this.joinFragmentArrays(i,", "):[this.makeCode("void 0")],i.length>1&&e.level>=L?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,r,s,o,a,c,h,u,p;for(e.indent=e.bare?"":Y,e.level=x,this.spaced=!0,e.scope=new q(null,this,null,null!=(u=e.referencedVars)?u:[]),p=e.locals||[],c=0,h=p.length;h>c;c++)r=p[c],e.scope.parameter(r);return s=[],e.bare||(o=function(){var e,n,r,s;for(r=this.expressions,s=[],i=e=0,n=r.length;n>e&&(t=r[i],t.unwrap()instanceof l);i=++e)s.push(t);return s}.call(this),a=this.expressions.slice(o.length),this.expressions=o,o.length&&(s=this.compileNode(pt(e,{indent:""})),s.push(this.makeCode("\n"))),this.expressions=a),n=this.compileWithDeclarations(e),e.bare?n:[].concat(s,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,r,s,o,a,c,h,u,p,d,f,m;for(r=[],o=[],d=this.expressions,s=u=0,p=d.length;p>u&&(i=d[s],i=i.unwrap(),i instanceof l||i instanceof D);s=++u);return e=pt(e,{level:x}),s&&(a=this.expressions.splice(s,9e9),f=[this.spaced,!1],h=f[0],this.spaced=f[1],m=[this.compileNode(e),h],r=m[0],this.spaced=m[1],this.expressions=a),o=this.compileNode(e),c=e.scope,c.expressions===this&&(n=e.scope.hasDeclarations(),t=c.hasAssignments,n||t?(s&&r.push(this.makeCode("\n")),r.push(this.makeCode(this.tab+"var ")),n&&r.push(this.makeCode(c.declaredVariables().join(", "))),t&&(n&&r.push(this.makeCode(",\n"+(this.tab+Y))),r.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+Y))))),r.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):r.length&&o.length&&r.push(this.makeCode("\n"))),r.concat(o)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(r),e.Literal=D=function(e){function t(e){this.value=e}return Tt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=A,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){return"break"!==this.value||(null!=e?e.loop:void 0)||(null!=e?e.block:void 0)?"continue"!==this.value||(null!=e?e.loop:void 0)?void 0:this:this},t.prototype.compileNode=function(e){var t,n,i;return n="this"===this.value?(null!=(i=e.scope.method)?i.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(r),e.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isAssignable=A,t.prototype.isComplex=A,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=C?"(void 0)":"void 0")]},t}(r),e.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isAssignable=A,t.prototype.isComplex=A,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(r),e.Bool=function(e){function t(e){this.val=e}return Tt(t,e),t.prototype.isAssignable=A,t.prototype.isComplex=A,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(r),e.Return=P=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=et,t.prototype.makeReturn=X,t.prototype.jumps=X,t.prototype.compileToFragments=function(e,n){var i,r;return i=null!=(r=this.expression)?r.makeReturn():void 0,!i||i instanceof t?t.__super__.compileToFragments.call(this,e,n):i.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t;return t=[],t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,N))),t.push(this.makeCode(";")),t},t}(r),e.Value=Z=function(e){function t(e,n,i){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],i&&(this[i]=!0),this)}return Tt(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(n)},t.prototype.isRange=function(){return this.bareLiteral(B)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.bareLiteral(D)&&V.test(this.base.value)},t.prototype.isString=function(){return this.bareLiteral(D)&&v.test(this.base.value)},t.prototype.isRegex=function(){return this.bareLiteral(D)&&b.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,i;for(i=this.properties.concat(this.base),t=0,n=i.length;n>t;t++)if(e=i[t],e.soak||e instanceof o)return!1;return!0},t.prototype.isNotCallable=function(){return this.isSimpleNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof _&&(!e||this.base.generated)},t.prototype.isSplice=function(){return lt(this.properties)instanceof H},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&this.properties.length&&"prototype"!==(null!=(t=this.properties[0].name)?t.value:void 0)},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,s,o;return s=lt(this.properties),2>this.properties.length&&!this.base.isComplex()&&!(null!=s?s.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new D(e.scope.freeVariable("base")),n=new t(new j(new i(r,n)))),s?(s.isComplex()&&(o=new D(e.scope.freeVariable("name")),s=new T(new i(o,s.index)),o=new T(o)),[n.add(s),new t(r||n.base,[o||s])]):[n,r])},t.prototype.compileNode=function(e){var t,n,i,r,s;for(this.base.front=this.front,i=this.properties,t=this.base.compileToFragments(e,i.length?C:null),(this.base instanceof j||i.length)&&V.test(at(t))&&t.push(this.makeCode(".")),r=0,s=i.length;s>r;r++)n=i[r],t.push.apply(t,n.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,s,o,a,c,h,l,p,d,f;if(o=n.base.unfoldSoak(e))return(d=o.body.properties).push.apply(d,n.properties),o;for(f=n.properties,s=l=0,p=f.length;p>l;s=++l)if(a=f[s],a.soak)return a.soak=!1,r=new t(n.base,n.properties.slice(0,s)),h=new t(n.base,n.properties.slice(s)),r.isComplex()&&(c=new D(e.scope.freeVariable("ref")),r=new j(new i(c,r)),h.base=c),new k(new u(r),h,{soak:!0});return!1}}(this)()},t}(r),e.Comment=l=function(e){function t(e){this.comment=e}return Tt(t,e),t.prototype.isStatement=et,t.prototype.makeReturn=X,t.prototype.compileNode=function(e,t){var n,i;return i=this.comment.replace(/^(\s*)# /gm,"$1 * "),n="/*"+dt(i,this.tab)+(Ft.call(i,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===x&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(r),e.Call=o=function(e){function n(e,t,n){this.args=null!=t?t:[],this.soak=n,this.isNew=!1,this.isSuper="super"===e,this.variable=this.isSuper?null:e,e instanceof Z&&e.isNotCallable()&&e.error("literal is not a function")}return Tt(n,e),n.prototype.children=["variable","args"],n.prototype.newInstance=function(){var e,t;return e=(null!=(t=this.variable)?t.base:void 0)||this.variable,e instanceof n&&!e.isNew?e.newInstance():this.isNew=!0,this},n.prototype.superReference=function(e){var n,i;return i=e.scope.namedMethod(),(null!=i?i.klass:void 0)?(n=[new t(new D("__super__"))],i["static"]&&n.push(new t(new D("constructor"))),n.push(new t(new D(i.name))),new Z(new D(i.klass),n).compile(e)):(null!=i?i.ctor:void 0)?i.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},n.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},n.prototype.unfoldSoak=function(e){var t,i,r,s,o,a,c,h,l;if(this.soak){if(this.variable){if(i=bt(e,this,"variable"))return i;h=new Z(this.variable).cacheReference(e),r=h[0],o=h[1]}else r=new D(this.superReference(e)),o=new Z(r);return o=new n(o,this.args),o.isNew=this.isNew,r=new D("typeof "+r.compile(e)+' === "function"'),new k(r,new Z(o),{soak:!0})}for(t=this,s=[];;)if(t.variable instanceof n)s.push(t),t=t.variable;else{if(!(t.variable instanceof Z))break;if(s.push(t),!((t=t.variable.base)instanceof n))break}for(l=s.reverse(),a=0,c=l.length;c>a;a++)t=l[a],i&&(t.variable instanceof n?t.variable=i:t.variable.base=i),i=bt(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l;if(null!=(h=this.variable)&&(h.front=this.front),r=W.compileSplattedArray(e,this.args,!0),r.length)return this.compileSplat(e,r);for(i=[],l=this.args,n=a=0,c=l.length;c>a;n=++a)t=l[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,L));return s=[],this.isSuper?(o=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(o+=", "),s.push(this.makeCode(o))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,C)),s.push(this.makeCode("("))),s.push.apply(s,i),s.push(this.makeCode(")")),s},n.prototype.compileSplat=function(e,t){var n,i,r,s,o,a;return this.isSuper?[].concat(this.makeCode(this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+Y,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,L),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new Z(this.variable),(o=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,L),this.makeCode(")"),o.compileToFragments(e))):(r=i.compileToFragments(e,C),V.test(at(r))&&(r=this.wrapInBraces(r)),o?(a=at(r),r.push.apply(r,o.compileToFragments(e))):a="null",n=n.concat(r)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},n}(r),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return Tt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new o(new Z(new D(vt("extends",e))),[this.child,this.parent]).compileToFragments(e)},t}(r),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return Tt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(at(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=A,t}(r),e.Index=T=function(e){function t(e){this.index=e}return Tt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,N),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(r),e.Range=B=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return Tt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,r,s;return e=pt(e,{top:!0}),n=this.cacheToCodeFragments(this.from.cache(e,L)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,L)),this.toC=i[0],this.toVar=i[1],(t=it(e,"step"))&&(r=this.cacheToCodeFragments(t.cache(e,L)),this.step=r[0],this.stepVar=r[1]),s=[this.fromVar.match(I),this.toVar.match(I)],this.fromNum=s[0],this.toNum=s[1],this.stepVar?this.stepNum=this.stepVar.match(I):void 0},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=this.fromNum&&this.toNum,s=it(e,"index"),o=it(e,"name"),h=o&&o!==s,p=s+" = "+this.fromC,this.toC!==this.toVar&&(p+=", "+this.toC),this.step!==this.stepVar&&(p+=", "+this.step),d=[s+" <"+this.equals,s+" >"+this.equals],c=d[0],r=d[1],n=this.stepNum?ft(this.stepNum[0])>0?c+" "+this.toVar:r+" "+this.toVar:a?(f=[ft(this.fromNum[0]),ft(this.toNum[0])],i=f[0],u=f[1],f,u>=i?c+" "+u:r+" "+u):(t=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,t+" ? "+c+" "+this.toVar+" : "+r+" "+this.toVar),l=this.stepVar?s+" += "+this.stepVar:a?h?u>=i?"++"+s:"--"+s:u>=i?s+"++":s+"--":h?t+" ? ++"+s+" : --"+s:t+" ? "+s+"++ : "+s+"--",h&&(p=o+" = "+p),h&&(l=o+" = "+l),[this.makeCode(p+"; "+n+"; "+l)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d;return this.fromNum&&this.toNum&&20>=Math.abs(this.fromNum-this.toNum)?(h=function(){d=[];for(var e=p=+this.fromNum,t=+this.toNum;t>=p?t>=e:e>=t;t>=p?e++:e--)d.push(e);return d}.apply(this),this.exclusive&&h.pop(),[this.makeCode("["+h.join(", ")+"]")]):(o=this.tab+Y,s=e.scope.freeVariable("i"),l=e.scope.freeVariable("results"),c="\n"+o+l+" = [];",this.fromNum&&this.toNum?(e.index=s,n=at(this.compileNode(e))):(u=s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=this.fromVar+" <= "+this.toVar,n="var "+u+"; "+i+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+s+"++ : "+s+"--"),a="{ "+l+".push("+s+"); }\n"+o+"return "+l+";\n"+e.indent,r=function(e){return null!=e?e.contains(ct):void 0},(r(this.from)||r(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+o+"for ("+n+")"+a+"}).apply(this"+(null!=t?t:"")+")")])},t}(r),e.Slice=H=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return Tt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;return a=this.range,s=a.to,i=a.from,r=i&&i.compileToFragments(e,N)||[this.makeCode("0")],s&&(t=s.compileToFragments(e,N),n=at(t),(this.range.exclusive||-1!==+n)&&(o=", "+(this.range.exclusive?n:V.test(n)?""+(+n+1):(t=s.compileToFragments(e,C),"+"+at(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+at(r)+(o||"")+")")]},t}(r),e.Obj=_=function(e){function t(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return Tt(t,e),t.prototype.children=["properties"],t.prototype.compileNode=function(e){var t,n,r,s,o,a,c,h,u,p,d,f,m;if(u=this.properties,!u.length)return[this.makeCode(this.front?"({})":"{}")];if(this.generated)for(p=0,f=u.length;f>p;p++)c=u[p],c instanceof Z&&c.error("cannot have an implicit value in an implicit object");for(r=e.indent+=Y,a=this.lastNonComment(this.properties),t=[],n=d=0,m=u.length;m>d;n=++d)h=u[n],o=n===u.length-1?"":h===a||h instanceof l?"\n":",\n",s=h instanceof l?"":r,h instanceof i&&h.variable instanceof Z&&h.variable.hasProperties()&&h.variable.error("Invalid object key"),h instanceof Z&&h["this"]&&(h=new i(h.properties[0].name,h,"object")),h instanceof l||(h instanceof i||(h=new i(h,h,"object")),(h.variable.base||h.variable).asKey=!0),s&&t.push(this.makeCode(s)),t.push.apply(t,h.compileToFragments(e,x)),o&&t.push(this.makeCode(o));return t.unshift(this.makeCode("{"+(u.length&&"\n"))),t.push(this.makeCode((u.length&&"\n"+this.tab)+"}")),this.front?this.wrapInBraces(t):t},t.prototype.assigns=function(e){var t,n,i,r;for(r=this.properties,n=0,i=r.length;i>n;n++)if(t=r[n],t.assigns(e))return!0;return!1},t}(r),e.Arr=n=function(e){function t(e){this.objects=e||[]}return Tt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=Y,t=W.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,r;for(i=this.objects,r=[],t=0,n=i.length;n>t;t++)s=i[t],r.push(s.compileToFragments(e,L));return r}.call(this),r=o=0,a=n.length;a>o;r=++o)i=n[r],r&&t.push(this.makeCode(", ")),t.push.apply(t,i);return at(t).indexOf("\n")>=0?(t.unshift(this.makeCode("[\n"+e.indent)),t.push(this.makeCode("\n"+this.tab+"]"))):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.assigns=function(e){var t,n,i,r;for(r=this.objects,n=0,i=r.length;i>n;n++)if(t=r[n],t.assigns(e))return!0;return!1},t}(r),e.Class=a=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new s,this.boundFuncs=[],this.body.classBody=!0}return Tt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n;return this.variable?(e=(n=lt(this.variable.properties))?n instanceof t&&n.name.value:this.variable.base.value,Ft.call(U,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof D&&"this"===t.value?t.value=e:t instanceof c&&(t.klass=e,t.bound)?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,r,s,o;for(o=this.boundFuncs,r=0,s=o.length;s>r;r++)n=o[r],i=new Z(new D("this"),[new t(n)]).compile(e),this.ctor.body.unshift(new D(i+" = "+vt("bind",e)+"("+i+", this)"))},n.prototype.addProperties=function(e,n,r){var s,o,a,h,l;return l=e.base.properties.slice(0),a=function(){var e;for(e=[];s=l.shift();)s instanceof i&&(o=s.variable.base,delete s.context,h=s.value,"constructor"===o.value?(this.ctor&&s.error("cannot define more than one constructor in a class"),h.bound&&s.error("cannot define a constructor as a bound function"),h instanceof c?s=this.ctor=h:(this.externalCtor=r.classScope.freeVariable("class"),s=new i(new D(this.externalCtor),h))):s.variable["this"]?h["static"]=!0:(s.variable=new Z(new D(n),[new t(new D("prototype")),new t(o)]),h instanceof c&&h.bound&&(this.boundFuncs.push(o),h.bound=!1))),e.push(s);return e}.call(this),nt(a)},n.prototype.walkBody=function(e,t){return this.traverseChildren(!1,function(r){return function(o){var a,c,h,l,u,p,d;if(a=!0,o instanceof n)return!1;if(o instanceof s){for(d=c=o.expressions,h=u=0,p=d.length;p>u;h=++u)l=d[h],l instanceof i&&l.variable.looksStatic(e)?l.value["static"]=!0:l instanceof Z&&l.isObject(!0)&&(a=!1,c[h]=r.addProperties(l,e,t));o.expressions=c=ot(c)}return a&&!(o instanceof n)}}(this))},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof l||n instanceof Z&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new c,this.externalCtor?this.ctor.body.push(new D(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new D(e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},n.prototype.compileNode=function(e){var t,n,r,a,h,l,u,p,f;return(a=this.body.jumps())&&a.error("Class bodies cannot contain pure statements"),(n=this.body.contains(ct))&&n.error("Class bodies shouldn't reference arguments"),u=this.determineName()||"_Class",u.reserved&&(u="_"+u),l=new D(u),r=new c([],s.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(u),this.walkBody(u,e),this.ensureConstructor(u),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(l),this.parent&&(p=new D(e.classScope.freeVariable("super",!1)),this.body.expressions.unshift(new d(l,p)),r.params.push(new $(p)),t.push(this.parent)),(f=this.body.expressions).unshift.apply(f,this.directives),h=new j(new o(r,t)),this.variable&&(h=new i(this.variable,h)),h.compileToFragments(e)},n}(r),e.Assign=i=function(e){function n(e,t,n,i){var r,s,o;this.variable=e,this.value=t,this.context=n,this.param=i&&i.param,this.subpattern=i&&i.subpattern,o=s=this.variable.unwrapAll().value,r=Ft.call(U,o)>=0,r&&"object"!==this.context&&this.variable.error('variable name may not be "'+s+'"')}return Tt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===x&&null!=this.context&&Ft.call(this.context,"?")>=0},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return bt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,h,l,u,p;if(i=this.variable instanceof Z){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(h=this.context)||"&&="===h||"?="===h)return this.compileConditional(e);if("**="===(l=this.context)||"//="===l||"%%="===l)return this.compileSpecialMath(e)}return n=this.variable.compileToFragments(e,L),s=at(n),this.context||(a=this.variable.unwrapAll(),a.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned'),("function"==typeof a.hasProperties?a.hasProperties():void 0)||(this.param?e.scope.add(s,"var"):e.scope.find(s))),this.value instanceof c&&(r=S.exec(s))&&(r[2]&&(this.value.klass=r[1]),this.value.name=null!=(u=null!=(p=r[3])?p:r[4])?u:r[5]),o=this.value.compileToFragments(e,L),"object"===this.context?n.concat(this.makeCode(": "),o):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),o),L>=e.level?t:this.wrapInBraces(t)) -},n.prototype.compilePatternMatch=function(e){var i,r,s,o,a,c,h,l,u,d,f,m,y,b,v,k,w,C,F,N,S,R,A,I,_,O,$,B;if(k=e.level===x,C=this.value,m=this.variable.base.objects,!(y=m.length))return s=C.compileToFragments(e),e.level>=E?this.wrapInBraces(s):s;if(l=this.variable.isObject(),k&&1===y&&!((f=m[0])instanceof W))return f instanceof n?(A=f,I=A.variable,h=I.base,f=A.value):h=l?f["this"]?f.properties[0].name:f:new D(0),i=g.test(h.unwrap().value||0),C=new Z(C),C.properties.push(new(i?t:T)(h)),_=f.unwrap().value,Ft.call(M,_)>=0&&f.error("assignment to a reserved word: "+f.compile(e)),new n(f,C,null,{param:this.param}).compileToFragments(e,x);for(F=C.compileToFragments(e,L),N=at(F),r=[],o=!1,(!g.test(N)||this.variable.assigns(N))&&(r.push([this.makeCode((b=e.scope.freeVariable("ref"))+" = ")].concat(Lt.call(F))),F=[this.makeCode(b)],N=b),c=S=0,R=m.length;R>S;c=++S){if(f=m[c],h=c,l&&(f instanceof n?(O=f,$=O.variable,h=$.base,f=O.value):f.base instanceof j?(B=new Z(f.unwrapAll()).cacheReference(e),f=B[0],h=B[1]):h=f["this"]?f.properties[0].name:f),!o&&f instanceof W)d=f.name.unwrap().value,f=f.unwrap(),w=y+" <= "+N+".length ? "+vt("slice",e)+".call("+N+", "+c,(v=y-c-1)?(u=e.scope.freeVariable("i"),w+=", "+u+" = "+N+".length - "+v+") : ("+u+" = "+c+", [])"):w+=") : []",w=new D(w),o=u+"++";else{if(!o&&f instanceof p){(v=y-c-1)&&(1===v?o=N+".length - 1":(u=e.scope.freeVariable("i"),w=new D(u+" = "+N+".length - "+v),o=u+"++",r.push(w.compileToFragments(e,L))));continue}d=f.unwrap().value,(f instanceof W||f instanceof p)&&f.error("multiple splats/expansions are disallowed in an assignment"),"number"==typeof h?(h=new D(o||h),i=!1):i=l&&g.test(h.unwrap().value||0),w=new Z(new D(N),[new(i?t:T)(h)])}null!=d&&Ft.call(M,d)>=0&&f.error("assignment to a reserved word: "+f.compile(e)),r.push(new n(f,w,null,{param:this.param,subpattern:!0}).compileToFragments(e,L))}return k||this.subpattern||r.push(F),a=this.joinFragmentArrays(r,", "),L>e.level?a:this.wrapInBraces(a)},n.prototype.compileConditional=function(e){var t,i,r,s;return s=this.variable.cacheReference(e),i=s[0],r=s[1],!i.properties.length&&i.base instanceof D&&"this"!==i.base.value&&!e.scope.check(i.base.value)&&this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Ft.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new k(new u(i),r,{type:"if"}).addElse(new n(r,this.value,"=")).compileToFragments(e)):(t=new O(this.context.slice(0,-1),i,new n(r,this.value,"=")).compileToFragments(e),L>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return r=this.variable.cacheReference(e),t=r[0],i=r[1],new n(t,new O(this.context.slice(0,-1),i,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;return l=this.variable.properties.pop().range,i=l.from,a=l.to,n=l.exclusive,o=this.variable.compile(e),i?(u=this.cacheToCodeFragments(i.cache(e,E)),r=u[0],s=u[1]):r=s="0",a?i instanceof Z&&i.isSimpleNumber()&&a instanceof Z&&a.isSimpleNumber()?(a=a.compile(e)-s,n||(a+=1)):(a=a.compile(e,C)+" - "+s,n||(a+=" + 1")):a="9e9",p=this.value.cache(e,L),c=p[0],h=p[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+r+", "+a+"].concat("),c,this.makeCode(")), "),h),e.level>x?this.wrapInBraces(t):t},n}(r),e.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new s,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){var t;return e instanceof O&&("yield"===(t=e.operator)||"yield*"===t)})}return Tt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=A,t.prototype.makeScope=function(e){return new q(e,this.body,this)},t.prototype.compileNode=function(e){var r,a,c,h,l,u,d,f,m,g,y,b,v,w,T,F,L,E,N,x,S,R,A,I,_,j,M,B,P,V,U,q,H;if(this.bound&&(null!=(B=e.scope.method)?B.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",T=new t([new $(new D(this.context))],new s([this])),a=new o(T,[new D("this")]),a.updateLocationDataIfMissing(this.locationData),a.compileNode(e);for(e.scope=it(e,"classScope")||this.makeScope(e.scope),e.scope.shared=it(e,"sharedScope"),e.indent+=Y,delete e.bare,delete e.isExistentialEquals,m=[],h=[],P=this.params,F=0,x=P.length;x>F;F++)f=P[F],f instanceof p||e.scope.parameter(f.asReference(e));for(V=this.params,L=0,S=V.length;S>L;L++)if(f=V[L],f.splat||f instanceof p){for(U=this.params,E=0,R=U.length;R>E;E++)d=U[E],d instanceof p||!d.name.value||e.scope.add(d.name.value,"var",!0);y=new i(new Z(new n(function(){var t,n,i,r;for(i=this.params,r=[],t=0,n=i.length;n>t;t++)d=i[t],r.push(d.asReference(e));return r}.call(this))),new Z(new D("arguments")));break}for(q=this.params,N=0,A=q.length;A>N;N++)f=q[N],f.isComplex()?(v=g=f.asReference(e),f.value&&(v=new O("?",g,f.value)),h.push(new i(new Z(f.name),v,"=",{param:!0}))):(g=f,f.value&&(u=new D(g.name.value+" == null"),v=new i(new Z(f.name),f.value,"="),h.push(new k(u,v)))),y||m.push(g);for(w=this.body.isEmpty(),y&&h.unshift(y),h.length&&(H=this.body.expressions).unshift.apply(H,h),l=j=0,I=m.length;I>j;l=++j)d=m[l],m[l]=d.compileToFragments(e),e.scope.parameter(at(m[l]));for(b=[],this.eachParamName(function(e,t){return Ft.call(b,e)>=0&&t.error("multiple parameters named "+e),b.push(e)}),w||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],l=M=0,_=m.length;_>M;l=++M)d=m[l],l&&r.push(this.makeCode(", ")),r.push.apply(r,d);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Lt.call(r)):this.front||e.level>=C?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,s;for(r=this.params,s=[],n=0,i=r.length;i>n;n++)t=r[n],s.push(t.eachName(e));return s},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=$=function(e){function t(e,t,n){var i,r;this.name=e,this.value=t,this.splat=n,r=i=this.name.unwrapAll().value,Ft.call(U,r)>=0&&this.name.error('parameter name "'+i+'" is not allowed')}return Tt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,L)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t="at_"+n.properties[0].name.value,n=new D(e.scope.freeVariable(t))):n.isComplex()&&(n=new D(e.scope.freeVariable("arg"))),n=new Z(n),this.splat&&(n=new W(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,s,o,a,c;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof D)return e(t.value,t);if(t instanceof Z)return n(t);for(c=t.objects,o=0,a=c.length;a>o;o++)s=c[o],s instanceof i?this.eachName(e,s.value.unwrap()):s instanceof W?(r=s.name.unwrap(),e(r.value,r)):s instanceof Z?s.isArray()||s.isObject()?this.eachName(e,s.base):s["this"]?n(s):e(s.base.value,s.base):s instanceof p||s.error("illegal parameter "+s.compile())},t}(r),e.Splat=W=function(e){function t(e){this.name=e.compile?e:new D(e)}return Tt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=et,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,s,o,a,c,h,l,u,p,d;for(l=-1;(u=n[++l])&&!(u instanceof t););if(l>=n.length)return[];if(1===n.length)return u=n[0],c=u.compileToFragments(e,L),i?c:[].concat(u.makeCode(vt("slice",e)+".call("),c,u.makeCode(")"));for(r=n.slice(l),h=p=0,d=r.length;d>p;h=++p)u=r[h],o=u.compileToFragments(e,L),r[h]=u instanceof t?[].concat(u.makeCode(vt("slice",e)+".call("),o,u.makeCode(")")):[].concat(u.makeCode("["),o,u.makeCode("]"));return 0===l?(u=n[0],a=u.joinFragmentArrays(r.slice(1),", "),r[0].concat(u.makeCode(".concat("),a,u.makeCode(")"))):(s=function(){var t,i,r,s;for(r=n.slice(0,l),s=[],t=0,i=r.length;i>t;t++)u=r[t],s.push(u.compileToFragments(e,L));return s}(),s=n[0].joinFragmentArrays(s,", "),a=n[l].joinFragmentArrays(r,", "),[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),a,lt(n).makeCode(")")))},t}(r),e.Expansion=p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isComplex=A,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=Q=function(e){function t(e,t){this.condition=(null!=t?t.invert:void 0)?e.invert():e,this.guard=null!=t?t.guard:void 0}return Tt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=et,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(i=0,r=e.length;r>i;i++)if(n=e[i],t=n.jumps({loop:!0}))return t;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=Y,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new k(new j(this.guard).invert(),new D("continue"))):this.guard&&(n=s.wrap([new k(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,x),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,N),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=O=function(e){function n(e,t,n,i){if("in"===e)return new w(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof c&&t.bound||t["do"])&&(t=new j(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,s;return Tt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},s={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isSimpleNumber=A,n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof Z&&this.first.isSimpleNumber())},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in s),t=t.first;if(!e)return new j(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=s[t.operator],t=t.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new j(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&bt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,s,a,h,l,u;for(s=[],n=e instanceof i&&(a=e.value.unwrap())instanceof c?a:e,u=n.params||[],h=0,l=u.length;l>h;h++)r=u[h],r.value?(s.push(r.value),delete r.value):s.push(r);return t=new o(e,s),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,s,o;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(s=this.operator)||"++"===s)&&(o=this.first.unwrapAll().value,Ft.call(U,o)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,E),r=this.second.compileToFragments(e,E),t=[].concat(i,this.makeCode(" "+this.operator+" "),r),E>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return r=this.first.second.cache(e),this.first.second=r[0],i=r[1],n=this.first.compileToFragments(e,E),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),i.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,E)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new D(e.scope.freeVariable("ref")),t=new j(new i(n,this.first))):(t=this.first,n=t),new k(new u(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof u?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=C?new j(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new j(this.first)),i.push(this.first.compileToFragments(e,E)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield statements must occur within a function generator."),Ft.call(Object.keys(this.first),"expression")>=0?null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,E)):(n.push([this.makeCode("("+t+" ")]),n.push(this.first.compileToFragments(e,E)),n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new Z(new D("Math"),[new t(new D("pow"))]),new o(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new Z(new D("Math"),[new t(new D("floor"))]),i=new n("/",this.first,this.second),new o(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new Z(new D(vt("modulo",e))),new o(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=w=function(e){function t(e,t){this.object=e,this.array=t}return Tt(t,e),t.prototype.children=["object","array"],t.prototype.invert=R,t.prototype.compileNode=function(e){var t,n,i,r,s;if(this.array instanceof Z&&this.array.isArray()&&this.array.base.objects.length){for(s=this.array.base.objects,i=0,r=s.length;r>i;i++)if(n=s[i],n instanceof W){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;for(l=this.object.cache(e,E),o=l[0],s=l[1],u=this.negated?[" !== "," && "]:[" === "," || "],t=u[0],n=u[1],a=[],p=this.array.base.objects,i=c=0,h=p.length;h>c;i=++c)r=p[i],i&&a.push(this.makeCode(n)),a=a.concat(i?s:o,this.makeCode(t),r.compileToFragments(e,C));return E>e.level?a:this.wrapInBraces(a)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return r=this.object.cache(e,L),i=r[0],n=r[1],t=[].concat(this.makeCode(vt("indexOf",e)+".call("),this.array.compileToFragments(e,L),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),at(i)===at(n)?t:(t=i.concat(this.makeCode(", "),t),L>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=K=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return Tt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=et,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,s;return e.indent+=Y,s=this.attempt.compileToFragments(e,x),t=this.recovery?(r=new D("_error"),this.errorVariable?this.recovery.unshift(new i(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,x),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:[this.makeCode(" catch (_error) {}")],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,x),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),s,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=z=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=et,t.prototype.jumps=A,t.prototype.makeReturn=X,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=u=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.invert=R,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,E),g.test(i)&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(F>=e.level?i:"("+i+")")]},t}(r),e.Parens=j=function(e){function t(e){this.body=e}return Tt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,i;return n=this.body.unwrap(),n instanceof Z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,N),t=E>e.level&&(n instanceof O||n instanceof o||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.For=f=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=s.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof Z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof Z&&this.source.base instanceof B&&!this.source.properties.length,this.pattern=this.name instanceof Z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return Tt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,o,a,c,h,l,u,p,d,f,m,y,b,v,w,T,C,F,E,N,S,R,A,_,O,$,M,B,V,U,q,H;return t=s.wrap([this.body]),T=null!=(q=lt(t.expressions))?q.jumps():void 0,T&&T instanceof P&&(this.returns=!1),O=this.range?this.source.base:this.source,_=e.scope,this.pattern||(F=this.name&&this.name.compile(e,L)),y=this.index&&this.index.compile(e,L),F&&!this.pattern&&_.find(F),y&&_.find(y),this.returns&&(A=_.freeVariable("results")),b=this.object&&y||_.freeVariable("i"),v=this.range&&F||y||b,w=v!==b?v+" = ":"",this.step&&!this.range&&(H=this.cacheToCodeFragments(this.step.cache(e,L)),$=H[0],B=H[1],M=B.match(I)),this.pattern&&(F=b),U="",d="",h="",f=this.tab+Y,this.range?p=O.compileToFragments(pt(e,{index:b,name:F,step:this.step})):(V=this.source.compile(e,L),!F&&!this.own||g.test(V)||(h+=""+this.tab+(N=_.freeVariable("ref"))+" = "+V+";\n",V=N),F&&!this.pattern&&(E=F+" = "+V+"["+v+"]"),this.object||($!==B&&(h+=""+this.tab+$+";\n"),this.step&&M&&(u=0>ft(M[0]))||(C=_.freeVariable("len")),a=""+w+b+" = 0, "+C+" = "+V+".length",c=""+w+b+" = "+V+".length - 1",r=b+" < "+C,o=b+" >= 0",this.step?(M?u&&(r=o,a=c):(r=B+" > 0 ? "+r+" : "+o,a="("+B+" > 0 ? ("+a+") : "+c+")"),m=b+" += "+B):m=""+(v!==b?"++"+b:b+"++"),p=[this.makeCode(a+"; "+r+"; "+w+m)])),this.returns&&(S=""+this.tab+A+" = [];\n",R="\n"+this.tab+"return "+A+";",t.makeReturn(A)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new k(new j(this.guard).invert(),new D("continue"))):this.guard&&(t=s.wrap([new k(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new D(V+"["+v+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),E&&(U="\n"+f+E+";"),this.object&&(p=[this.makeCode(v+" in "+V)],this.own&&(d="\n"+f+"if (!"+vt("hasProp",e)+".call("+V+", "+v+")) continue;")),n=t.compileToFragments(pt(e,{indent:f}),x),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(S||"")+this.tab+"for ("),p,this.makeCode(") {"+d+U),n,this.makeCode(this.tab+"}"+(R||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,s,a,h,l,u,p,d,f,m,g,y,b,v,k;for(r=[],f=t.expressions,h=p=0,d=f.length;d>p;h=++p)s=f[h],s=s.unwrapAll(),s instanceof o&&(u=null!=(m=s.variable)?m.unwrapAll():void 0,(u instanceof c||u instanceof Z&&(null!=(g=u.base)?g.unwrapAll():void 0)instanceof c&&1===u.properties.length&&("call"===(y=null!=(b=u.properties[0].name)?b.value:void 0)||"apply"===y))&&(a=(null!=(v=u.base)?v.unwrapAll():void 0)||u,l=new D(e.scope.freeVariable("fn")),n=new Z(l),u.base&&(k=[n,u],u.base=k[0],n=k[1]),t.expressions[h]=new o(n,s.args),r=r.concat(this.makeCode(this.tab),new i(l,a).compileToFragments(e,x),this.makeCode(";\n"))));return r},t}(Q),e.Switch=G=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return Tt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=et,t.prototype.jumps=function(e){var t,n,i,r,s,o,a,c;for(null==e&&(e={block:!0}),o=this.cases,r=0,s=o.length;s>r;r++)if(a=o[r],n=a[0],t=a[1],i=t.jumps(e))return i;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,o;for(r=this.cases,n=0,i=r.length;i>n;n++)t=r[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new s([new D("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g;for(c=e.indent+Y,h=e.indent=c+Y,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,N):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=l=0,p=f.length;p>l;a=++l){for(m=f[a],r=m[0],t=m[1],g=ot([r]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,N),this.makeCode(":\n"));if((n=t.compileToFragments(e,x)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions),s instanceof P||s instanceof D&&s.jumps()&&"debugger"!==s.value||o.push(i.makeCode(h+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(c+"default:\n")].concat(Lt.call(this.otherwise.compileToFragments(e,x)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(r),e.If=k=function(e){function t(e,t,n){this.body=t,null==n&&(n={}),this.condition="unless"===n.type?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return Tt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return null!=(e=this.body)?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return null!=(e=this.elseBody)?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===x||this.bodyNode().isStatement(e)||(null!=(t=this.elseBodyNode())?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||(null!=(t=this.elseBody)?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new s([new D("void 0")]))),this.body&&(this.body=new s([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new s([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof s?e:new s([e])},t.prototype.compileStatement=function(e){var n,i,r,s,o,a,c;return r=it(e,"chainChild"),(o=it(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+Y,s=this.condition.compileToFragments(e,N),i=this.ensureBlock(this.body).compileToFragments(pt(e,{indent:c})),a=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,x))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(pt(e,{indent:c}),x),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,F),n=this.bodyNode().compileToFragments(e,L),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,L):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=F?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),J={"extends":function(e){return"function(child, parent) { for (var key in parent) { if ("+vt("hasProp",e)+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},x=1,N=2,L=3,F=4,E=5,C=6,Y=" ",y="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",g=RegExp("^"+y+"$"),V=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,I=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,S=RegExp("^("+y+")(\\.prototype)?(?:\\.("+y+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"),v=/^['"]/,b=/^\//,vt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable("_"+e),i.assign(n,J[e](t)),i.utilities[e]=n)},dt=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},ft=function(e){return null==e?0:e.match(m)?parseInt(e,16):parseFloat(e)},ct=function(e){return e instanceof D&&"arguments"===e.value&&!e.asKey},ht=function(e){return e instanceof D&&"this"===e.value&&!e.asKey||e instanceof c&&e.bound||e instanceof o&&e.isSuper},bt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new Z(t),i}}.call(this),t.exports}(),require["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,s;return t.prototype.add=function(t,n,i){var r,s,o,a;return null==i&&(i={}),s=n[0],r=n[1],o=(a=this.lines)[s]||(a[s]=new e(s)),o.add(r,t,i)},t.prototype.sourceLocation=function(e){var t,n,i;for(n=e[0],t=e[1];!((i=this.lines[n])||0>=n);)n--;return i&&i.sourceLocation(t)},t.prototype.generate=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y;for(null==e&&(e={}),null==t&&(t=null),u=0,i=0,s=0,r=0,h=!1,n="",g=this.lines,a=p=0,f=g.length;f>p;a=++p)if(o=g[a])for(y=o.columns,d=0,m=y.length;m>d;d++)if(c=y[d]){for(;c.line>u;)i=0,h=!1,n+=";",u++;h&&(n+=",",h=!1),n+=this.encodeVlq(c.column-i),i=c.column,n+=this.encodeVlq(0),n+=this.encodeVlq(c.sourceLine-s),s=c.sourceLine,n+=this.encodeVlq(c.sourceColumn-r),r=c.sourceColumn,h=!0}return l={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inline&&(l.sourcesContent=[t]),JSON.stringify(l,null,2)},r=5,i=1<e?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&s,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)}()},t}(),t.exports=n}.call(this),t.exports}(),require["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v={}.hasOwnProperty,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};if(o=require("fs"),d=require("vm"),u=require("path"),t=require("./lexer").Lexer,l=require("./parser").parser,c=require("./helpers"),n=require("./sourcemap"),e.VERSION="1.8.0",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=c,f=function(e){return function(t,n){var i;null==n&&(n={});try{return e.call(this,t,n)}catch(r){throw i=r,c.updateSyntaxError(i,t,n.filename)}}},e.compile=i=f(function(e,t){var i,r,s,o,a,u,p,d,f,m,g,y,b,v,k;for(m=c.merge,o=c.extend,t=o({},t),t.sourceMap&&(f=new n),b=h.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=b.length;t>e;e++)y=b[e],y.variable&&"_"===y[1].charAt(0)&&n.push(y[1]);return n}(),u=l.parse(b).compileToFragments(t),s=0,t.header&&(s+=1),t.shiftLine&&(s+=1),r=0,d="",v=0,k=u.length;k>v;v++)a=u[v],t.sourceMap&&(a.locationData&&f.add([a.locationData.first_line,a.locationData.first_column],[s,r],{noReplace:!0}),g=c.count(a.code,"\n"),s+=g,g?r=a.code.length-(a.code.lastIndexOf("\n")+1):r+=a.code.length),d+=a.code;return t.header&&(p="Generated by CoffeeScript "+this.VERSION,d="// "+p+"\n"+d),t.sourceMap?(i={js:d},i.sourceMap=f,i.v3SourceMap=f.generate(t,e),i):d}),e.tokens=f(function(e,t){return h.tokenize(e,t)}),e.nodes=f(function(e,t){return"string"==typeof e?l.parse(h.tokenize(e,t)):l.parse(e)}),e.run=function(e,t){var n,r,s,a;return null==t&&(t={}),s=require.main,s.filename=process.argv[1]=t.filename?o.realpathSync(t.filename):".",s.moduleCache&&(s.moduleCache={}),r=t.filename?u.dirname(o.realpathSync(t.filename)):o.realpathSync("."),s.paths=require("module")._nodeModulePaths(r),(!c.isCoffee(s.filename)||require.extensions)&&(n=i(e,t),e=null!=(a=n.js)?a:n),s._compile(e,s.filename)},e.eval=function(e,t){var n,r,s,o,a,c,h,l,p,f,m,g,y,b,k,w,T;if(null==t&&(t={}),e=e.trim()){if(r=null!=(y=d.Script.createContext)?y:d.createContext,s=null!=(b=d.isContext)?b:function(){return t.sandbox instanceof r().constructor},r){if(null!=t.sandbox){if(s(t.sandbox))l=t.sandbox;else{l=r(),k=t.sandbox;for(a in k)v.call(k,a)&&(p=k[a],l[a]=p) +},n.prototype.compilePatternMatch=function(e){var i,r,s,o,a,c,h,l,u,d,f,m,y,b,v,k,w,C,F,N,S,R,A,I,_,O,$,B;if(k=e.level===x,C=this.value,m=this.variable.base.objects,!(y=m.length))return s=C.compileToFragments(e),e.level>=E?this.wrapInBraces(s):s;if(l=this.variable.isObject(),k&&1===y&&!((f=m[0])instanceof W))return f instanceof n?(A=f,I=A.variable,h=I.base,f=A.value):h=l?f["this"]?f.properties[0].name:f:new D(0),i=g.test(h.unwrap().value||0),C=new Z(C),C.properties.push(new(i?t:T)(h)),_=f.unwrap().value,Ft.call(M,_)>=0&&f.error("assignment to a reserved word: "+f.compile(e)),new n(f,C,null,{param:this.param}).compileToFragments(e,x);for(F=C.compileToFragments(e,L),N=at(F),r=[],o=!1,(!g.test(N)||this.variable.assigns(N))&&(r.push([this.makeCode((b=e.scope.freeVariable("ref"))+" = ")].concat(Lt.call(F))),F=[this.makeCode(b)],N=b),c=S=0,R=m.length;R>S;c=++S){if(f=m[c],h=c,l&&(f instanceof n?(O=f,$=O.variable,h=$.base,f=O.value):f.base instanceof j?(B=new Z(f.unwrapAll()).cacheReference(e),f=B[0],h=B[1]):h=f["this"]?f.properties[0].name:f),!o&&f instanceof W)d=f.name.unwrap().value,f=f.unwrap(),w=y+" <= "+N+".length ? "+vt("slice",e)+".call("+N+", "+c,(v=y-c-1)?(u=e.scope.freeVariable("i"),w+=", "+u+" = "+N+".length - "+v+") : ("+u+" = "+c+", [])"):w+=") : []",w=new D(w),o=u+"++";else{if(!o&&f instanceof p){(v=y-c-1)&&(1===v?o=N+".length - 1":(u=e.scope.freeVariable("i"),w=new D(u+" = "+N+".length - "+v),o=u+"++",r.push(w.compileToFragments(e,L))));continue}d=f.unwrap().value,(f instanceof W||f instanceof p)&&f.error("multiple splats/expansions are disallowed in an assignment"),"number"==typeof h?(h=new D(o||h),i=!1):i=l&&g.test(h.unwrap().value||0),w=new Z(new D(N),[new(i?t:T)(h)])}null!=d&&Ft.call(M,d)>=0&&f.error("assignment to a reserved word: "+f.compile(e)),r.push(new n(f,w,null,{param:this.param,subpattern:!0}).compileToFragments(e,L))}return k||this.subpattern||r.push(F),a=this.joinFragmentArrays(r,", "),L>e.level?a:this.wrapInBraces(a)},n.prototype.compileConditional=function(e){var t,i,r,s;return s=this.variable.cacheReference(e),i=s[0],r=s[1],!i.properties.length&&i.base instanceof D&&"this"!==i.base.value&&!e.scope.check(i.base.value)&&this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Ft.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new k(new u(i),r,{type:"if"}).addElse(new n(r,this.value,"=")).compileToFragments(e)):(t=new O(this.context.slice(0,-1),i,new n(r,this.value,"=")).compileToFragments(e),L>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return r=this.variable.cacheReference(e),t=r[0],i=r[1],new n(t,new O(this.context.slice(0,-1),i,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;return l=this.variable.properties.pop().range,i=l.from,a=l.to,n=l.exclusive,o=this.variable.compile(e),i?(u=this.cacheToCodeFragments(i.cache(e,E)),r=u[0],s=u[1]):r=s="0",a?i instanceof Z&&i.isSimpleNumber()&&a instanceof Z&&a.isSimpleNumber()?(a=a.compile(e)-s,n||(a+=1)):(a=a.compile(e,C)+" - "+s,n||(a+=" + 1")):a="9e9",p=this.value.cache(e,L),c=p[0],h=p[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+r+", "+a+"].concat("),c,this.makeCode(")), "),h),e.level>x?this.wrapInBraces(t):t},n}(r),e.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new s,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){var t;return e instanceof O&&("yield"===(t=e.operator)||"yield*"===t)})}return Tt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=A,t.prototype.makeScope=function(e){return new q(e,this.body,this)},t.prototype.compileNode=function(e){var r,a,c,h,l,u,d,f,m,g,y,b,v,w,T,F,L,E,N,x,S,R,A,I,_,j,M,B,P,V,U,q,H;if(this.bound&&(null!=(B=e.scope.method)?B.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",T=new t([new $(new D(this.context))],new s([this])),a=new o(T,[new D("this")]),a.updateLocationDataIfMissing(this.locationData),a.compileNode(e);for(e.scope=it(e,"classScope")||this.makeScope(e.scope),e.scope.shared=it(e,"sharedScope"),e.indent+=Y,delete e.bare,delete e.isExistentialEquals,m=[],h=[],P=this.params,F=0,x=P.length;x>F;F++)f=P[F],f instanceof p||e.scope.parameter(f.asReference(e));for(V=this.params,L=0,S=V.length;S>L;L++)if(f=V[L],f.splat||f instanceof p){for(U=this.params,E=0,R=U.length;R>E;E++)d=U[E],d instanceof p||!d.name.value||e.scope.add(d.name.value,"var",!0);y=new i(new Z(new n(function(){var t,n,i,r;for(i=this.params,r=[],t=0,n=i.length;n>t;t++)d=i[t],r.push(d.asReference(e));return r}.call(this))),new Z(new D("arguments")));break}for(q=this.params,N=0,A=q.length;A>N;N++)f=q[N],f.isComplex()?(v=g=f.asReference(e),f.value&&(v=new O("?",g,f.value)),h.push(new i(new Z(f.name),v,"=",{param:!0}))):(g=f,f.value&&(u=new D(g.name.value+" == null"),v=new i(new Z(f.name),f.value,"="),h.push(new k(u,v)))),y||m.push(g);for(w=this.body.isEmpty(),y&&h.unshift(y),h.length&&(H=this.body.expressions).unshift.apply(H,h),l=j=0,I=m.length;I>j;l=++j)d=m[l],m[l]=d.compileToFragments(e),e.scope.parameter(at(m[l]));for(b=[],this.eachParamName(function(e,t){return Ft.call(b,e)>=0&&t.error("multiple parameters named "+e),b.push(e)}),w||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],l=M=0,_=m.length;_>M;l=++M)d=m[l],l&&r.push(this.makeCode(", ")),r.push.apply(r,d);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Lt.call(r)):this.front||e.level>=C?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,s;for(r=this.params,s=[],n=0,i=r.length;i>n;n++)t=r[n],s.push(t.eachName(e));return s},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=$=function(e){function t(e,t,n){var i,r;this.name=e,this.value=t,this.splat=n,r=i=this.name.unwrapAll().value,Ft.call(U,r)>=0&&this.name.error('parameter name "'+i+'" is not allowed')}return Tt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,L)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t="at_"+n.properties[0].name.value,n=new D(e.scope.freeVariable(t))):n.isComplex()&&(n=new D(e.scope.freeVariable("arg"))),n=new Z(n),this.splat&&(n=new W(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,s,o,a,c;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof D)return e(t.value,t);if(t instanceof Z)return n(t);for(c=t.objects,o=0,a=c.length;a>o;o++)s=c[o],s instanceof i?this.eachName(e,s.value.unwrap()):s instanceof W?(r=s.name.unwrap(),e(r.value,r)):s instanceof Z?s.isArray()||s.isObject()?this.eachName(e,s.base):s["this"]?n(s):e(s.base.value,s.base):s instanceof p||s.error("illegal parameter "+s.compile())},t}(r),e.Splat=W=function(e){function t(e){this.name=e.compile?e:new D(e)}return Tt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=et,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,s,o,a,c,h,l,u,p,d;for(l=-1;(u=n[++l])&&!(u instanceof t););if(l>=n.length)return[];if(1===n.length)return u=n[0],c=u.compileToFragments(e,L),i?c:[].concat(u.makeCode(vt("slice",e)+".call("),c,u.makeCode(")"));for(r=n.slice(l),h=p=0,d=r.length;d>p;h=++p)u=r[h],o=u.compileToFragments(e,L),r[h]=u instanceof t?[].concat(u.makeCode(vt("slice",e)+".call("),o,u.makeCode(")")):[].concat(u.makeCode("["),o,u.makeCode("]"));return 0===l?(u=n[0],a=u.joinFragmentArrays(r.slice(1),", "),r[0].concat(u.makeCode(".concat("),a,u.makeCode(")"))):(s=function(){var t,i,r,s;for(r=n.slice(0,l),s=[],t=0,i=r.length;i>t;t++)u=r[t],s.push(u.compileToFragments(e,L));return s}(),s=n[0].joinFragmentArrays(s,", "),a=n[l].joinFragmentArrays(r,", "),[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),a,lt(n).makeCode(")")))},t}(r),e.Expansion=p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isComplex=A,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=Q=function(e){function t(e,t){this.condition=(null!=t?t.invert:void 0)?e.invert():e,this.guard=null!=t?t.guard:void 0}return Tt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=et,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(i=0,r=e.length;r>i;i++)if(n=e[i],t=n.jumps({loop:!0}))return t;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=Y,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new k(new j(this.guard).invert(),new D("continue"))):this.guard&&(n=s.wrap([new k(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,x),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,N),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=O=function(e){function n(e,t,n,i){if("in"===e)return new w(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof c&&t.bound||t["do"])&&(t=new j(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,s;return Tt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},s={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isSimpleNumber=A,n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof Z&&this.first.isSimpleNumber())},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in s),t=t.first;if(!e)return new j(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=s[t.operator],t=t.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new j(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&bt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,s,a,h,l,u;for(s=[],n=e instanceof i&&(a=e.value.unwrap())instanceof c?a:e,u=n.params||[],h=0,l=u.length;l>h;h++)r=u[h],r.value?(s.push(r.value),delete r.value):s.push(r);return t=new o(e,s),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,s,o;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(s=this.operator)||"++"===s)&&(o=this.first.unwrapAll().value,Ft.call(U,o)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,E),r=this.second.compileToFragments(e,E),t=[].concat(i,this.makeCode(" "+this.operator+" "),r),E>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return r=this.first.second.cache(e),this.first.second=r[0],i=r[1],n=this.first.compileToFragments(e,E),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),i.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,E)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new D(e.scope.freeVariable("ref")),t=new j(new i(n,this.first))):(t=this.first,n=t),new k(new u(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof u?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=C?new j(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new j(this.first)),i.push(this.first.compileToFragments(e,E)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield statements must occur within a function generator."),Ft.call(Object.keys(this.first),"expression")>=0?null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,E)):(n.push([this.makeCode("("+t+" ")]),n.push(this.first.compileToFragments(e,E)),n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new Z(new D("Math"),[new t(new D("pow"))]),new o(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new Z(new D("Math"),[new t(new D("floor"))]),i=new n("/",this.first,this.second),new o(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new Z(new D(vt("modulo",e))),new o(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=w=function(e){function t(e,t){this.object=e,this.array=t}return Tt(t,e),t.prototype.children=["object","array"],t.prototype.invert=R,t.prototype.compileNode=function(e){var t,n,i,r,s;if(this.array instanceof Z&&this.array.isArray()&&this.array.base.objects.length){for(s=this.array.base.objects,i=0,r=s.length;r>i;i++)if(n=s[i],n instanceof W){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;for(l=this.object.cache(e,E),o=l[0],s=l[1],u=this.negated?[" !== "," && "]:[" === "," || "],t=u[0],n=u[1],a=[],p=this.array.base.objects,i=c=0,h=p.length;h>c;i=++c)r=p[i],i&&a.push(this.makeCode(n)),a=a.concat(i?s:o,this.makeCode(t),r.compileToFragments(e,C));return E>e.level?a:this.wrapInBraces(a)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return r=this.object.cache(e,L),i=r[0],n=r[1],t=[].concat(this.makeCode(vt("indexOf",e)+".call("),this.array.compileToFragments(e,L),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),at(i)===at(n)?t:(t=i.concat(this.makeCode(", "),t),L>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=K=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return Tt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=et,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,s;return e.indent+=Y,s=this.attempt.compileToFragments(e,x),t=this.recovery?(r=new D("_error"),this.errorVariable?this.recovery.unshift(new i(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,x),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:[this.makeCode(" catch (_error) {}")],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,x),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),s,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=z=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=et,t.prototype.jumps=A,t.prototype.makeReturn=X,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=u=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.invert=R,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,E),g.test(i)&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(F>=e.level?i:"("+i+")")]},t}(r),e.Parens=j=function(e){function t(e){this.body=e}return Tt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,i;return n=this.body.unwrap(),n instanceof Z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,N),t=E>e.level&&(n instanceof O||n instanceof o||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.For=f=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=s.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof Z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof Z&&this.source.base instanceof B&&!this.source.properties.length,this.pattern=this.name instanceof Z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return Tt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,o,a,c,h,l,u,p,d,f,m,y,b,v,w,T,C,F,E,N,S,R,A,_,O,$,M,B,V,U,q,H;return t=s.wrap([this.body]),T=null!=(q=lt(t.expressions))?q.jumps():void 0,T&&T instanceof P&&(this.returns=!1),O=this.range?this.source.base:this.source,_=e.scope,this.pattern||(F=this.name&&this.name.compile(e,L)),y=this.index&&this.index.compile(e,L),F&&!this.pattern&&_.find(F),y&&_.find(y),this.returns&&(A=_.freeVariable("results")),b=this.object&&y||_.freeVariable("i"),v=this.range&&F||y||b,w=v!==b?v+" = ":"",this.step&&!this.range&&(H=this.cacheToCodeFragments(this.step.cache(e,L)),$=H[0],B=H[1],M=B.match(I)),this.pattern&&(F=b),U="",d="",h="",f=this.tab+Y,this.range?p=O.compileToFragments(pt(e,{index:b,name:F,step:this.step})):(V=this.source.compile(e,L),!F&&!this.own||g.test(V)||(h+=""+this.tab+(N=_.freeVariable("ref"))+" = "+V+";\n",V=N),F&&!this.pattern&&(E=F+" = "+V+"["+v+"]"),this.object||($!==B&&(h+=""+this.tab+$+";\n"),this.step&&M&&(u=0>ft(M[0]))||(C=_.freeVariable("len")),a=""+w+b+" = 0, "+C+" = "+V+".length",c=""+w+b+" = "+V+".length - 1",r=b+" < "+C,o=b+" >= 0",this.step?(M?u&&(r=o,a=c):(r=B+" > 0 ? "+r+" : "+o,a="("+B+" > 0 ? ("+a+") : "+c+")"),m=b+" += "+B):m=""+(v!==b?"++"+b:b+"++"),p=[this.makeCode(a+"; "+r+"; "+w+m)])),this.returns&&(S=""+this.tab+A+" = [];\n",R="\n"+this.tab+"return "+A+";",t.makeReturn(A)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new k(new j(this.guard).invert(),new D("continue"))):this.guard&&(t=s.wrap([new k(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new D(V+"["+v+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),E&&(U="\n"+f+E+";"),this.object&&(p=[this.makeCode(v+" in "+V)],this.own&&(d="\n"+f+"if (!"+vt("hasProp",e)+".call("+V+", "+v+")) continue;")),n=t.compileToFragments(pt(e,{indent:f}),x),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(S||"")+this.tab+"for ("),p,this.makeCode(") {"+d+U),n,this.makeCode(this.tab+"}"+(R||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,s,a,h,l,u,p,d,f,m,g,y,b,v,k;for(r=[],f=t.expressions,h=p=0,d=f.length;d>p;h=++p)s=f[h],s=s.unwrapAll(),s instanceof o&&(u=null!=(m=s.variable)?m.unwrapAll():void 0,(u instanceof c||u instanceof Z&&(null!=(g=u.base)?g.unwrapAll():void 0)instanceof c&&1===u.properties.length&&("call"===(y=null!=(b=u.properties[0].name)?b.value:void 0)||"apply"===y))&&(a=(null!=(v=u.base)?v.unwrapAll():void 0)||u,l=new D(e.scope.freeVariable("fn")),n=new Z(l),u.base&&(k=[n,u],u.base=k[0],n=k[1]),t.expressions[h]=new o(n,s.args),r=r.concat(this.makeCode(this.tab),new i(l,a).compileToFragments(e,x),this.makeCode(";\n"))));return r},t}(Q),e.Switch=G=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return Tt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=et,t.prototype.jumps=function(e){var t,n,i,r,s,o,a,c;for(null==e&&(e={block:!0}),o=this.cases,r=0,s=o.length;s>r;r++)if(a=o[r],n=a[0],t=a[1],i=t.jumps(e))return i;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,o;for(r=this.cases,n=0,i=r.length;i>n;n++)t=r[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new s([new D("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g;for(c=e.indent+Y,h=e.indent=c+Y,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,N):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=l=0,p=f.length;p>l;a=++l){for(m=f[a],r=m[0],t=m[1],g=ot([r]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,N),this.makeCode(":\n"));if((n=t.compileToFragments(e,x)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions),s instanceof P||s instanceof D&&s.jumps()&&"debugger"!==s.value||o.push(i.makeCode(h+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(c+"default:\n")].concat(Lt.call(this.otherwise.compileToFragments(e,x)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(r),e.If=k=function(e){function t(e,t,n){this.body=t,null==n&&(n={}),this.condition="unless"===n.type?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return Tt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return null!=(e=this.body)?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return null!=(e=this.elseBody)?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===x||this.bodyNode().isStatement(e)||(null!=(t=this.elseBodyNode())?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||(null!=(t=this.elseBody)?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new s([new D("void 0")]))),this.body&&(this.body=new s([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new s([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof s?e:new s([e])},t.prototype.compileStatement=function(e){var n,i,r,s,o,a,c;return r=it(e,"chainChild"),(o=it(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+Y,s=this.condition.compileToFragments(e,N),i=this.ensureBlock(this.body).compileToFragments(pt(e,{indent:c})),a=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,x))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(pt(e,{indent:c}),x),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,F),n=this.bodyNode().compileToFragments(e,L),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,L):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=F?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),J={"extends":function(e){return"function(child, parent) { for (var key in parent) { if ("+vt("hasProp",e)+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},x=1,N=2,L=3,F=4,E=5,C=6,Y=" ",y="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",g=RegExp("^"+y+"$"),V=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,I=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,S=RegExp("^("+y+")(\\.prototype)?(?:\\.("+y+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"),v=/^['"]/,b=/^\//,vt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable("_"+e),i.assign(n,J[e](t)),i.utilities[e]=n)},dt=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},ft=function(e){return null==e?0:e.match(m)?parseInt(e,16):parseFloat(e)},ct=function(e){return e instanceof D&&"arguments"===e.value&&!e.asKey},ht=function(e){return e instanceof D&&"this"===e.value&&!e.asKey||e instanceof c&&e.bound||e instanceof o&&e.isSuper},bt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new Z(t),i}}.call(this),t.exports}(),require["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,s;return t.prototype.add=function(t,n,i){var r,s,o,a;return null==i&&(i={}),s=n[0],r=n[1],o=(a=this.lines)[s]||(a[s]=new e(s)),o.add(r,t,i)},t.prototype.sourceLocation=function(e){var t,n,i;for(n=e[0],t=e[1];!((i=this.lines[n])||0>=n);)n--;return i&&i.sourceLocation(t)},t.prototype.generate=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y;for(null==e&&(e={}),null==t&&(t=null),u=0,i=0,s=0,r=0,h=!1,n="",g=this.lines,a=p=0,f=g.length;f>p;a=++p)if(o=g[a])for(y=o.columns,d=0,m=y.length;m>d;d++)if(c=y[d]){for(;c.line>u;)i=0,h=!1,n+=";",u++;h&&(n+=",",h=!1),n+=this.encodeVlq(c.column-i),i=c.column,n+=this.encodeVlq(0),n+=this.encodeVlq(c.sourceLine-s),s=c.sourceLine,n+=this.encodeVlq(c.sourceColumn-r),r=c.sourceColumn,h=!0}return l={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inline&&(l.sourcesContent=[t]),JSON.stringify(l,null,2)},r=5,i=1<e?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&s,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)}()},t}(),t.exports=n}.call(this),t.exports}(),require["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,y,b,v={}.hasOwnProperty,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};if(o=require("fs"),d=require("vm"),u=require("path"),t=require("./lexer").Lexer,l=require("./parser").parser,c=require("./helpers"),n=require("./sourcemap"),e.VERSION="1.9.0",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=c,f=function(e){return function(t,n){var i;null==n&&(n={});try{return e.call(this,t,n)}catch(r){throw i=r,c.updateSyntaxError(i,t,n.filename)}}},e.compile=i=f(function(e,t){var i,r,s,o,a,u,p,d,f,m,g,y,b,v,k;for(m=c.merge,o=c.extend,t=o({},t),t.sourceMap&&(f=new n),b=h.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=b.length;t>e;e++)y=b[e],y.variable&&"_"===y[1].charAt(0)&&n.push(y[1]);return n}(),u=l.parse(b).compileToFragments(t),s=0,t.header&&(s+=1),t.shiftLine&&(s+=1),r=0,d="",v=0,k=u.length;k>v;v++)a=u[v],t.sourceMap&&(a.locationData&&f.add([a.locationData.first_line,a.locationData.first_column],[s,r],{noReplace:!0}),g=c.count(a.code,"\n"),s+=g,g?r=a.code.length-(a.code.lastIndexOf("\n")+1):r+=a.code.length),d+=a.code;return t.header&&(p="Generated by CoffeeScript "+this.VERSION,d="// "+p+"\n"+d),t.sourceMap?(i={js:d},i.sourceMap=f,i.v3SourceMap=f.generate(t,e),i):d}),e.tokens=f(function(e,t){return h.tokenize(e,t)}),e.nodes=f(function(e,t){return"string"==typeof e?l.parse(h.tokenize(e,t)):l.parse(e)}),e.run=function(e,t){var n,r,s,a;return null==t&&(t={}),s=require.main,s.filename=process.argv[1]=t.filename?o.realpathSync(t.filename):".",s.moduleCache&&(s.moduleCache={}),r=t.filename?u.dirname(o.realpathSync(t.filename)):o.realpathSync("."),s.paths=require("module")._nodeModulePaths(r),(!c.isCoffee(s.filename)||require.extensions)&&(n=i(e,t),e=null!=(a=n.js)?a:n),s._compile(e,s.filename)},e.eval=function(e,t){var n,r,s,o,a,c,h,l,p,f,m,g,y,b,k,w,T;if(null==t&&(t={}),e=e.trim()){if(r=null!=(y=d.Script.createContext)?y:d.createContext,s=null!=(b=d.isContext)?b:function(){return t.sandbox instanceof r().constructor},r){if(null!=t.sandbox){if(s(t.sandbox))l=t.sandbox;else{l=r(),k=t.sandbox;for(a in k)v.call(k,a)&&(p=k[a],l[a]=p) }l.global=l.root=l.GLOBAL=l}else l=global;if(l.__filename=t.filename||"eval",l.__dirname=u.dirname(l.__filename),l===global&&!l.module&&!l.require){for(n=require("module"),l.module=g=new n(t.modulename||"eval"),l.require=T=function(e){return n._load(e,g,!0)},g.filename=l.__filename,w=Object.getOwnPropertyNames(require),f=0,m=w.length;m>f;f++)h=w[f],"paths"!==h&&(T[h]=require[h]);T.paths=g.paths=n._nodeModulePaths(process.cwd()),T.resolve=function(e){return n._resolveFilename(e,g)}}}c={};for(a in t)v.call(t,a)&&(p=t[a],c[a]=p);return c.bare=!0,o=i(e,c),l===global?d.runInThisContext(o):d.runInContext(o,l)}},e.register=function(){return require("./register")},require.extensions)for(b=this.FILE_EXTENSIONS,g=0,y=b.length;y>g;g++)r=b[g],null==(m=require.extensions)[r]&&(m[r]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+r+" files.")});e._compileFile=function(e,t){var n,r,s,a;null==t&&(t=!1),s=o.readFileSync(e,"utf8"),a=65279===s.charCodeAt(0)?s.substring(1):s;try{n=i(a,{filename:e,sourceMap:t,literate:c.isLiterate(e)})}catch(h){throw r=h,c.updateSyntaxError(r,a,e)}return n},h=new t,l.lexer={lex:function(){var e,t;return t=l.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],l.errorToken=t.origin||t,this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return l.tokens=e,this.pos=0},upcomingInput:function(){return""}},l.yy=require("./nodes"),l.yy.parseError=function(e,t){var n,i,r,s,o,a;return o=t.token,s=l.errorToken,a=l.tokens,i=s[0],r=s[1],n=s[2],r=s===a[a.length-1]?"end of input":"INDENT"===i||"OUTDENT"===i?"indentation":c.nameWhitespaceCharacter(r),c.throwSyntaxError("unexpected "+r,n)},s=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d;return s=void 0,r="",e.isNative()?r="native":(e.isEval()?(s=e.getScriptNameOrSourceURL(),s||(r=e.getEvalOrigin()+", ")):s=e.getFileName(),s||(s=""),h=e.getLineNumber(),i=e.getColumnNumber(),u=t(s,h,i),r=u?s+":"+u[0]+":"+u[1]:s+":"+h+":"+i),o=e.getFunctionName(),a=e.isConstructor(),c=!(e.isToplevel()||a),c?(l=e.getMethodName(),d=e.getTypeName(),o?(p=n="",d&&o.indexOf(d)&&(p=d+"."),l&&o.indexOf("."+l)!==o.length-l.length-1&&(n=" [as "+l+"]"),""+p+o+n+" ("+r+")"):d+"."+(l||"")+" ("+r+")"):a?"new "+(o||"")+" ("+r+")":o?o+" ("+r+")":r},p={},a=function(t){var n,i;if(p[t])return p[t];if(i=null!=u?u.extname(t):void 0,!(0>k.call(e.FILE_EXTENSIONS,i)))return n=e._compileFile(t,!0),p[t]=n.sourceMap},Error.prepareStackTrace=function(t,n){var i,r,o;return o=function(e,t,n){var i,r;return r=a(e),r&&(i=r.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},r=function(){var t,r,a;for(a=[],t=0,r=n.length;r>t&&(i=n[t],i.getFunction()!==e.run);t++)a.push(" at "+s(i,o));return a}(),""+t+"\n"+r.join("\n")+"\n"}}.call(this),t.exports}(),require["./browser"]=function(){var exports={},module={exports:exports};return function(){var CoffeeScript,compile,runScripts,__indexOf=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};CoffeeScript=require("./coffee-script"),CoffeeScript.require=require,compile=CoffeeScript.compile,CoffeeScript.eval=function(code,options){return null==options&&(options={}),null==options.bare&&(options.bare=!0),eval(compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,t.shiftLine=!0,Function(compile(e,t))()},"undefined"!=typeof window&&null!==window&&("undefined"!=typeof btoa&&null!==btoa&&"undefined"!=typeof JSON&&null!==JSON&&"undefined"!=typeof unescape&&null!==unescape&&"undefined"!=typeof encodeURIComponent&&null!==encodeURIComponent&&(compile=function(e,t){var n,i,r;return null==t&&(t={}),t.sourceMap=!0,t.inline=!0,r=CoffeeScript.compile(e,t),n=r.js,i=r.v3SourceMap,n+"\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(i)))+"\n//# sourceURL=coffeescript"}),CoffeeScript.load=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=!1),n.sourceFiles=[e],r=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,r.open("GET",e,!0),"overrideMimeType"in r&&r.overrideMimeType("text/plain"),r.onreadystatechange=function(){var s,o;if(4===r.readyState){if(0!==(o=r.status)&&200!==o)throw Error("Could not load "+e);if(s=[r.responseText,n],i||CoffeeScript.run.apply(CoffeeScript,s),t)return t(s)}},r.send(null)},runScripts=function(){var e,t,n,i,r,s,o,a,c,h,l;for(a=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,r;for(r=[],e=0,n=a.length;n>e;e++)s=a[e],i=s.type,__indexOf.call(t,i)>=0&&r.push(s);return r}(),r=0,n=function(){var t;return t=e[r],t instanceof Array?(CoffeeScript.run.apply(CoffeeScript,t),r++,n()):void 0},c=function(i,r){var s;return s={literate:i.type===t[1]},i.src?CoffeeScript.load(i.src,function(t){return e[r]=t,n()},s,!0):(s.sourceFiles=["embedded"],e[r]=[i.innerHTML,s])},i=h=0,l=e.length;l>h;i=++h)o=e[i],c(o,i);return n()},window.addEventListener?window.addEventListener("DOMContentLoaded",runScripts,!1):window.attachEvent("onload",runScripts))}.call(this),module.exports}(),require["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this); \ No newline at end of file diff --git a/index.html b/index.html index 9ef92ab5..344fa2a2 100644 --- a/index.html +++ b/index.html @@ -110,7 +110,7 @@

      Latest Version: - 1.8.0 + 1.9.0

      npm install -g coffee-script
      @@ -258,8 +258,8 @@ cubes = (function() {

      To install, first make sure you have a working copy of the latest stable version of - Node.js, and npm - (the Node Package Manager). You can then install CoffeeScript globally with npm: + Node.js. You can then install CoffeeScript globally + with npm:

      @@ -576,6 +576,44 @@ fill = function(container, liquid) {
         return "Filling the " + container + " with " + liquid + "...";
       };
       ;alert(fill("cup"));'>run: fill("cup")

    +

    + CoffeeScript function support + ES6 generator functions + through the yield keyword. A generator in CoffeeScript is simply a function + that yields. +

    +
    perfectSquares = ->
    +  num = 0
    +  loop
    +    num += 1
    +    yield num * num
    +  return
    +
    +window.ps or= perfectSquares()
    var perfectSquares;
    +
    +perfectSquares = function*() {
    +  var num;
    +  num = 0;
    +  while (true) {
    +    num += 1;
    +    (yield num * num);
    +  }
    +};
    +
    +window.ps || (window.ps = perfectSquares());
    +
    load
    run: ps.next().value

    @@ -625,7 +663,7 @@ kids = { age: 9 } }; -

    load
    load
    load

    +
    load

    @@ -687,7 +725,7 @@ changeNumbers = function

    load
    load
    load

    +
    load

    @@ -828,7 +866,7 @@ alert("Gold: " + gold); alert("Silver: " + silver); alert("The Field: " + rest); -

    load
    load
    , 'spinach'< eat(food); } } -
    load

    +
    load

    Comprehensions should be able to handle most places where you otherwise would use a loop, each/forEach, map, or select/filter, for example: @@ -915,7 +953,7 @@ countdown = (functionreturn _results; })(); -

    load
    load
    load
    load
    load
    load
    load

    +
    load

    @@ -1107,7 +1145,7 @@ middle = numbers.slice(3, -22); copy = numbers.slice(0); -

    load
    load
    load
    load
    load
    load
    load
    load
    run: six

    @@ -1233,7 +1271,7 @@ globals = ((functionreturn _results; })()).slice(0, 10); -
    load
    load
    load
    load
    load

    +
    load

    The Existential Operator @@ -1416,7 +1454,7 @@ speed = 0; } footprints = typeof yeti !== "undefined" && yeti !== null ? yeti : "bear"; -

    load
    load
    load

    +
    load

    Soaking up nulls is similar to Ruby's - andand gem, and to the + andand gem, and to the safe navigation operator in Groovy.

    @@ -1501,12 +1539,12 @@ tom.move()
    var Animal, Horse, Snake, sam, tom,
    -  __hasProp = {}.hasOwnProperty,
    -  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
    +  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    +  __hasProp = {}.hasOwnProperty;
     
     Animal = (function() {
    -  function Animal(name) {
    -    this.name = name;
    +  function Animal(_at_name) {
    +    this.name = _at_name;
       }
     
       Animal.prototype.move = function(meters) {
    @@ -1556,13 +1594,13 @@ tom = new Horse("Tommy the Pal
     sam.move();
     
     tom.move();
    -
    load
    load
    load
    load
    run: "one_two".dasherize()

    @@ -1665,7 +1703,7 @@ theBait = 1000; theSwitch = 0; _ref = [theSwitch, theBait], theBait = _ref[0], theSwitch = _ref[1]; -
    load
    load
    load
    load
    load
    load
    load
    load
    load
    load
    load
    load
    \n @customer.purchase @cart"
    load

    +
    load

    If we had used -> in the callback above, @customer would have referred to the undefined "customer" property of the DOM element, @@ -1894,7 +1932,7 @@ Account = functionfunction() { return [document.title, "Hello JavaScript"].join(": "); }; -

    load
    load
    load

    +
    load

    Switch statements can also be used without a control expression, turning them in to a cleaner alternative to if/else chains. @@ -1979,7 +2017,7 @@ grade = (functionreturn 'A'; } })(); -

    load

    +
    load

    @@ -2006,7 +2044,7 @@ grade = (functionfinally { cleanUp(); } -

    load

    +
    load

    @@ -2026,7 +2064,7 @@ healthy = 200 > cholesterol > 127; healthy = (200 > cholesterol && cholesterol > 60); -

    load
    load
    load
    load
    run: sentence

    Multiline strings are allowed in CoffeeScript. Lines are joined by a single space unless they end with a backslash. Indentation is ignored. @@ -2076,7 +2114,7 @@ sentence = "" + (22 / 7) + " is a decent approximation of π";

    var mobyDick;
     
     mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world...";
    -
    load
    load
    run: mobyDick

    @@ -2095,7 +2133,7 @@ mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely --
    var html;
     
     html = "<strong>\n  cup of coffeescript\n</strong>";
    -
    load
    load
    run: html

    @@ -2120,7 +2158,7 @@ SkinnyMochaHalfCaffScript Compiler v1.0 Released under the MIT License */ -
    load

    +
    load

    @@ -2145,7 +2183,7 @@ Released under the MIT License

    var OPERATOR;
     
     OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/;
    -
    load

    +
    load

    @@ -2190,9 +2228,9 @@ task('build:parser', 'rebuild t require('jison'); code = require('./lib/grammar').parser.generate(); dir = options.output || 'lib'; - return fs.writeFile("" + dir + "/parser.js", code); + return fs.writeFile(dir + "/parser.js", code); }); -

    load

    +
    load

    If you need to invoke one task before another — for example, running build before test, you can use the invoke function: @@ -2302,14 +2340,18 @@ task('build:parser', 'rebuild t

  • CoffeeScript Application Development - is a new book from Packt Publishing that introduces CoffeeScript while + from Packt, introduces CoffeeScript while walking through the process of building a demonstration web application.
  • CoffeeScript in Action - is a new book from Manning Publications that covers CoffeeScript syntax, composition techniques + from Manning Publications, covers CoffeeScript syntax, composition techniques and application development.
  • +
  • + CoffeeScript: Die Alternative zu JavaScript + from dpunkt.verlag, is the first CoffeeScript book in Deutsch. +
  • @@ -2449,6 +2491,29 @@ task('build:parser', 'rebuild t Change Log

    +

    +

    + + 1.9.0 + + +
      +
    • + CoffeeScript now supports ES6 generators. A generator is simply a function + that yields. +
    • +
    • + Improved error reporting for string interpolation. +
    • +
    • + Changed strategy for the generation of internal compiler variable names. +
    • +
    • + Fixed REPL compatibility with latest versions of Node and IO.js. +
    • +
    +

    +

    @@ -2532,7 +2597,7 @@ task('build:parser', 'rebuild t
    $('body').click(function(e) {
       return $('.box').fadeIn('fast').addClass('.active');
     }).css('background', 'white');
    -
    load

    +
    load

    • Added **, // and %% operators and ... expansion in parameter lists and destructuring expressions. diff --git a/lib/coffee-script/browser.js b/lib/coffee-script/browser.js index 82e57e14..00f45bb2 100644 --- a/lib/coffee-script/browser.js +++ b/lib/coffee-script/browser.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var CoffeeScript, compile, runScripts, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js index 6f46da13..46f3282a 100644 --- a/lib/coffee-script/cake.js +++ b/lib/coffee-script/cake.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; diff --git a/lib/coffee-script/coffee-script.js b/lib/coffee-script/coffee-script.js index 9c1dc6ba..846747b0 100644 --- a/lib/coffee-script/coffee-script.js +++ b/lib/coffee-script/coffee-script.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var Lexer, SourceMap, compile, ext, formatSourcePosition, fs, getSourceMap, helpers, lexer, parser, path, sourceMaps, vm, withPrettyErrors, _base, _i, _len, _ref, __hasProp = {}.hasOwnProperty, @@ -18,7 +18,7 @@ SourceMap = require('./sourcemap'); - exports.VERSION = '1.8.0'; + exports.VERSION = '1.9.0'; exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']; diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js index d85bcc0b..276f4d8c 100644 --- a/lib/coffee-script/command.js +++ b/lib/coffee-script/command.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs, _ref, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; diff --git a/lib/coffee-script/grammar.js b/lib/coffee-script/grammar.js index b60810bb..ae16468f 100644 --- a/lib/coffee-script/grammar.js +++ b/lib/coffee-script/grammar.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js index b29fc1fa..06cbbd87 100644 --- a/lib/coffee-script/helpers.js +++ b/lib/coffee-script/helpers.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref; diff --git a/lib/coffee-script/index.js b/lib/coffee-script/index.js index 46c97ea5..ac8f5436 100644 --- a/lib/coffee-script/index.js +++ b/lib/coffee-script/index.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var key, val, _ref; diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js index 76317919..891e52ad 100644 --- a/lib/coffee-script/lexer.js +++ b/lib/coffee-script/lexer.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HERECOMMENT_ILLEGAL, HEREDOC_DOUBLE, HEREDOC_INDENT, HEREDOC_SINGLE, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LEADING_BLANK_LINE, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NUMBER, OCTAL_ESCAPE, OPERATOR, POSSIBLY_DIVISION, REGEX, REGEX_FLAGS, REGEX_ILLEGAL, RELATION, RESERVED, Rewriter, SHIFT, STRICT_PROSCRIBED, STRING_DOUBLE, STRING_OMIT, STRING_SINGLE, STRING_START, TRAILING_BLANK_LINE, TRAILING_SPACES, UNARY, UNARY_MATH, VALID_FLAGS, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; diff --git a/lib/coffee-script/nodes.js b/lib/coffee-script/nodes.js index 5752e855..0240f2e7 100644 --- a/lib/coffee-script/nodes.js +++ b/lib/coffee-script/nodes.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, diff --git a/lib/coffee-script/optparse.js b/lib/coffee-script/optparse.js index ca63970a..3cfc00c5 100644 --- a/lib/coffee-script/optparse.js +++ b/lib/coffee-script/optparse.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; diff --git a/lib/coffee-script/register.js b/lib/coffee-script/register.js index b1d75ca4..b1d94c6a 100644 --- a/lib/coffee-script/register.js +++ b/lib/coffee-script/register.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, loadFile, path, _i, _len, _ref; diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js index e2083082..882513ec 100644 --- a/lib/coffee-script/repl.js +++ b/lib/coffee-script/repl.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, replDefaults, updateSyntaxError, vm, _ref; diff --git a/lib/coffee-script/rewriter.js b/lib/coffee-script/rewriter.js index 355822bd..59a62338 100644 --- a/lib/coffee-script/rewriter.js +++ b/lib/coffee-script/rewriter.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, diff --git a/lib/coffee-script/scope.js b/lib/coffee-script/scope.js index 0a8a50fc..1e5e3506 100644 --- a/lib/coffee-script/scope.js +++ b/lib/coffee-script/scope.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var Scope, extend, last, _ref, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; diff --git a/lib/coffee-script/sourcemap.js b/lib/coffee-script/sourcemap.js index b9927e1b..ce597456 100644 --- a/lib/coffee-script/sourcemap.js +++ b/lib/coffee-script/sourcemap.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.0 (function() { var LineMap, SourceMap; diff --git a/package.json b/package.json index aaf0d7cf..906e0962 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "compiler" ], "author": "Jeremy Ashkenas", - "version": "1.8.0", + "version": "1.9.0", "license": "MIT", "engines": { "node": ">=0.8.0" diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee index 55c9b307..e61dab6d 100644 --- a/src/coffee-script.coffee +++ b/src/coffee-script.coffee @@ -12,7 +12,7 @@ helpers = require './helpers' SourceMap = require './sourcemap' # The current CoffeeScript version number. -exports.VERSION = '1.8.0' +exports.VERSION = '1.9.0' exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']