diff --git a/Cakefile b/Cakefile index 5a651f4779..3f7a58568a 100644 --- a/Cakefile +++ b/Cakefile @@ -85,20 +85,15 @@ task 'build:parser', 'rebuild the Jison parser (run build first)', -> fs.writeFile 'lib/coffee-script/parser.js', parser.generate() -task 'build:ultraviolet', 'build and install the Ultraviolet syntax highlighter', -> - exec 'plist2syntax ../coffee-script-tmbundle/Syntaxes/CoffeeScript.tmLanguage', (err) -> - throw err if err - exec 'sudo mv coffeescript.yaml /usr/local/lib/ruby/gems/1.8/gems/ultraviolet-0.10.2/syntax/coffeescript.syntax' - - task 'build:browser', 'rebuild the merged script for inclusion in the browser', -> code = '' for name in ['helpers', 'rewriter', 'lexer', 'parser', 'scope', 'nodes', 'sourcemap', 'coffee-script', 'browser'] code += """ - require['./#{name}'] = new function() { - var exports = this; + require['./#{name}'] = (function() { + var exports = {}, module = {exports: exports}; #{fs.readFileSync "lib/coffee-script/#{name}.js"} - }; + return module.exports; + })(); """ code = """ (function(root) { @@ -128,7 +123,7 @@ task 'doc:site', 'watch and continually rebuild the documentation for the websit task 'doc:source', 'rebuild the internal documentation', -> - exec 'docco src/*.coffee && cp -rf docs documentation && rm -r docs', (err) -> + exec 'docco src/*.*coffee && cp -rf docs documentation && rm -r docs', (err) -> throw err if err @@ -211,20 +206,15 @@ runTests = (CoffeeScript) -> log "failed #{failures.length} and #{message}", red for fail in failures {error, filename, description, source} = fail - jsFilename = filename.replace(/\.coffee$/,'.js') - match = error.stack?.match(new RegExp(fail.file+":(\\d+):(\\d+)")) - match = error.stack?.match(/on line (\d+):/) unless match - [match, line, col] = match if match console.log '' log " #{description}", red if description log " #{error.stack}", red - log " #{jsFilename}: line #{line ? 'unknown'}, column #{col ? 'unknown'}", red console.log " #{source}" if source return # Run every test in the `test` folder, recording failures. files = fs.readdirSync 'test' - for file in files when file.match /\.(lit)?coffee$/i + for file in files when helpers.isCoffee file literate = helpers.isLiterate file currentFile = filename = path.join 'test', file code = fs.readFileSync filename diff --git a/LICENSE b/LICENSE index dbe6b4e3b9..a396eaed7e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2012 Jeremy Ashkenas +Copyright (c) 2009-2013 Jeremy Ashkenas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -19,4 +19,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +OTHER DEALINGS IN THE SOFTWARE. diff --git a/documentation/coffee/block_comment.coffee b/documentation/coffee/block_comment.coffee index 431dfd9504..452ca3b03a 100644 --- a/documentation/coffee/block_comment.coffee +++ b/documentation/coffee/block_comment.coffee @@ -1,5 +1,5 @@ ### -CoffeeScript Compiler v1.6.1 +SkinnyMochaHalfCaffScript Compiler v1.0 Released under the MIT License ### diff --git a/documentation/coffee/constructor_destructuring.coffee b/documentation/coffee/constructor_destructuring.coffee new file mode 100644 index 0000000000..53c4b39a0d --- /dev/null +++ b/documentation/coffee/constructor_destructuring.coffee @@ -0,0 +1,4 @@ +class Person + constructor: (options) -> + {@name, @age, @height} = options + diff --git a/documentation/coffee/switch_with_no_expression.coffee b/documentation/coffee/switch_with_no_expression.coffee new file mode 100644 index 0000000000..08160199f9 --- /dev/null +++ b/documentation/coffee/switch_with_no_expression.coffee @@ -0,0 +1,8 @@ +score = 76 +grade = switch + when score < 60 then 'F' + when score < 70 then 'D' + when score < 80 then 'C' + when score < 90 then 'B' + else 'A' +# grade == 'C' diff --git a/documentation/docs/browser.html b/documentation/docs/browser.html index d5e9bbbfe3..7364615e24 100644 --- a/documentation/docs/browser.html +++ b/documentation/docs/browser.html @@ -1,43 +1,290 @@ - browser.coffee
Jump To …

browser.coffee

Override exported methods for non-Node.js engines.

CoffeeScript = require './coffee-script'
-CoffeeScript.require = require

Use standard JavaScript eval to eval code.

CoffeeScript.eval = (code, options = {}) ->
-  options.bare ?= on
-  eval CoffeeScript.compile code, options

Running code does not provide access to this scope.

CoffeeScript.run = (code, options = {}) ->
-  options.bare = on
-  Function(CoffeeScript.compile code, options)()

If we're not in a browser environment, we're finished with the public API.

return unless window?

Load a remote script from the current domain via XHR.

CoffeeScript.load = (url, callback, options = {}) ->
-  xhr = if window.ActiveXObject
-    new window.ActiveXObject('Microsoft.XMLHTTP')
-  else
-    new XMLHttpRequest()
-  xhr.open 'GET', url, true
-  xhr.overrideMimeType 'text/plain' if 'overrideMimeType' of xhr
-  xhr.onreadystatechange = ->
-    if xhr.readyState is 4
-      if xhr.status in [0, 200]
-        CoffeeScript.run xhr.responseText, options
-      else
-        throw new Error "Could not load #{url}"
-      callback() if callback
-  xhr.send null

Activate CoffeeScript in the browser by having it compile and evaluate + + + + + browser.coffee + + + + + +

+
+ + + +
    + +
  • +
    +

    browser.coffee

    +
    +
  • + + + +
  • +
    + +
    + +
    +

    This Browser compatibility layer extends core CoffeeScript functions +to make things work smoothly when compiling code directly in the browser. +We add support for loading remote Coffee scripts via XHR, and +text/coffeescript script tags, source maps via data-URLs, and so on. +

    + +
    + +
    +CoffeeScript = require './coffee-script'
    +CoffeeScript.require = require
    +compile = CoffeeScript.compile
    + +
  • + + +
  • +
    + +
    + +
    +

    Use standard JavaScript eval to eval code. +

    + +
    + +
    CoffeeScript.eval = (code, options = {}) ->
    +  options.bare ?= on
    +  eval compile code, options
    + +
  • + + +
  • +
    + +
    + +
    +

    Running code does not provide access to this scope. +

    + +
    + +
    CoffeeScript.run = (code, options = {}) ->
    +  options.bare = on
    +  options.shiftLine = on
    +  Function(compile code, options)()
    + +
  • + + +
  • +
    + +
    + +
    +

    If we're not in a browser environment, we're finished with the public API. +

    + +
    + +
    return unless window?
    + +
  • + + +
  • +
    + +
    + +
    +

    Include source maps where possible. If we've got a base64 encoder, a +JSON serializer, and tools for escaping unicode characters, we're good to go. +Ported from https://developer.mozilla.org/en-US/docs/DOM/window.btoa +

    + +
    + +
    if btoa? and JSON? and unescape? and encodeURIComponent?
    +  compile = (code, options = {}) ->
    +    options.sourceMap = true
    +    options.inline = true
    +    {js, v3SourceMap} = CoffeeScript.compile code, options
    +    "#{js}\n//@ sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//@ sourceURL=coffeescript"
    + +
  • + + +
  • +
    + +
    + +
    +

    Load a remote script from the current domain via XHR. +

    + +
    + +
    CoffeeScript.load = (url, callback, options = {}) ->
    +  options.sourceFiles = [url]
    +  xhr = if window.ActiveXObject
    +    new window.ActiveXObject('Microsoft.XMLHTTP')
    +  else
    +    new window.XMLHttpRequest()
    +  xhr.open 'GET', url, true
    +  xhr.overrideMimeType 'text/plain' if 'overrideMimeType' of xhr
    +  xhr.onreadystatechange = ->
    +    if xhr.readyState is 4
    +      if xhr.status in [0, 200]
    +        CoffeeScript.run xhr.responseText, options
    +      else
    +        throw new Error "Could not load #{url}"
    +      callback() if callback
    +  xhr.send null
    + +
  • + + +
  • +
    + +
    + +
    +

    Activate CoffeeScript in the browser by having it compile and evaluate all script tags with a content-type of text/coffeescript. -This happens on page load.

runScripts = ->
-  scripts = document.getElementsByTagName 'script'
-  coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']
-  coffees = (s for s in scripts when s.type in coffeetypes)
-  index = 0
-  length = coffees.length
-  do execute = ->
-    script = coffees[index++]
-    mediatype = script?.type
-    if mediatype in coffeetypes
-      options = {literate: mediatype is 'text/literate-coffeescript'}
-      if script.src
-        CoffeeScript.load script.src, execute, options
-      else
-        CoffeeScript.run script.innerHTML, options
-        execute()
-  null

Listen for window load, both in browsers and in IE.

if window.addEventListener
-  addEventListener 'DOMContentLoaded', runScripts, no
-else
-  attachEvent 'onload', runScripts
-
-
\ No newline at end of file +This happens on page load. +

+ + + +
runScripts = ->
+  scripts = window.document.getElementsByTagName 'script'
+  coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']
+  coffees = (s for s in scripts when s.type in coffeetypes)
+  index = 0
+  length = coffees.length
+  do execute = ->
+    script = coffees[index++]
+    mediatype = script?.type
+    if mediatype in coffeetypes
+      options = {literate: mediatype is 'text/literate-coffeescript'}
+      if script.src
+        CoffeeScript.load script.src, execute, options
+      else
+        options.sourceFiles = ['embedded']
+        CoffeeScript.run script.innerHTML, options
+        execute()
+  null
+ + + + +
  • +
    + +
    + +
    +

    Listen for window load, both in decent browsers and in IE. +

    + +
    + +
    if window.addEventListener
    +  window.addEventListener 'DOMContentLoaded', runScripts, no
    +else
    +  window.attachEvent 'onload', runScripts
    + +
  • + + + + + diff --git a/documentation/docs/cake.html b/documentation/docs/cake.html index 02769e958b..dbcb09bc9d 100644 --- a/documentation/docs/cake.html +++ b/documentation/docs/cake.html @@ -1,59 +1,338 @@ - cake.coffee
    Jump To …

    cake.coffee

    cake is a simplified version of Make + + + + + cake.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      cake.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      cake is a simplified version of Make (Rake, Jake) for CoffeeScript. You define tasks with names and descriptions in a Cakefile, -and can call them from the command line, or invoke them from other tasks.

      +and can call them from the command line, or invoke them from other tasks. +

      Running cake with no arguments will print out a list of all the tasks in the -current directory's Cakefile.

    External dependencies.

    fs           = require 'fs'
    -path         = require 'path'
    -helpers      = require './helpers'
    -optparse     = require './optparse'
    -CoffeeScript = require './coffee-script'
    -
    -existsSync   = fs.existsSync or path.existsSync

    Keep track of the list of defined tasks, the accepted options, and so on.

    tasks     = {}
    -options   = {}
    -switches  = []
    -oparse    = null

    Mixin the top-level Cake functions for Cakefiles to use directly.

    helpers.extend global,

    Define a Cake task with a short name, an optional sentence description, -and the function to run as the action itself.

      task: (name, description, action) ->
    -    [action, description] = [description, action] unless action
    -    tasks[name] = {name, description, action}

    Define an option that the Cakefile accepts. The parsed options hash, +current directory's Cakefile. +

    + + + + + + +
  • +
    + +
    + +
    +

    External dependencies. +

    + +
    + +
    fs           = require 'fs'
    +path         = require 'path'
    +helpers      = require './helpers'
    +optparse     = require './optparse'
    +CoffeeScript = require './coffee-script'
    +
    +existsSync   = fs.existsSync or path.existsSync
    + +
  • + + +
  • +
    + +
    + +
    +

    Keep track of the list of defined tasks, the accepted options, and so on. +

    + +
    + +
    tasks     = {}
    +options   = {}
    +switches  = []
    +oparse    = null
    + +
  • + + +
  • +
    + +
    + +
    +

    Mixin the top-level Cake functions for Cakefiles to use directly. +

    + +
    + +
    helpers.extend global,
    + +
  • + + +
  • +
    + +
    + +
    +

    Define a Cake task with a short name, an optional sentence description, +and the function to run as the action itself. +

    + +
    + +
      task: (name, description, action) ->
    +    [action, description] = [description, action] unless action
    +    tasks[name] = {name, description, action}
    + +
  • + + +
  • +
    + +
    + +
    +

    Define an option that the Cakefile accepts. The parsed options hash, containing all of the command-line options passed, will be made available -as the first argument to the action.

  •   option: (letter, flag, description) ->
    -    switches.push [letter, flag, description]

    Invoke another task in the current Cakefile.

      invoke: (name) ->
    -    missingTask name unless tasks[name]
    -    tasks[name].action options

    Run cake. Executes all of the tasks you pass, in order. Note that Node's -asynchrony may cause tasks to execute in a different order than you'd expect. +as the first argument to the action. +

    + + + +
      option: (letter, flag, description) ->
    +    switches.push [letter, flag, description]
    + + + + +
  • +
    + +
    + +
    +

    Invoke another task in the current Cakefile. +

    + +
    + +
      invoke: (name) ->
    +    missingTask name unless tasks[name]
    +    tasks[name].action options
    + +
  • + + +
  • +
    + +
    + +
    +

    Run cake. Executes all of the tasks you pass, in order. Note that Node's +asynchrony may cause tasks to execute in a different order than you'd expect. If no tasks are passed, print the help screen. Keep a reference to the -original directory name, when running Cake tasks from subdirectories.

  • exports.run = ->
    -  global.__originalDirname = fs.realpathSync '.'
    -  process.chdir cakefileDirectory __originalDirname
    -  args = process.argv[2..]
    -  CoffeeScript.run fs.readFileSync('Cakefile').toString(), filename: 'Cakefile'
    -  oparse = new optparse.OptionParser switches
    -  return printTasks() unless args.length
    -  try
    -    options = oparse.parse(args)
    -  catch e
    -    return fatalError "#{e}"
    -  invoke arg for arg in options.arguments

    Display the list of Cake tasks in a format similar to rake -T

    printTasks = ->
    -  relative = path.relative or path.resolve
    -  cakefilePath = path.join relative(__originalDirname, process.cwd()), 'Cakefile'
    -  console.log "#{cakefilePath} defines the following tasks:\n"
    -  for name, task of tasks
    -    spaces = 20 - name.length
    -    spaces = if spaces > 0 then Array(spaces + 1).join(' ') else ''
    -    desc   = if task.description then "# #{task.description}" else ''
    -    console.log "cake #{name}#{spaces} #{desc}"
    -  console.log oparse.help() if switches.length

    Print an error and exit when attempting to use an invalid task/option.

    fatalError = (message) ->
    -  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}"

    When cake is invoked, search in the current and all parent directories -to find the relevant Cakefile.

    cakefileDirectory = (dir) ->
    -  return dir if existsSync path.join dir, 'Cakefile'
    -  parent = path.normalize path.join dir, '..'
    -  return cakefileDirectory parent unless parent is dir
    -  throw new Error "Cakefile not found in #{process.cwd()}"
    -
    -
    \ No newline at end of file +original directory name, when running Cake tasks from subdirectories. +

    + + + +
    exports.run = ->
    +  global.__originalDirname = fs.realpathSync '.'
    +  process.chdir cakefileDirectory __originalDirname
    +  args = process.argv[2..]
    +  CoffeeScript.run fs.readFileSync('Cakefile').toString(), filename: 'Cakefile'
    +  oparse = new optparse.OptionParser switches
    +  return printTasks() unless args.length
    +  try
    +    options = oparse.parse(args)
    +  catch e
    +    return fatalError "#{e}"
    +  invoke arg for arg in options.arguments
    + + + + +
  • +
    + +
    + +
    +

    Display the list of Cake tasks in a format similar to rake -T +

    + +
    + +
    printTasks = ->
    +  relative = path.relative or path.resolve
    +  cakefilePath = path.join relative(__originalDirname, process.cwd()), 'Cakefile'
    +  console.log "#{cakefilePath} defines the following tasks:\n"
    +  for name, task of tasks
    +    spaces = 20 - name.length
    +    spaces = if spaces > 0 then Array(spaces + 1).join(' ') else ''
    +    desc   = if task.description then "# #{task.description}" else ''
    +    console.log "cake #{name}#{spaces} #{desc}"
    +  console.log oparse.help() if switches.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Print an error and exit when attempting to use an invalid task/option. +

    + +
    + +
    fatalError = (message) ->
    +  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}"
    + +
  • + + +
  • +
    + +
    + +
    +

    When cake is invoked, search in the current and all parent directories +to find the relevant Cakefile. +

    + +
    + +
    cakefileDirectory = (dir) ->
    +  return dir if existsSync path.join dir, 'Cakefile'
    +  parent = path.normalize path.join dir, '..'
    +  return cakefileDirectory parent unless parent is dir
    +  throw new Error "Cakefile not found in #{process.cwd()}"
    + +
  • + + + + + diff --git a/documentation/docs/coffee-script.html b/documentation/docs/coffee-script.html index 091b7a3943..0ff676f871 100644 --- a/documentation/docs/coffee-script.html +++ b/documentation/docs/coffee-script.html @@ -1,129 +1,874 @@ - coffee-script.coffee
    Jump To …

    coffee-script.coffee

    CoffeeScript can be used both on the server, as a command-line compiler based -on Node.js/V8, or to run CoffeeScripts directly in the browser. This module + + + + + coffee-script.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      coffee-script.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      CoffeeScript can be used both on the server, as a command-line compiler based +on Node.js/V8, or to run CoffeeScript directly in the browser. This module contains the main entry functions for tokenizing, parsing, and compiling -source CoffeeScript into JavaScript.

      - -

      If included on a webpage, it will automatically sniff out, compile, and -execute all scripts present in text/coffeescript tags.

    fs        = require 'fs'
    -path      = require 'path'
    -{Lexer}   = require './lexer'
    -{parser}  = require './parser'
    -helpers   = require './helpers'
    -vm        = require 'vm'
    -sourcemap = require './sourcemap'

    Load and run a CoffeeScript file for Node, stripping any BOMs.

    loadFile = (module, filename) ->
    -  raw = fs.readFileSync filename, 'utf8'
    -  stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw
    -  module._compile compile(stripped, {filename, literate: helpers.isLiterate filename}), filename
    -
    -if require.extensions
    -  for ext in ['.coffee', '.litcoffee', '.md', '.coffee.md']
    -    require.extensions[ext] = loadFile

    The current CoffeeScript version number.

    exports.VERSION = '1.6.1'

    Expose helpers for testing.

    exports.helpers = helpers

    Compile CoffeeScript code to JavaScript, using the Coffee/Jison compiler.

    - -

    If options.sourceMap is specified, then options.filename must also be specified.

    +source CoffeeScript into JavaScript. +

    + + + +
    +fs            = require 'fs'
    +vm            = require 'vm'
    +path          = require 'path'
    +child_process = require 'child_process'
    +{Lexer}       = require './lexer'
    +{parser}      = require './parser'
    +helpers       = require './helpers'
    +SourceMap     = require './sourcemap'
    + + + + +
  • +
    + +
    + +
    +

    The current CoffeeScript version number. +

    + +
    + +
    exports.VERSION = '1.6.3'
    + +
  • + + +
  • +
    + +
    + +
    +

    Expose helpers for testing. +

    + +
    + +
    exports.helpers = helpers
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile CoffeeScript code to JavaScript, using the Coffee/Jison compiler. +

    +

    If options.sourceMap is specified, then options.filename must also be specified. All +options that can be passed to SourceMap#generate may also be passed here. + +

    This returns a javascript string, unless options.sourceMap is passed, -in which case this returns a `{js, v3SourceMap, sourceMap} +in which case this returns a {js, v3SourceMap, sourceMap} object, where sourceMap is a sourcemap.coffee#SourceMap object, handy for doing programatic -lookups.

  • exports.compile = compile = (code, options = {}) ->
    -  {merge} = exports.helpers
    -  try
    -
    -    if options.sourceMap
    -      coffeeFile = helpers.baseFileName options.filename
    -      jsFile = helpers.baseFileName(options.filename, yes) + ".js"
    -      sourceMap = new sourcemap.SourceMap()
    -
    -    fragments = (parser.parse lexer.tokenize(code, options)).compileToFragments options
    -
    -    currentLine = 0
    -    currentLine += 1 if options.header
    -    currentLine += 1 if options.sourceMap
    -    currentColumn = 0
    -    js = ""
    -    for fragment in fragments

    Update the sourcemap with data from each fragment

          if sourceMap
    -        if fragment.locationData
    -          sourceMap.addMapping(
    -            [fragment.locationData.first_line, fragment.locationData.first_column],
    -            [currentLine, currentColumn],
    -            {noReplace: true})
    -        newLines = helpers.count fragment.code, "\n"
    -        currentLine += newLines
    -        currentColumn = fragment.code.length - (if newLines then fragment.code.lastIndexOf "\n" else 0)

    Copy the code from each fragment into the final JavaScript.

          js += fragment.code
    -
    -  catch err
    -    err.message = "In #{options.filename}, #{err.message}" if options.filename
    -    throw err
    -
    -  if options.header
    -    header = "Generated by CoffeeScript #{@VERSION}"
    -    js = "// #{header}\n#{js}"
    -
    -  if options.sourceMap
    -    answer = {js}
    -    if sourceMap
    -      answer.sourceMap = sourceMap
    -      answer.v3SourceMap = sourcemap.generateV3SourceMap sourceMap, coffeeFile, jsFile
    -    answer
    -  else
    -    js

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

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

    Parse a string of CoffeeScript code or an array of lexed tokens, and +lookups. +

    + + + +
    exports.compile = compile = (code, options = {}) ->
    +  {merge} = helpers
    +
    +  if options.sourceMap
    +    map = new SourceMap
    +
    +  fragments = parser.parse(lexer.tokenize code, options).compileToFragments options
    +
    +  currentLine = 0
    +  currentLine += 1 if options.header
    +  currentLine += 1 if options.shiftLine
    +  currentColumn = 0
    +  js = ""
    +  for fragment in fragments
    + + + + +
  • +
    + +
    + +
    +

    Update the sourcemap with data from each fragment +

    + +
    + +
        if options.sourceMap
    +      if fragment.locationData
    +        map.add(
    +          [fragment.locationData.first_line, fragment.locationData.first_column]
    +          [currentLine, currentColumn]
    +          {noReplace: true})
    +      newLines = helpers.count fragment.code, "\n"
    +      currentLine += newLines
    +      currentColumn = fragment.code.length - (if newLines then fragment.code.lastIndexOf "\n" else 0)
    + +
  • + + +
  • +
    + +
    + +
    +

    Copy the code from each fragment into the final JavaScript. +

    + +
    + +
        js += fragment.code
    +
    +  if options.header
    +    header = "Generated by CoffeeScript #{@VERSION}"
    +    js = "// #{header}\n#{js}"
    +
    +  if options.sourceMap
    +    answer = {js}
    +    answer.sourceMap = map
    +    answer.v3SourceMap = map.generate(options, code)
    +    answer
    +  else
    +    js
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    exports.tokens = (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.

  • exports.nodes = (source, options) ->
    -  if typeof source is 'string'
    -    parser.parse lexer.tokenize source, options
    -  else
    -    parser.parse source

    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.

      mainModule.filename = process.argv[1] =
    -      if options.filename then fs.realpathSync(options.filename) else '.'

    Clear the module cache.

      mainModule.moduleCache and= {}

    Assign paths for node_modules loading

      mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename

    Compile.

      if not helpers.isCoffee(mainModule.filename) or require.extensions
    -    mainModule._compile compile(code, options), mainModule.filename
    -  else
    -    mainModule._compile code, mainModule.filename

    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 = {}) ->
    -  return unless code = code.trim()
    -  Script = vm.Script
    -  if Script
    -    if options.sandbox?
    -      if options.sandbox instanceof Script.createContext().constructor
    -        sandbox = options.sandbox
    -      else
    -        sandbox = Script.createContext()
    -        sandbox[k] = v for own k, v of options.sandbox
    -      sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox
    -    else
    -      sandbox = global
    -    sandbox.__filename = options.filename || 'eval'
    -    sandbox.__dirname  = path.dirname sandbox.__filename

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

        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
    -      _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

    Instantiate a Lexer for our use here.

    lexer = new Lexer

    The real Lexer produces a generic stream of tokens. This object provides a +or traverse it by using .traverseChildren() with a callback. +

    + + + +
    exports.nodes = (source, options) ->
    +  if typeof source is 'string'
    +    parser.parse lexer.tokenize source, options
    +  else
    +    parser.parse source
    + + + + +
  • +
    + +
    + +
    +

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

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

    Set the filename. +

    + +
    + +
      mainModule.filename = process.argv[1] =
    +    if options.filename then fs.realpathSync(options.filename) else '.'
    + +
  • + + +
  • +
    + +
    + +
    +

    Clear the module cache. +

    + +
    + +
      mainModule.moduleCache and= {}
    + +
  • + + +
  • +
    + +
    + +
    +

    Assign paths for node_modules loading +

    + +
    + +
      mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename or '.'
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile. +

    + +
    + +
      if not helpers.isCoffee(mainModule.filename) or require.extensions
    +    answer = compile(code, options)
    + +
  • + + +
  • +
    + +
    + +
    +

    Attach sourceMap object to sourceMaps[options.filename] so that +it is accessible by Error.prepareStackTrace. +

    + +
    + +
        do patchStackTrace
    +    sourceMaps[mainModule.filename] = answer.sourceMap
    +    mainModule._compile answer.js, mainModule.filename
    +  else
    +    mainModule._compile code, mainModule.filename
    + +
  • + + +
  • +
    + +
    + +
    +

    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 = {}) ->
    +  return unless code = code.trim()
    +  Script = vm.Script
    +  if Script
    +    if options.sandbox?
    +      if options.sandbox instanceof Script.createContext().constructor
    +        sandbox = options.sandbox
    +      else
    +        sandbox = Script.createContext()
    +        sandbox[k] = v for own k, v of options.sandbox
    +      sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox
    +    else
    +      sandbox = global
    +    sandbox.__filename = options.filename || 'eval'
    +    sandbox.__dirname  = path.dirname sandbox.__filename
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
        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
    +      _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
    + +
  • + + +
  • +
    + +
    + +
    +

    Load and run a CoffeeScript file for Node, stripping any BOMs. +

    + +
    + +
    loadFile = (module, filename) ->
    +  raw = fs.readFileSync filename, 'utf8'
    +  stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw
    +  answer = compile(stripped, {filename, sourceMap: true, literate: helpers.isLiterate filename})
    +  sourceMaps[filename] = answer.sourceMap
    +  module._compile answer.js, filename
    + +
  • + + +
  • +
    + +
    + +
    +

    If the installed version of Node supports require.extensions, register +CoffeeScript as an extension. +

    + +
    + +
    if require.extensions
    +  for ext in ['.coffee', '.litcoffee', '.coffee.md']
    +    require.extensions[ext] = loadFile
    + +
  • + + +
  • +
    + +
    + +
    +

    Patch Node's module loader to be able to handle mult-dot extensions. +This is a horrible thing that should not be required. Perhaps, one day, +when a truly benevolent dictator comes to rule over the Republik of Node, +it won't be. +

    + +
    + +
      Module = require 'module'
    +
    +  findExtension = (filename) ->
    +    extensions = path.basename(filename).split '.'
    + +
  • + + +
  • +
    + +
    + +
    +

    Remove the initial dot from dotfiles. +

    + +
    + +
        extensions.shift() if extensions[0] is ''
    + +
  • + + +
  • +
    + +
    + +
    +

    Start with the longest possible extension and work our way shortwards. +

    + +
    + +
        while extensions.shift()
    +      curExtension = '.' + extensions.join '.'
    +      return curExtension if Module._extensions[curExtension]
    +    '.js'
    +
    +  Module::load = (filename) ->
    +    @filename = filename
    +    @paths = Module._nodeModulePaths path.dirname filename
    +    extension = findExtension filename
    +    Module._extensions[extension](this, filename)
    +    @loaded = true
    + +
  • + + +
  • +
    + +
    + +
    +

    If we're on Node, patch child_process.fork so that Coffee scripts are able +to fork both CoffeeScript files, and JavaScript files, directly. +

    + +
    + +
    if child_process
    +  {fork} = child_process
    +  child_process.fork = (path, args = [], options = {}) ->
    +    execPath = if helpers.isCoffee(path) then 'coffee' else null
    +    if not Array.isArray args
    +      args = []
    +      options = args or {}
    +    options.execPath or= execPath
    +    fork path, args, options
    + +
  • + + +
  • +
    + +
    + +
    +

    Instantiate a Lexer for our use here. +

    + +
    + +
    lexer = new Lexer
    + +
  • + + +
  • +
    + +
    + +
    +

    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 -directly as a "Jison lexer".

  • parser.lexer =
    -  lex: ->
    -    token = @tokens[@pos++]
    -    if token
    -      [tag, @yytext, @yylloc] = token
    -      @yylineno = @yylloc.first_line
    -    else
    -      tag = ''
    -
    -    tag
    -  setInput: (@tokens) ->
    -    @pos = 0
    -  upcomingInput: ->
    -    ""
    -
    -parser.yy = require './nodes'
    -
    -
    \ No newline at end of file +directly as a "Jison lexer". +

    + + + +
    parser.lexer =
    +  lex: ->
    +    token = @tokens[@pos++]
    +    if token
    +      [tag, @yytext, @yylloc] = token
    +      @yylineno = @yylloc.first_line
    +    else
    +      tag = ''
    +
    +    tag
    +  setInput: (@tokens) ->
    +    @pos = 0
    +  upcomingInput: ->
    +    ""
    + + + + +
  • +
    + +
    + +
    +

    Make all the AST nodes visible to the parser. +

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

    Override Jison's default error handling function. +

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

    Disregard Jison's message, it contains redundant line numer information. +

    + +
    + +
      message = "unexpected #{if token is 1 then 'end of input' else token}"
    + +
  • + + +
  • +
    + +
    + +
    +

    The second argument has a loc property, which should have the location +data for this token. Unfortunately, Jison seems to send an outdated loc +(from the previous token), so we take the location information directly +from the lexer. +

    + +
    + +
      helpers.throwSyntaxError message, parser.lexer.yylloc
    + +
  • + + +
  • +
    + +
    + +
    +

    Based on michaelficarra/CoffeeScriptRedux +NodeJS / V8 have no support for transforming positions in stack traces using +sourceMap, so we must monkey-patch Error to display CoffeeScript source +positions. +

    + +
    + +
    +patched = false
    + +
  • + + +
  • +
    + +
    + +
    +

    Map of filenames -> sourceMap object. +

    + +
    + +
    sourceMaps = {}
    +
    +patchStackTrace = ->
    +  return if patched
    +  patched = true
    +  mainModule = require.main
    + +
  • + + +
  • +
    + +
    + +
    +

    (Assigning to a property of the Module object in the normal module cache is +unsuitable, because node deletes those objects from the cache if an +exception is thrown in the module body.) +

    + +
    + +
    +  Error.prepareStackTrace = (err, stack) ->
    +    sourceFiles = {}
    +
    +    getSourceMapping = (filename, line, column) ->
    +      sourceMap = sourceMaps[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
    +      "  at #{formatSourcePosition frame, getSourceMapping}"
    +
    +    "#{err.name}: #{err.message ? ''}\n#{frames.join '\n'}\n"
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    formatSourcePosition = (frame, getSourceMapping) ->
    +  fileName = undefined
    +  fileLocation = ''
    +
    +  if frame.isNative()
    +    fileLocation = "native"
    +  else
    +    if frame.isEval()
    +      fileName = frame.getScriptNameOrSourceURL()
    +      fileLocation = "#{frame.getEvalOrigin()}, " unless fileName
    +    else
    +      fileName = frame.getFileName()
    +
    +    fileName or= "<anonymous>"
    +
    +    line = frame.getLineNumber()
    +    column = frame.getColumnNumber()
    + +
  • + + +
  • +
    + +
    + +
    +

    Check for a sourceMap position +

    + +
    + +
        source = getSourceMapping fileName, line, column
    +    fileLocation =
    +      if source
    +        "#{fileName}:#{source[0]}:#{source[1]}, <js>:#{line}:#{column}"
    +      else
    +        "#{fileName}:#{line}:#{column}"
    +
    +
    +  functionName = frame.getFunctionName()
    +  isConstructor = frame.isConstructor()
    +  isMethodCall = not (frame.isToplevel() or isConstructor)
    +
    +  if isMethodCall
    +    methodName = frame.getMethodName()
    +    typeName = frame.getTypeName()
    +
    +    if functionName
    +      tp = as = ''
    +      if typeName and functionName.indexOf typeName
    +        tp = "#{typeName}."
    +      if methodName and functionName.indexOf(".#{methodName}") isnt functionName.length - methodName.length - 1
    +        as = " [as #{methodName}]"
    +
    +      "#{tp}#{functionName}#{as} (#{fileLocation})"
    +    else
    +      "#{typeName}.#{methodName or '<anonymous>'} (#{fileLocation})"
    +  else if isConstructor
    +    "new #{functionName or '<anonymous>'} (#{fileLocation})"
    +  else if functionName
    +    "#{functionName} (#{fileLocation})"
    +  else
    +    fileLocation
    + +
  • + + + + + diff --git a/documentation/docs/command.html b/documentation/docs/command.html index 2324bd1bce..85b5b6cc61 100644 --- a/documentation/docs/command.html +++ b/documentation/docs/command.html @@ -1,280 +1,779 @@ - command.coffee
    Jump To …

    command.coffee

    The coffee utility. Handles command-line compilation of CoffeeScript -into various forms: saved into .js files or printed to stdout, piped to -JavaScript Lint or recompiled every time the source is -saved, printed as a token stream or as the syntax tree, or launch an -interactive REPL.

    External dependencies.

    fs             = require 'fs'
    -path           = require 'path'
    -helpers        = require './helpers'
    -optparse       = require './optparse'
    -CoffeeScript   = require './coffee-script'
    -{spawn, exec}  = require 'child_process'
    -{EventEmitter} = require 'events'
    -
    -exists         = fs.exists or path.exists

    Allow CoffeeScript to emit Node.js events.

    helpers.extend CoffeeScript, new EventEmitter
    -
    -printLine = (line) -> process.stdout.write line + '\n'
    -printWarn = (line) -> process.stderr.write line + '\n'
    -
    -hidden = (file) -> /^\.|~$/.test file

    The help banner that is printed when coffee is called without arguments.

    BANNER = '''
    -  Usage: coffee [options] path/to/script.coffee -- [args]
    -
    -  If called without options, `coffee` will run your script.
    -'''

    The list of all the valid option flags that coffee knows how to handle.

    SWITCHES = [
    -  ['-b', '--bare',            'compile without a top-level function wrapper']
    -  ['-c', '--compile',         'compile to JavaScript and save as .js files']
    -  ['-e', '--eval',            'pass a string from the command line as input']
    -  ['-h', '--help',            'display this help message']
    -  ['-i', '--interactive',     'run an interactive CoffeeScript REPL']
    -  ['-j', '--join [FILE]',     'concatenate the source CoffeeScript before compiling']
    -  ['-l', '--lint',            'pipe the compiled JavaScript through JavaScript Lint']
    -  ['-m', '--map',             'generate source map and save as .map files']
    -  ['-n', '--nodes',           'print out the parse tree that the parser produces']
    -  [      '--nodejs [ARGS]',   'pass options directly to the "node" binary']
    -  ['-o', '--output [DIR]',    'set the output directory for compiled JavaScript']
    -  ['-p', '--print',           'print out the compiled JavaScript']
    -  ['-s', '--stdio',           'listen for and compile scripts over stdio']
    -  ['-t', '--tokens',          'print out the tokens that the lexer/rewriter produce']
    -  ['-v', '--version',         'display the version number']
    -  ['-w', '--watch',           'watch scripts for changes and rerun commands']
    -]

    Top-level objects shared by all the functions.

    opts         = {}
    -sources      = []
    -sourceCode   = []
    -notSources   = {}
    -watchers     = {}
    -optionParser = null

    Run coffee by parsing passed options and determining what action to take. + + + + + command.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      command.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      The coffee utility. Handles command-line compilation of CoffeeScript +into various forms: saved into .js files or printed to stdout +or recompiled every time the source is saved, +printed as a token stream or as the syntax tree, or launch an +interactive REPL. +

      + +
      + +
    • + + +
    • +
      + +
      + +
      +

      External dependencies. +

      + +
      + +
      fs             = require 'fs'
      +path           = require 'path'
      +helpers        = require './helpers'
      +optparse       = require './optparse'
      +CoffeeScript   = require './coffee-script'
      +{spawn, exec}  = require 'child_process'
      +{EventEmitter} = require 'events'
      +
      +exists         = fs.exists or path.exists
      +useWinPathSep  = path.sep is '\\'
      + +
    • + + +
    • +
      + +
      + +
      +

      Allow CoffeeScript to emit Node.js events. +

      + +
      + +
      helpers.extend CoffeeScript, new EventEmitter
      +
      +printLine = (line) -> process.stdout.write line + '\n'
      +printWarn = (line) -> process.stderr.write line + '\n'
      +
      +hidden = (file) -> /^\.|~$/.test file
      + +
    • + + +
    • +
      + +
      + +
      +

      The help banner that is printed when coffee is called without arguments. +

      + +
      + +
      BANNER = '''
      +  Usage: coffee [options] path/to/script.coffee -- [args]
      +
      +  If called without options, `coffee` will run your script.
      +'''
      + +
    • + + +
    • +
      + +
      + +
      +

      The list of all the valid option flags that coffee knows how to handle. +

      + +
      + +
      SWITCHES = [
      +  ['-b', '--bare',            'compile without a top-level function wrapper']
      +  ['-c', '--compile',         'compile to JavaScript and save as .js files']
      +  ['-e', '--eval',            'pass a string from the command line as input']
      +  ['-h', '--help',            'display this help message']
      +  ['-i', '--interactive',     'run an interactive CoffeeScript REPL']
      +  ['-j', '--join [FILE]',     'concatenate the source CoffeeScript before compiling']
      +  ['-m', '--map',             'generate source map and save as .map files']
      +  ['-n', '--nodes',           'print out the parse tree that the parser produces']
      +  [      '--nodejs [ARGS]',   'pass options directly to the "node" binary']
      +  ['-o', '--output [DIR]',    'set the output directory for compiled JavaScript']
      +  ['-p', '--print',           'print out the compiled JavaScript']
      +  ['-s', '--stdio',           'listen for and compile scripts over stdio']
      +  ['-l', '--literate',        'treat stdio as literate style coffee-script']
      +  ['-t', '--tokens',          'print out the tokens that the lexer/rewriter produce']
      +  ['-v', '--version',         'display the version number']
      +  ['-w', '--watch',           'watch scripts for changes and rerun commands']
      +]
      + +
    • + + +
    • +
      + +
      + +
      +

      Top-level objects shared by all the functions. +

      + +
      + +
      opts         = {}
      +sources      = []
      +sourceCode   = []
      +notSources   = {}
      +watchers     = {}
      +optionParser = null
      + +
    • + + +
    • +
      + +
      + +
      +

      Run coffee by parsing passed options and determining what action to take. Many flags cause us to divert before compiling anything. Flags passed after --- will be passed verbatim to your script as arguments in process.argv

    exports.run = ->
    -  parseOptions()
    -  return forkNode()                      if opts.nodejs
    -  return usage()                         if opts.help
    -  return version()                       if opts.version
    -  return require('./repl').start()       if opts.interactive
    -  if opts.watch and !fs.watch
    -    return printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}."
    -  return compileStdio()                  if opts.stdio
    -  return compileScript null, sources[0]  if opts.eval
    -  return require('./repl').start()       unless sources.length
    -  literals = if opts.run then sources.splice 1 else []
    -  process.argv = process.argv[0..1].concat literals
    -  process.argv[0] = 'coffee'
    -  for source in sources
    -    compilePath source, yes, path.normalize source

    Compile a path, which could be a script or a directory. If a directory -is passed, recursively compile all '.coffee', '.litcoffee', and '.coffee.md' -extension source files in it and all subdirectories.

    compilePath = (source, topLevel, base) ->
    -  fs.stat source, (err, stats) ->
    -    throw err if err and err.code isnt 'ENOENT'
    -    if err?.code is 'ENOENT'
    -      console.error "File not found: #{source}"
    -      process.exit 1
    -    if stats.isDirectory() and path.dirname(source) isnt 'node_modules'
    -      watchDir source, base if opts.watch
    -      fs.readdir source, (err, files) ->
    -        throw err if err and err.code isnt 'ENOENT'
    -        return if err?.code is 'ENOENT'
    -        index = sources.indexOf source
    -        files = files.filter (file) -> not hidden file
    -        sources[index..index] = (path.join source, file for file in files)
    -        sourceCode[index..index] = files.map -> null
    -        files.forEach (file) ->
    -          compilePath (path.join source, file), no, base
    -    else if topLevel or helpers.isCoffee source
    -      watch source, base if opts.watch
    -      fs.readFile source, (err, code) ->
    -        throw err if err and err.code isnt 'ENOENT'
    -        return if err?.code is 'ENOENT'
    -        compileScript(source, code.toString(), base)
    -    else
    -      notSources[source] = yes
    -      removeSource source, base

    Compile a single source script, containing the given code, according to the +-- will be passed verbatim to your script as arguments in process.argv +

    + + + +
    exports.run = ->
    +  parseOptions()
    +  return forkNode()                      if opts.nodejs
    +  return usage()                         if opts.help
    +  return version()                       if opts.version
    +  return require('./repl').start()       if opts.interactive
    +  if opts.watch and not fs.watch
    +    return printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}."
    +  return compileStdio()                  if opts.stdio
    +  return compileScript null, sources[0]  if opts.eval
    +  return require('./repl').start()       unless sources.length
    +  literals = if opts.run then sources.splice 1 else []
    +  process.argv = process.argv[0..1].concat literals
    +  process.argv[0] = 'coffee'
    +  for source in sources
    +    compilePath source, yes, path.normalize source
    + + + + +
  • +
    + +
    + +
    +

    Compile a path, which could be a script or a directory. If a directory +is passed, recursively compile all '.coffee', '.litcoffee', and '.coffee.md' +extension source files in it and all subdirectories. +

    + +
    + +
    compilePath = (source, topLevel, base) ->
    +  fs.stat source, (err, stats) ->
    +    throw err if err and err.code isnt 'ENOENT'
    +    if err?.code is 'ENOENT'
    +      console.error "File not found: #{source}"
    +      process.exit 1
    +    if stats.isDirectory() and path.dirname(source) isnt 'node_modules'
    +      watchDir source, base if opts.watch
    +      fs.readdir source, (err, files) ->
    +        throw err if err and err.code isnt 'ENOENT'
    +        return if err?.code is 'ENOENT'
    +        index = sources.indexOf source
    +        files = files.filter (file) -> not hidden file
    +        sources[index..index] = (path.join source, file for file in files)
    +        sourceCode[index..index] = files.map -> null
    +        files.forEach (file) ->
    +          compilePath (path.join source, file), no, base
    +    else if topLevel or helpers.isCoffee source
    +      watch source, base if opts.watch
    +      fs.readFile source, (err, code) ->
    +        throw err if err and err.code isnt 'ENOENT'
    +        return if err?.code is 'ENOENT'
    +        compileScript(source, code.toString(), base)
    +    else
    +      notSources[source] = yes
    +      removeSource source, base
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile a single source script, containing the given code, according to the requested options. If evaluating the script directly sets __filename, -__dirname and module.filename to be correct relative to the script's path.

  • compileScript = (file, input, base) ->
    -  o = opts
    -  options = compileOptions file
    -  try
    -    t = task = {file, input, options}
    -    CoffeeScript.emit 'compile', task
    -    if      o.tokens      then printTokens CoffeeScript.tokens t.input, t.options
    -    else if o.nodes       then printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
    -    else if o.run         then CoffeeScript.run t.input, t.options
    -    else if o.join and t.file isnt o.join
    -      sourceCode[sources.indexOf(t.file)] = t.input
    -      compileJoin()
    -    else
    -      compiled = CoffeeScript.compile t.input, t.options
    -      t.output = compiled
    -      if o.map
    -        t.output = compiled.js
    -        t.sourceMap = compiled.v3SourceMap
    -
    -      CoffeeScript.emit 'success', task
    -      if o.print
    -        printLine t.output.trim()
    -      else if o.compile || o.map
    -        writeJs base, t.file, t.output, t.sourceMap
    -      else if o.lint
    -        lint t.file, t.output
    -  catch err
    -    CoffeeScript.emit 'failure', err, task
    -    return if CoffeeScript.listeners('failure').length
    -    return printLine err.message + '\x07' if o.watch
    -    printWarn err instanceof Error and err.stack or "ERROR: #{err}"
    -    process.exit 1

    Attach the appropriate listeners to compile scripts incoming over stdin, -and write them back to stdout.

    compileStdio = ->
    -  code = ''
    -  stdin = process.openStdin()
    -  stdin.on 'data', (buffer) ->
    -    code += buffer.toString() if buffer
    -  stdin.on 'end', ->
    -    compileScript null, code

    If all of the source files are done being read, concatenate and compile -them together.

    joinTimeout = null
    -compileJoin = ->
    -  return unless opts.join
    -  unless sourceCode.some((code) -> code is null)
    -    clearTimeout joinTimeout
    -    joinTimeout = wait 100, ->
    -      compileScript opts.join, sourceCode.join('\n'), opts.join

    Watch a source CoffeeScript file using fs.watch, recompiling it every +__dirname and module.filename to be correct relative to the script's path. +

    + + + +
    compileScript = (file, input, base=null) ->
    +  o = opts
    +  options = compileOptions file, base
    +  try
    +    t = task = {file, input, options}
    +    CoffeeScript.emit 'compile', task
    +    if      o.tokens      then printTokens CoffeeScript.tokens t.input, t.options
    +    else if o.nodes       then printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
    +    else if o.run         then CoffeeScript.run t.input, t.options
    +    else if o.join and t.file isnt o.join
    +      t.input = helpers.invertLiterate t.input if helpers.isLiterate file
    +      sourceCode[sources.indexOf(t.file)] = t.input
    +      compileJoin()
    +    else
    +      compiled = CoffeeScript.compile t.input, t.options
    +      t.output = compiled
    +      if o.map
    +        t.output = compiled.js
    +        t.sourceMap = compiled.v3SourceMap
    +
    +      CoffeeScript.emit 'success', task
    +      if o.print
    +        printLine t.output.trim()
    +      else if o.compile or o.map
    +        writeJs base, t.file, t.output, options.jsPath, t.sourceMap
    +  catch err
    +    CoffeeScript.emit 'failure', err, task
    +    return if CoffeeScript.listeners('failure').length
    +    useColors = process.stdout.isTTY and not process.env.NODE_DISABLE_COLORS
    +    message = helpers.prettyErrorMessage err, file or '[stdin]', input, useColors
    +    if o.watch
    +      printLine message + '\x07'
    +    else
    +      printWarn message
    +      process.exit 1
    + + + + +
  • +
    + +
    + +
    +

    Attach the appropriate listeners to compile scripts incoming over stdin, +and write them back to stdout. +

    + +
    + +
    compileStdio = ->
    +  code = ''
    +  stdin = process.openStdin()
    +  stdin.on 'data', (buffer) ->
    +    code += buffer.toString() if buffer
    +  stdin.on 'end', ->
    +    compileScript null, code
    + +
  • + + +
  • +
    + +
    + +
    +

    If all of the source files are done being read, concatenate and compile +them together. +

    + +
    + +
    joinTimeout = null
    +compileJoin = ->
    +  return unless opts.join
    +  unless sourceCode.some((code) -> code is null)
    +    clearTimeout joinTimeout
    +    joinTimeout = wait 100, ->
    +      compileScript opts.join, sourceCode.join('\n'), opts.join
    + +
  • + + +
  • +
    + +
    + +
    +

    Watch a source CoffeeScript file using fs.watch, recompiling it every time the file is updated. May be used in combination with other options, -such as --lint or --print.

  • watch = (source, base) ->
    -
    -  prevStats = null
    -  compileTimeout = null
    -
    -  watchErr = (e) ->
    -    if e.code is 'ENOENT'
    -      return if sources.indexOf(source) is -1
    -      try
    -        rewatch()
    -        compile()
    -      catch e
    -        removeSource source, base, yes
    -        compileJoin()
    -    else throw e
    -
    -  compile = ->
    -    clearTimeout compileTimeout
    -    compileTimeout = wait 25, ->
    -      fs.stat source, (err, stats) ->
    -        return watchErr err if err
    -        return rewatch() if prevStats and stats.size is prevStats.size and
    -          stats.mtime.getTime() is prevStats.mtime.getTime()
    -        prevStats = stats
    -        fs.readFile source, (err, code) ->
    -          return watchErr err if err
    -          compileScript(source, code.toString(), base)
    -          rewatch()
    -
    -  try
    -    watcher = fs.watch source, compile
    -  catch e
    -    watchErr e
    -
    -  rewatch = ->
    -    watcher?.close()
    -    watcher = fs.watch source, compile

    Watch a directory of files for new additions.

    watchDir = (source, base) ->
    -  readdirTimeout = null
    -  try
    -    watcher = fs.watch source, ->
    -      clearTimeout readdirTimeout
    -      readdirTimeout = wait 25, ->
    -        fs.readdir source, (err, files) ->
    -          if err
    -            throw err unless err.code is 'ENOENT'
    -            watcher.close()
    -            return unwatchDir source, base
    -          for file in files when not hidden(file) and not notSources[file]
    -            file = path.join source, file
    -            continue if sources.some (s) -> s.indexOf(file) >= 0
    -            sources.push file
    -            sourceCode.push null
    -            compilePath file, no, base
    -  catch e
    -    throw e unless e.code is 'ENOENT'
    -
    -unwatchDir = (source, base) ->
    -  prevSources = sources[..]
    -  toRemove = (file for file in sources when file.indexOf(source) >= 0)
    -  removeSource file, base, yes for file in toRemove
    -  return unless sources.some (s, i) -> prevSources[i] isnt s
    -  compileJoin()

    Remove a file from our source list, and source code cache. Optionally remove -the compiled JS version as well.

    removeSource = (source, base, removeJs) ->
    -  index = sources.indexOf source
    -  sources.splice index, 1
    -  sourceCode.splice index, 1
    -  if removeJs and not opts.join
    -    jsPath = outputPath source, base
    -    exists jsPath, (itExists) ->
    -      if itExists
    -        fs.unlink jsPath, (err) ->
    -          throw err if err and err.code isnt 'ENOENT'
    -          timeLog "removed #{source}"

    Get the corresponding output JavaScript path for a source file.

    outputPath = (source, base, extension=".js") ->
    -  basename  = helpers.baseFileName source, yes
    -  srcDir    = path.dirname source
    -  baseDir   = if base is '.' then srcDir else srcDir.substring base.length
    -  dir       = if opts.output then path.join opts.output, baseDir else srcDir
    -  path.join dir, basename + extension

    Write out a JavaScript source file with the compiled code. By default, files +such as --print. +

    + + + +
    watch = (source, base) ->
    +
    +  prevStats = null
    +  compileTimeout = null
    +
    +  watchErr = (e) ->
    +    if e.code is 'ENOENT'
    +      return if sources.indexOf(source) is -1
    +      try
    +        rewatch()
    +        compile()
    +      catch e
    +        removeSource source, base, yes
    +        compileJoin()
    +    else throw e
    +
    +  compile = ->
    +    clearTimeout compileTimeout
    +    compileTimeout = wait 25, ->
    +      fs.stat source, (err, stats) ->
    +        return watchErr err if err
    +        return rewatch() if prevStats and stats.size is prevStats.size and
    +          stats.mtime.getTime() is prevStats.mtime.getTime()
    +        prevStats = stats
    +        fs.readFile source, (err, code) ->
    +          return watchErr err if err
    +          compileScript(source, code.toString(), base)
    +          rewatch()
    +
    +  try
    +    watcher = fs.watch source, compile
    +  catch e
    +    watchErr e
    +
    +  rewatch = ->
    +    watcher?.close()
    +    watcher = fs.watch source, compile
    + + + + +
  • +
    + +
    + +
    +

    Watch a directory of files for new additions. +

    + +
    + +
    watchDir = (source, base) ->
    +  readdirTimeout = null
    +  try
    +    watcher = fs.watch source, ->
    +      clearTimeout readdirTimeout
    +      readdirTimeout = wait 25, ->
    +        fs.readdir source, (err, files) ->
    +          if err
    +            throw err unless err.code is 'ENOENT'
    +            watcher.close()
    +            return unwatchDir source, base
    +          for file in files when not hidden(file) and not notSources[file]
    +            file = path.join source, file
    +            continue if sources.some (s) -> s.indexOf(file) >= 0
    +            sources.push file
    +            sourceCode.push null
    +            compilePath file, no, base
    +  catch e
    +    throw e unless e.code is 'ENOENT'
    +
    +unwatchDir = (source, base) ->
    +  prevSources = sources[..]
    +  toRemove = (file for file in sources when file.indexOf(source) >= 0)
    +  removeSource file, base, yes for file in toRemove
    +  return unless sources.some (s, i) -> prevSources[i] isnt s
    +  compileJoin()
    + +
  • + + +
  • +
    + +
    + +
    +

    Remove a file from our source list, and source code cache. Optionally remove +the compiled JS version as well. +

    + +
    + +
    removeSource = (source, base, removeJs) ->
    +  index = sources.indexOf source
    +  sources.splice index, 1
    +  sourceCode.splice index, 1
    +  if removeJs and not opts.join
    +    jsPath = outputPath source, base
    +    exists jsPath, (itExists) ->
    +      if itExists
    +        fs.unlink jsPath, (err) ->
    +          throw err if err and err.code isnt 'ENOENT'
    +          timeLog "removed #{source}"
    + +
  • + + +
  • +
    + +
    + +
    +

    Get the corresponding output JavaScript path for a source file. +

    + +
    + +
    outputPath = (source, base, extension=".js") ->
    +  basename  = helpers.baseFileName source, yes, useWinPathSep
    +  srcDir    = path.dirname source
    +  baseDir   = if base is '.' then srcDir else srcDir.substring base.length
    +  dir       = if opts.output then path.join opts.output, baseDir else srcDir
    +  path.join dir, basename + extension
    + +
  • + + +
  • +
    + +
    + +
    +

    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.

    +directory can be customized with --output. +

    If generatedSourceMap is provided, this will write a .map file into the -same directory as the .js file.

  • writeJs = (base, sourcePath, js, generatedSourceMap = null) ->
    -  jsPath = outputPath sourcePath, base
    -  sourceMapPath = outputPath sourcePath, base, ".map"
    -  jsDir  = path.dirname jsPath
    -  compile = ->
    -    if opts.compile
    -      js = ' ' if js.length <= 0
    -      if generatedSourceMap then js = "//@ sourceMappingURL=#{helpers.baseFileName sourceMapPath}\n#{js}"
    -      fs.writeFile jsPath, js, (err) ->
    -        if err
    -          printLine err.message
    -        else if opts.compile and opts.watch
    -          timeLog "compiled #{sourcePath}"
    -    if generatedSourceMap
    -      fs.writeFile sourceMapPath, generatedSourceMap, (err) ->
    -        if err
    -          printLine "Could not write source map: #{err.message}"
    -  exists jsDir, (itExists) ->
    -    if itExists then compile() else exec "mkdir -p #{jsDir}", compile

    Convenience for cleaner setTimeouts.

    wait = (milliseconds, func) -> setTimeout func, milliseconds

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

    timeLog = (message) ->
    -  console.log "#{(new Date).toLocaleTimeString()} - #{message}"

    Pipe compiled JS through JSLint (requires a working jsl command), printing -any errors or warnings that arise.

    lint = (file, js) ->
    -  printIt = (buffer) -> printLine file + ':\t' + buffer.toString().trim()
    -  conf = __dirname + '/../../extras/jsl.conf'
    -  jsl = spawn 'jsl', ['-nologo', '-stdin', '-conf', conf]
    -  jsl.stdout.on 'data', printIt
    -  jsl.stderr.on 'data', printIt
    -  jsl.stdin.write js
    -  jsl.stdin.end()

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

    printTokens = (tokens) ->
    -  strings = for token in tokens
    -    tag = token[0]
    -    value = token[1].toString().replace(/\n/, '\\n')
    -    "[#{tag} #{value}]"
    -  printLine strings.join(' ')

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

    parseOptions = ->
    -  optionParser  = new optparse.OptionParser SWITCHES, BANNER
    -  o = opts      = optionParser.parse process.argv[2..]
    -  o.compile     or=  !!o.output
    -  o.run         = not (o.compile or o.print or o.lint or o.map)
    -  o.print       = !!  (o.print or (o.eval or o.stdio and o.compile))
    -  sources       = o.arguments
    -  sourceCode[i] = null for source, i in sources
    -  return

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

    compileOptions = (filename) ->
    -  {
    -    filename
    -    literate: helpers.isLiterate(filename)
    -    bare: opts.bare
    -    header: opts.compile
    -    sourceMap: opts.map
    -  }

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

    forkNode = ->
    -  nodeArgs = opts.nodejs.split /\s+/
    -  args     = process.argv[1..]
    -  args.splice args.indexOf('--nodejs'), 2
    -  spawn process.execPath, nodeArgs.concat(args),
    -    cwd:        process.cwd()
    -    env:        process.env
    -    customFds:  [0, 1, 2]

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

    usage = ->
    -  printLine (new optparse.OptionParser SWITCHES, BANNER).help()

    Print the --version message and exit.

    version = ->
    -  printLine "CoffeeScript version #{CoffeeScript.VERSION}"
    -
    -
    \ No newline at end of file +same directory as the .js file. +

    + + + +
    writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
    +  sourceMapPath = outputPath sourcePath, base, ".map"
    +  jsDir  = path.dirname jsPath
    +  compile = ->
    +    if opts.compile
    +      js = ' ' if js.length <= 0
    +      if generatedSourceMap then js = "#{js}\n/*\n//@ sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n*/\n"
    +      fs.writeFile jsPath, js, (err) ->
    +        if err
    +          printLine err.message
    +        else if opts.compile and opts.watch
    +          timeLog "compiled #{sourcePath}"
    +    if generatedSourceMap
    +      fs.writeFile sourceMapPath, generatedSourceMap, (err) ->
    +        if err
    +          printLine "Could not write source map: #{err.message}"
    +  exists jsDir, (itExists) ->
    +    if itExists then compile() else exec "mkdir -p #{jsDir}", compile
    + + + + +
  • +
    + +
    + +
    +

    Convenience for cleaner setTimeouts. +

    + +
    + +
    wait = (milliseconds, func) -> setTimeout func, milliseconds
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    timeLog = (message) ->
    +  console.log "#{(new Date).toLocaleTimeString()} - #{message}"
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    printTokens = (tokens) ->
    +  strings = for token in tokens
    +    tag = token[0]
    +    value = token[1].toString().replace(/\n/, '\\n')
    +    "[#{tag} #{value}]"
    +  printLine strings.join(' ')
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    parseOptions = ->
    +  optionParser  = new optparse.OptionParser SWITCHES, BANNER
    +  o = opts      = optionParser.parse process.argv[2..]
    +  o.compile     or=  !!o.output
    +  o.run         = not (o.compile or o.print or o.map)
    +  o.print       = !!  (o.print or (o.eval or o.stdio and o.compile))
    +  sources       = o.arguments
    +  sourceCode[i] = null for source, i in sources
    +  return
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    compileOptions = (filename, base) ->
    +  answer = {
    +    filename
    +    literate: opts.literate or helpers.isLiterate(filename)
    +    bare: opts.bare
    +    header: opts.compile
    +    sourceMap: opts.map
    +  }
    +  if filename
    +    if base
    +      cwd = process.cwd()
    +      jsPath = outputPath filename, base
    +      jsDir = path.dirname jsPath
    +      answer = helpers.merge answer, {
    +        jsPath
    +        sourceRoot: path.relative jsDir, cwd
    +        sourceFiles: [path.relative cwd, filename]
    +        generatedFile: helpers.baseFileName(jsPath, no, useWinPathSep)
    +      }
    +    else
    +      answer = helpers.merge answer,
    +        sourceRoot: ""
    +        sourceFiles: [helpers.baseFileName filename, no, useWinPathSep]
    +        generatedFile: helpers.baseFileName(filename, yes, useWinPathSep) + ".js"
    +  answer
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    forkNode = ->
    +  nodeArgs = opts.nodejs.split /\s+/
    +  args     = process.argv[1..]
    +  args.splice args.indexOf('--nodejs'), 2
    +  spawn process.execPath, nodeArgs.concat(args),
    +    cwd:        process.cwd()
    +    env:        process.env
    +    customFds:  [0, 1, 2]
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    usage = ->
    +  printLine (new optparse.OptionParser SWITCHES, BANNER).help()
    + +
  • + + +
  • +
    + +
    + +
    +

    Print the --version message and exit. +

    + +
    + +
    version = ->
    +  printLine "CoffeeScript version #{CoffeeScript.VERSION}"
    + +
  • + + + + + diff --git a/documentation/docs/docco.css b/documentation/docs/docco.css index 04cc7ecb8a..714cfb9974 100644 --- a/documentation/docs/docco.css +++ b/documentation/docs/docco.css @@ -1,192 +1,509 @@ -/*--------------------- Layout and Typography ----------------------------*/ +/*--------------------- Typography ----------------------------*/ + +@font-face { + font-family: 'aller-light'; + src: url('public/fonts/aller-light.eot'); + src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'), + url('public/fonts/aller-light.woff') format('woff'), + url('public/fonts/aller-light.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'aller-bold'; + src: url('public/fonts/aller-bold.eot'); + src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'), + url('public/fonts/aller-bold.woff') format('woff'), + url('public/fonts/aller-bold.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'novecento-bold'; + src: url('public/fonts/novecento-bold.eot'); + src: url('public/fonts/novecento-bold.eot?#iefix') format('embedded-opentype'), + url('public/fonts/novecento-bold.woff') format('woff'), + url('public/fonts/novecento-bold.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +/*--------------------- Layout ----------------------------*/ +html { height: 100%; } body { - font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - color: #252519; + font-family: "aller-light"; + font-size: 14px; + line-height: 18px; + color: #30404f; margin: 0; padding: 0; + height:100%; } +#container { min-height: 100%; } + a { - color: #261a3b; + color: #000; } - a:visited { - color: #261a3b; - } + +b, strong { + font-weight: normal; + font-family: "aller-bold"; +} + p { - margin: 0 0 15px 0; + margin: 15px 0 0px; } + .annotation ul, .annotation ol { + margin: 25px 0; + } + .annotation ul li, .annotation ol li { + font-size: 14px; + line-height: 18px; + margin: 10px 0; + } + h1, h2, h3, h4, h5, h6 { - margin: 0px 0 15px 0; + color: #112233; + line-height: 1em; + font-weight: normal; + font-family: "novecento-bold"; + text-transform: uppercase; + margin: 30px 0 15px 0; } - h1 { - margin-top: 40px; - } + +h1 { + margin-top: 40px; +} + hr { - border: 0 none; - border-top: 1px solid #e5e5ee; - height: 1px; - margin: 20px 0; + border: 0; + background: 1px solid #ddd; + height: 1px; + margin: 20px 0; } -#container { - position: relative; + +pre, tt, code { + font-size: 12px; line-height: 16px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; } -#background { - position: fixed; - top: 0; left: 525px; right: 0; bottom: 0; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - z-index: -1; + .annotation pre { + display: block; + margin: 0; + padding: 7px 10px; + background: #fcfcfc; + -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + overflow-x: auto; + } + .annotation pre code { + border: 0; + padding: 0; + background: transparent; + } + + +blockquote { + border-left: 5px solid #ccc; + margin: 0; + padding: 1px 0 1px 1em; +} + .sections blockquote p { + font-family: Menlo, Consolas, Monaco, monospace; + font-size: 12px; line-height: 16px; + color: #999; + margin: 10px 0 0; + white-space: pre-wrap; + } + +ul.sections { + list-style: none; + padding:0 0 5px 0;; + margin:0; } + +/* + Force border-box so that % widths fit the parent + container without overlap because of margin/padding. + + More Info : http://www.quirksmode.org/css/box.html +*/ +ul.sections > li > div { + -moz-box-sizing: border-box; /* firefox */ + -ms-box-sizing: border-box; /* ie */ + -webkit-box-sizing: border-box; /* webkit */ + -khtml-box-sizing: border-box; /* konqueror */ + box-sizing: border-box; /* css3 */ +} + + +/*---------------------- Jump Page -----------------------------*/ #jump_to, #jump_page { + margin: 0; background: white; -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; - font: 10px Arial; - text-transform: uppercase; + font: 16px Arial; cursor: pointer; text-align: right; + list-style: none; +} + +#jump_to a { + text-decoration: none; +} + +#jump_to a.large { + display: none; +} +#jump_to a.small { + font-size: 22px; + font-weight: bold; + color: #676767; } + #jump_to, #jump_wrapper { position: fixed; right: 0; top: 0; - padding: 5px 10px; + padding: 10px 15px; + margin:0; +} + +#jump_wrapper { + display: none; + padding:0; +} + +#jump_to:hover #jump_wrapper { + display: block; +} + +#jump_page { + padding: 5px 0 3px; + margin: 0 0 25px 25px; +} + +#jump_page .source { + display: block; + padding: 15px; + text-decoration: none; + border-top: 1px solid #eee; } + +#jump_page .source:hover { + background: #f5f5ff; +} + +#jump_page .source:first-child { +} + +/*---------------------- Low resolutions (> 320px) ---------------------*/ +@media only screen and (min-width: 320px) { + .pilwrap { display: none; } + + ul.sections > li > div { + display: block; + padding:5px 10px 0 10px; + } + + ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { + padding-left: 30px; + } + + ul.sections > li > div.content { + background: #f5f5ff; + overflow-x:auto; + -webkit-box-shadow: inset 0 0 5px #e5e5ee; + box-shadow: inset 0 0 5px #e5e5ee; + border: 1px solid #dedede; + margin:5px 10px 5px 10px; + padding-bottom: 5px; + } + + ul.sections > li > div.annotation pre { + margin: 7px 0 7px; + padding-left: 15px; + } + + ul.sections > li > div.annotation p tt, .annotation code { + background: #f8f8ff; + border: 1px solid #dedede; + font-size: 12px; + padding: 0 0.2em; + } +} + +/*---------------------- (> 481px) ---------------------*/ +@media only screen and (min-width: 481px) { + #container { + position: relative; + } + body { + background-color: #F5F5FF; + font-size: 15px; + line-height: 21px; + } + pre, tt, code { + line-height: 18px; + } + p, ul, ol { + margin: 0 0 15px; + } + + + #jump_to { + padding: 5px 10px; + } #jump_wrapper { padding: 0; + } + #jump_to, #jump_page { + font: 10px Arial; + text-transform: uppercase; + } + #jump_page .source { + padding: 5px 10px; + } + #jump_to a.large { + display: inline-block; + } + #jump_to a.small { display: none; } - #jump_to:hover #jump_wrapper { - display: block; - } - #jump_page { - padding: 5px 0 3px; - margin: 0 0 25px 25px; - } - #jump_page .source { - display: block; - padding: 5px 10px; - text-decoration: none; - border-top: 1px solid #eee; - } - #jump_page .source:hover { - background: #f5f5ff; - } - #jump_page .source:first-child { - } -table td { - border: 0; - outline: 0; -} - td.docs, th.docs { - max-width: 450px; - min-width: 450px; + + + + #background { + position: absolute; + top: 0; bottom: 0; + width: 350px; + background: #fff; + border-right: 1px solid #e5e5ee; + z-index: -1; + } + + ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { + padding-left: 40px; + } + + ul.sections > li { + white-space: nowrap; + } + + ul.sections > li > div { + display: inline-block; + } + + ul.sections > li > div.annotation { + max-width: 350px; + min-width: 350px; min-height: 5px; - padding: 10px 25px 1px 50px; + padding: 13px; overflow-x: hidden; + white-space: normal; vertical-align: top; text-align: left; } - .docs pre { - margin: 15px 0 15px; - padding-left: 15px; - } - .docs p tt, .docs p code { - background: #f8f8ff; - border: 1px solid #dedede; - font-size: 12px; - padding: 0 0.2em; - } - .pilwrap { - position: relative; - } - .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - } - td.docs:hover .pilcrow { - opacity: 1; - } - td.code, th.code { - padding: 14px 15px 16px 25px; - width: 100%; + ul.sections > li > div.annotation pre { + margin: 15px 0 15px; + padding-left: 15px; + } + + ul.sections > li > div.content { + padding: 13px; vertical-align: top; background: #f5f5ff; - border-left: 1px solid #e5e5ee; + border: none; + -webkit-box-shadow: none; + box-shadow: none; } - pre, tt, code { - font-size: 12px; line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; + + .pilwrap { + position: relative; + display: inline; + } + + .pilcrow { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + top: 3px; left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + } + .for-h1 .pilcrow { + top: 47px; + } + .for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow { + top: 35px; } + ul.sections > li > div.annotation:hover .pilcrow { + opacity: 1; + } +} + +/*---------------------- (> 1025px) ---------------------*/ +@media only screen and (min-width: 1025px) { + + body { + font-size: 16px; + line-height: 24px; + } + + #background { + width: 525px; + } + ul.sections > li > div.annotation { + max-width: 525px; + min-width: 525px; + padding: 10px 25px 1px 50px; + } + ul.sections > li > div.content { + padding: 9px 15px 16px 25px; + } +} /*---------------------- Syntax Highlighting -----------------------------*/ + td.linenos { background-color: #f0f0f0; padding-right: 10px; } span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } -body .hll { background-color: #ffffcc } -body .c { color: #408080; font-style: italic } /* Comment */ -body .err { border: 1px solid #FF0000 } /* Error */ -body .k { color: #954121 } /* Keyword */ -body .o { color: #666666 } /* Operator */ -body .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -body .cp { color: #BC7A00 } /* Comment.Preproc */ -body .c1 { color: #408080; font-style: italic } /* Comment.Single */ -body .cs { color: #408080; font-style: italic } /* Comment.Special */ -body .gd { color: #A00000 } /* Generic.Deleted */ -body .ge { font-style: italic } /* Generic.Emph */ -body .gr { color: #FF0000 } /* Generic.Error */ -body .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -body .gi { color: #00A000 } /* Generic.Inserted */ -body .go { color: #808080 } /* Generic.Output */ -body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -body .gs { font-weight: bold } /* Generic.Strong */ -body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -body .gt { color: #0040D0 } /* Generic.Traceback */ -body .kc { color: #954121 } /* Keyword.Constant */ -body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */ -body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */ -body .kp { color: #954121 } /* Keyword.Pseudo */ -body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */ -body .kt { color: #B00040 } /* Keyword.Type */ -body .m { color: #666666 } /* Literal.Number */ -body .s { color: #219161 } /* Literal.String */ -body .na { color: #7D9029 } /* Name.Attribute */ -body .nb { color: #954121 } /* Name.Builtin */ -body .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -body .no { color: #880000 } /* Name.Constant */ -body .nd { color: #AA22FF } /* Name.Decorator */ -body .ni { color: #999999; font-weight: bold } /* Name.Entity */ -body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -body .nf { color: #0000FF } /* Name.Function */ -body .nl { color: #A0A000 } /* Name.Label */ -body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -body .nt { color: #954121; font-weight: bold } /* Name.Tag */ -body .nv { color: #19469D } /* Name.Variable */ -body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -body .w { color: #bbbbbb } /* Text.Whitespace */ -body .mf { color: #666666 } /* Literal.Number.Float */ -body .mh { color: #666666 } /* Literal.Number.Hex */ -body .mi { color: #666666 } /* Literal.Number.Integer */ -body .mo { color: #666666 } /* Literal.Number.Oct */ -body .sb { color: #219161 } /* Literal.String.Backtick */ -body .sc { color: #219161 } /* Literal.String.Char */ -body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */ -body .s2 { color: #219161 } /* Literal.String.Double */ -body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -body .sh { color: #219161 } /* Literal.String.Heredoc */ -body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -body .sx { color: #954121 } /* Literal.String.Other */ -body .sr { color: #BB6688 } /* Literal.String.Regex */ -body .s1 { color: #219161 } /* Literal.String.Single */ -body .ss { color: #19469D } /* Literal.String.Symbol */ -body .bp { color: #954121 } /* Name.Builtin.Pseudo */ -body .vc { color: #19469D } /* Name.Variable.Class */ -body .vg { color: #19469D } /* Name.Variable.Global */ -body .vi { color: #19469D } /* Name.Variable.Instance */ -body .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file +/* + +github.com style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #408080; + font-style: italic +} + +pre .keyword, +pre .assignment, +pre .literal, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title, +pre .subst, +pre .reserved { + color: #954121; + /*font-weight: bold*/ +} + +pre .number, +pre .hexcolor { + color: #40a070 +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #219161; +} + +pre .title, +pre .id { + color: #19469D; +} +pre .params { + color: #00F; +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .label, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #B68 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .constructor, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} diff --git a/documentation/docs/grammar.html b/documentation/docs/grammar.html index 8e795ca0cc..021c361a42 100644 --- a/documentation/docs/grammar.html +++ b/documentation/docs/grammar.html @@ -1,4 +1,114 @@ - grammar.coffee

    grammar.coffee

    The CoffeeScript parser is generated by Jison + + + + + grammar.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      grammar.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      The CoffeeScript parser is generated by Jison from this grammar file. Jison is a bottom-up parser generator, similar in style to Bison, implemented in JavaScript. It can recognize LALR(1), LR(0), SLR(1), and LR(1) @@ -9,413 +119,1544 @@ attempts to match the token sequence against the rules below. When a match can be made, it reduces into the nonterminal -(the enclosing name at the top), and we proceed from there.

      +(the enclosing name at the top), and we proceed from there. +

      If you run the cake build:parser command, Jison constructs a parse table -from our rules and saves it into lib/parser.js.

    The only dependency is on the Jison.Parser.

    {Parser} = require 'jison'

    Jison DSL

    Since we're going to be wrapped in a function by Jison in any case, if our +from our rules and saves it into lib/parser.js. +

    + + + + + + +
  • +
    + +
    + +
    +

    The only dependency is on the Jison.Parser. +

    + +
    + +
    {Parser} = require 'jison'
    + +
  • + + +
  • +
    + +
    + +
    +

    Jison DSL

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Since we're going to be wrapped in a function by Jison in any case, if our action immediately returns a value, we can optimize by removing the function -wrapper and just returning the value directly.

  • unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/

    Our handy DSL for Jison grammar generation, thanks to +wrapper and just returning the value directly. +

    + + + +
    unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/
    + + + + +
  • +
    + +
    + +
    +

    Our handy DSL for Jison grammar generation, thanks to Tim Caswell. For every rule in the grammar, we pass the pattern-defining string, the action to run, and extra options, optionally. If no action is specified, we simply pass the value of the -previous nonterminal.

  • o = (patternString, action, options) ->
    -  patternString = patternString.replace /\s{2,}/g, ' '
    -  patternCount = patternString.split(' ').length
    -  return [patternString, '$$ = $1;', options] unless action
    -  action = if match = unwrap.exec action then match[1] else "(#{action}())"

    All runtime functions we need are defined on "yy"

      action = action.replace /\bnew /g, '$&yy.'
    -  action = action.replace /\b(?:Block\.wrap|extend)\b/g, 'yy.$&'

    Returns a function which adds location data to the first parameter passed +previous nonterminal. +

    + + + +
    o = (patternString, action, options) ->
    +  patternString = patternString.replace /\s{2,}/g, ' '
    +  patternCount = patternString.split(' ').length
    +  return [patternString, '$$ = $1;', options] unless action
    +  action = if match = unwrap.exec action then match[1] else "(#{action}())"
    + + + + +
  • +
    + +
    + +
    +

    All runtime functions we need are defined on "yy" +

    + +
    + +
      action = action.replace /\bnew /g, '$&yy.'
    +  action = action.replace /\b(?:Block\.wrap|extend)\b/g, 'yy.$&'
    + +
  • + + +
  • +
    + +
    + +
    +

    Returns a function which adds location data to the first parameter passed in, and returns the parameter. If the parameter is not a node, it will -just be passed through unaffected.

  •   addLocationDataFn = (first, last) ->
    -    if not last
    -      "yy.addLocationDataFn(@#{first})"
    -    else
    -      "yy.addLocationDataFn(@#{first}, @#{last})"
    +just be passed through unaffected.
    +

    - action = action.replace /LOC\(([0-9]*)\)/g, addLocationDataFn('$1') - action = action.replace /LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2') +
    + +
      addLocationDataFn = (first, last) ->
    +    if not last
    +      "yy.addLocationDataFn(@#{first})"
    +    else
    +      "yy.addLocationDataFn(@#{first}, @#{last})"
     
    -  [patternString, "$$ = #{addLocationDataFn(1, patternCount)}(#{action});", options]

    Grammatical Rules

    In all of the rules that follow, you'll see the name of the nonterminal as -the key to a list of alternative matches. With each match's action, the -dollar-sign variables are provided by Jison as references to the value of -their numeric position, so in this rule:

    + action = action.replace /LOC\(([0-9]*)\)/g, addLocationDataFn('$1') + action = action.replace /LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2') -
    "Expression UNLESS Expression"
    -
    + [patternString, "$$ = #{addLocationDataFn(1, patternCount)}(#{action});", options] + + + + +
  • +
    + +
    + +
    +

    Grammatical Rules

    +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    In all of the rules that follow, you'll see the name of the nonterminal as +the key to a list of alternative matches. With each match's action, the +dollar-sign variables are provided by Jison as references to the value of +their numeric position, so in this rule: + +

    +
    "Expression UNLESS Expression"

    $1 would be the value of the first Expression, $2 would be the token for the UNLESS terminal, and $3 would be the value of the second -Expression.

  • grammar =

    The Root is the top-level node in the syntax tree. Since we parse bottom-up, -all parsing must end here.

      Root: [
    -    o '',                                       -> new Block
    -    o 'Body'
    -    o 'Block TERMINATOR'
    -  ]

    Any list of statements and expressions, separated by line breaks or semicolons.

      Body: [
    -    o 'Line',                                   -> Block.wrap [$1]
    -    o 'Body TERMINATOR Line',                   -> $1.push $3
    -    o 'Body TERMINATOR'
    -  ]

    Block and statements, which make up a line in a body.

      Line: [
    -    o 'Expression'
    -    o 'Statement'
    -  ]

    Pure statements which cannot be expressions.

      Statement: [
    -    o 'Return'
    -    o 'Comment'
    -    o 'STATEMENT',                              -> new Literal $1
    -  ]

    All the different types of expressions in our language. The basic unit of +Expression. +

    + + + +
    grammar =
    + + + + +
  • +
    + +
    + +
    +

    The Root is the top-level node in the syntax tree. Since we parse bottom-up, +all parsing must end here. +

    + +
    + +
      Root: [
    +    o '',                                       -> new Block
    +    o 'Body'
    +    o 'Block TERMINATOR'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Any list of statements and expressions, separated by line breaks or semicolons. +

    + +
    + +
      Body: [
    +    o 'Line',                                   -> Block.wrap [$1]
    +    o 'Body TERMINATOR Line',                   -> $1.push $3
    +    o 'Body TERMINATOR'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Block and statements, which make up a line in a body. +

    + +
    + +
      Line: [
    +    o 'Expression'
    +    o 'Statement'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Pure statements which cannot be expressions. +

    + +
    + +
      Statement: [
    +    o 'Return'
    +    o 'Comment'
    +    o 'STATEMENT',                              -> new Literal $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    All the different types of expressions in our language. The basic unit of CoffeeScript is the Expression -- everything that can be an expression is one. Blocks serve as the building blocks of many other rules, making -them somewhat circular.

  •   Expression: [
    -    o 'Value'
    -    o 'Invocation'
    -    o 'Code'
    -    o 'Operation'
    -    o 'Assign'
    -    o 'If'
    -    o 'Try'
    -    o 'While'
    -    o 'For'
    -    o 'Switch'
    -    o 'Class'
    -    o 'Throw'
    -  ]

    An indented block of expressions. Note that the Rewriter +them somewhat circular. +

    + + + +
      Expression: [
    +    o 'Value'
    +    o 'Invocation'
    +    o 'Code'
    +    o 'Operation'
    +    o 'Assign'
    +    o 'If'
    +    o 'Try'
    +    o 'While'
    +    o 'For'
    +    o 'Switch'
    +    o 'Class'
    +    o 'Throw'
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    An indented block of expressions. Note that the Rewriter will convert some postfix forms into blocks for us, by adjusting the -token stream.

  •   Block: [
    -    o 'INDENT OUTDENT',                         -> new Block
    -    o 'INDENT Body OUTDENT',                    -> $2
    -  ]

    A literal identifier, a variable name or property.

      Identifier: [
    -    o 'IDENTIFIER',                             -> new Literal $1
    -  ]

    Alphanumerics are separated from the other Literal matchers because -they can also serve as keys in object literals.

      AlphaNumeric: [
    -    o 'NUMBER',                                 -> new Literal $1
    -    o 'STRING',                                 -> new Literal $1
    -  ]

    All of our immediate values. Generally these can be passed straight -through and printed to JavaScript.

      Literal: [
    -    o 'AlphaNumeric'
    -    o 'JS',                                     -> new Literal $1
    -    o 'REGEX',                                  -> new Literal $1
    -    o 'DEBUGGER',                               -> new Literal $1
    -    o 'UNDEFINED',                              -> new Undefined
    -    o 'NULL',                                   -> new Null
    -    o 'BOOL',                                   -> new Bool $1
    -  ]

    Assignment of a variable, property, or index to a value.

      Assign: [
    -    o 'Assignable = Expression',                -> new Assign $1, $3
    -    o 'Assignable = TERMINATOR Expression',     -> new Assign $1, $4
    -    o 'Assignable = INDENT Expression OUTDENT', -> new Assign $1, $4
    -  ]

    Assignment when it happens within an object literal. The difference from -the ordinary Assign is that these allow numbers and strings as keys.

      AssignObj: [
    -    o 'ObjAssignable',                          -> new Value $1
    -    o 'ObjAssignable : Expression',             -> new Assign LOC(1)(new Value($1)), $3, 'object'
    -    o 'ObjAssignable :
    -       INDENT Expression OUTDENT',              -> new Assign LOC(1)(new Value($1)), $4, 'object'
    -    o 'Comment'
    -  ]
    -
    -  ObjAssignable: [
    -    o 'Identifier'
    -    o 'AlphaNumeric'
    -    o 'ThisProperty'
    -  ]

    A return statement from a function body.

      Return: [
    -    o 'RETURN Expression',                      -> new Return $2
    -    o 'RETURN',                                 -> new Return
    -  ]

    A block comment.

      Comment: [
    -    o 'HERECOMMENT',                            -> new Comment $1
    -  ]

    The Code node is the function literal. It's defined by an indented block +token stream. +

    + + + +
      Block: [
    +    o 'INDENT OUTDENT',                         -> new Block
    +    o 'INDENT Body OUTDENT',                    -> $2
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    A literal identifier, a variable name or property. +

    + +
    + +
      Identifier: [
    +    o 'IDENTIFIER',                             -> new Literal $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Alphanumerics are separated from the other Literal matchers because +they can also serve as keys in object literals. +

    + +
    + +
      AlphaNumeric: [
    +    o 'NUMBER',                                 -> new Literal $1
    +    o 'STRING',                                 -> new Literal $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    All of our immediate values. Generally these can be passed straight +through and printed to JavaScript. +

    + +
    + +
      Literal: [
    +    o 'AlphaNumeric'
    +    o 'JS',                                     -> new Literal $1
    +    o 'REGEX',                                  -> new Literal $1
    +    o 'DEBUGGER',                               -> new Literal $1
    +    o 'UNDEFINED',                              -> new Undefined
    +    o 'NULL',                                   -> new Null
    +    o 'BOOL',                                   -> new Bool $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Assignment of a variable, property, or index to a value. +

    + +
    + +
      Assign: [
    +    o 'Assignable = Expression',                -> new Assign $1, $3
    +    o 'Assignable = TERMINATOR Expression',     -> new Assign $1, $4
    +    o 'Assignable = INDENT Expression OUTDENT', -> new Assign $1, $4
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Assignment when it happens within an object literal. The difference from +the ordinary Assign is that these allow numbers and strings as keys. +

    + +
    + +
      AssignObj: [
    +    o 'ObjAssignable',                          -> new Value $1
    +    o 'ObjAssignable : Expression',             -> new Assign LOC(1)(new Value($1)), $3, 'object'
    +    o 'ObjAssignable :
    +       INDENT Expression OUTDENT',              -> new Assign LOC(1)(new Value($1)), $4, 'object'
    +    o 'Comment'
    +  ]
    +
    +  ObjAssignable: [
    +    o 'Identifier'
    +    o 'AlphaNumeric'
    +    o 'ThisProperty'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A return statement from a function body. +

    + +
    + +
      Return: [
    +    o 'RETURN Expression',                      -> new Return $2
    +    o 'RETURN',                                 -> new Return
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A block comment. +

    + +
    + +
      Comment: [
    +    o 'HERECOMMENT',                            -> new Comment $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The Code node is the function literal. It's defined by an indented block of Block preceded by a function arrow, with an optional parameter -list.

  •   Code: [
    -    o 'PARAM_START ParamList PARAM_END FuncGlyph Block', -> new Code $2, $5, $4
    -    o 'FuncGlyph Block',                        -> new Code [], $2, $1
    -  ]

    CoffeeScript has two different symbols for functions. -> is for ordinary -functions, and => is for functions bound to the current value of this.

      FuncGlyph: [
    -    o '->',                                     -> 'func'
    -    o '=>',                                     -> 'boundfunc'
    -  ]

    An optional, trailing comma.

      OptComma: [
    -    o ''
    -    o ','
    -  ]

    The list of parameters that a function accepts can be of any length.

      ParamList: [
    -    o '',                                       -> []
    -    o 'Param',                                  -> [$1]
    -    o 'ParamList , Param',                      -> $1.concat $3
    -    o 'ParamList OptComma TERMINATOR Param',    -> $1.concat $4
    -    o 'ParamList OptComma INDENT ParamList OptComma OUTDENT', -> $1.concat $4
    -  ]

    A single parameter in a function definition can be ordinary, or a splat -that hoovers up the remaining arguments.

      Param: [
    -    o 'ParamVar',                               -> new Param $1
    -    o 'ParamVar ...',                           -> new Param $1, null, on
    -    o 'ParamVar = Expression',                  -> new Param $1, $3
    -  ]

    Function Parameters

      ParamVar: [
    -    o 'Identifier'
    -    o 'ThisProperty'
    -    o 'Array'
    -    o 'Object'
    -  ]

    A splat that occurs outside of a parameter list.

      Splat: [
    -    o 'Expression ...',                         -> new Splat $1
    -  ]

    Variables and properties that can be assigned to.

      SimpleAssignable: [
    -    o 'Identifier',                             -> new Value $1
    -    o 'Value Accessor',                         -> $1.add $2
    -    o 'Invocation Accessor',                    -> new Value $1, [].concat $2
    -    o 'ThisProperty'
    -  ]

    Everything that can be assigned to.

      Assignable: [
    -    o 'SimpleAssignable'
    -    o 'Array',                                  -> new Value $1
    -    o 'Object',                                 -> new Value $1
    -  ]

    The types of things that can be treated as values -- assigned to, invoked -as functions, indexed into, named as a class, etc.

      Value: [
    -    o 'Assignable'
    -    o 'Literal',                                -> new Value $1
    -    o 'Parenthetical',                          -> new Value $1
    -    o 'Range',                                  -> new Value $1
    -    o 'This'
    -  ]

    The general group of accessors into an object, by property, by prototype -or by array index or slice.

      Accessor: [
    -    o '.  Identifier',                          -> new Access $2
    -    o '?. Identifier',                          -> new Access $2, 'soak'
    -    o ':: Identifier',                          -> [LOC(1)(new Access new Literal('prototype')), LOC(2)(new Access $2)]
    -    o '?:: Identifier',                         -> [LOC(1)(new Access new Literal('prototype'), 'soak'), LOC(2)(new Access $2)]
    -    o '::',                                     -> new Access new Literal 'prototype'
    -    o 'Index'
    -  ]

    Indexing into an object or array using bracket notation.

      Index: [
    -    o 'INDEX_START IndexValue INDEX_END',       -> $2
    -    o 'INDEX_SOAK  Index',                      -> extend $2, soak : yes
    -  ]
    -
    -  IndexValue: [
    -    o 'Expression',                             -> new Index $1
    -    o 'Slice',                                  -> new Slice $1
    -  ]

    In CoffeeScript, an object literal is simply a list of assignments.

      Object: [
    -    o '{ AssignList OptComma }',                -> new Obj $2, $1.generated
    -  ]

    Assignment of properties within an object literal can be separated by -comma, as in JavaScript, or simply by newline.

      AssignList: [
    -    o '',                                                       -> []
    -    o 'AssignObj',                                              -> [$1]
    -    o 'AssignList , AssignObj',                                 -> $1.concat $3
    -    o 'AssignList OptComma TERMINATOR AssignObj',               -> $1.concat $4
    -    o 'AssignList OptComma INDENT AssignList OptComma OUTDENT', -> $1.concat $4
    -  ]

    Class definitions have optional bodies of prototype property assignments, -and optional references to the superclass.

      Class: [
    -    o 'CLASS',                                           -> new Class
    -    o 'CLASS Block',                                     -> new Class null, null, $2
    -    o 'CLASS EXTENDS Expression',                        -> new Class null, $3
    -    o 'CLASS EXTENDS Expression Block',                  -> new Class null, $3, $4
    -    o 'CLASS SimpleAssignable',                          -> new Class $2
    -    o 'CLASS SimpleAssignable Block',                    -> new Class $2, null, $3
    -    o 'CLASS SimpleAssignable EXTENDS Expression',       -> new Class $2, $4
    -    o 'CLASS SimpleAssignable EXTENDS Expression Block', -> new Class $2, $4, $5
    -  ]

    Ordinary function invocation, or a chained series of calls.

      Invocation: [
    -    o 'Value OptFuncExist Arguments',           -> new Call $1, $3, $2
    -    o 'Invocation OptFuncExist Arguments',      -> new Call $1, $3, $2
    -    o 'SUPER',                                  -> new Call 'super', [new Splat new Literal 'arguments']
    -    o 'SUPER Arguments',                        -> new Call 'super', $2
    -  ]

    An optional existence check on a function.

      OptFuncExist: [
    -    o '',                                       -> no
    -    o 'FUNC_EXIST',                             -> yes
    -  ]

    The list of arguments to a function call.

      Arguments: [
    -    o 'CALL_START CALL_END',                    -> []
    -    o 'CALL_START ArgList OptComma CALL_END',   -> $2
    -  ]

    A reference to the this current object.

      This: [
    -    o 'THIS',                                   -> new Value new Literal 'this'
    -    o '@',                                      -> new Value new Literal 'this'
    -  ]

    A reference to a property on this.

      ThisProperty: [
    -    o '@ Identifier',                           -> new Value LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'
    -  ]

    The array literal.

      Array: [
    -    o '[ ]',                                    -> new Arr []
    -    o '[ ArgList OptComma ]',                   -> new Arr $2
    -  ]

    Inclusive and exclusive range dots.

      RangeDots: [
    -    o '..',                                     -> 'inclusive'
    -    o '...',                                    -> 'exclusive'
    -  ]

    The CoffeeScript range literal.

      Range: [
    -    o '[ Expression RangeDots Expression ]',    -> new Range $2, $4, $3
    -  ]

    Array slice literals.

      Slice: [
    -    o 'Expression RangeDots Expression',        -> new Range $1, $3, $2
    -    o 'Expression RangeDots',                   -> new Range $1, null, $2
    -    o 'RangeDots Expression',                   -> new Range null, $2, $1
    -    o 'RangeDots',                              -> new Range null, null, $1
    -  ]

    The ArgList is both the list of objects passed into a function call, +list. +

    + + + +
      Code: [
    +    o 'PARAM_START ParamList PARAM_END FuncGlyph Block', -> new Code $2, $5, $4
    +    o 'FuncGlyph Block',                        -> new Code [], $2, $1
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    CoffeeScript has two different symbols for functions. -> is for ordinary +functions, and => is for functions bound to the current value of this. +

    + +
    + +
      FuncGlyph: [
    +    o '->',                                     -> 'func'
    +    o '=>',                                     -> 'boundfunc'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    An optional, trailing comma. +

    + +
    + +
      OptComma: [
    +    o ''
    +    o ','
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The list of parameters that a function accepts can be of any length. +

    + +
    + +
      ParamList: [
    +    o '',                                       -> []
    +    o 'Param',                                  -> [$1]
    +    o 'ParamList , Param',                      -> $1.concat $3
    +    o 'ParamList OptComma TERMINATOR Param',    -> $1.concat $4
    +    o 'ParamList OptComma INDENT ParamList OptComma OUTDENT', -> $1.concat $4
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A single parameter in a function definition can be ordinary, or a splat +that hoovers up the remaining arguments. +

    + +
    + +
      Param: [
    +    o 'ParamVar',                               -> new Param $1
    +    o 'ParamVar ...',                           -> new Param $1, null, on
    +    o 'ParamVar = Expression',                  -> new Param $1, $3
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Function Parameters +

    + +
    + +
      ParamVar: [
    +    o 'Identifier'
    +    o 'ThisProperty'
    +    o 'Array'
    +    o 'Object'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A splat that occurs outside of a parameter list. +

    + +
    + +
      Splat: [
    +    o 'Expression ...',                         -> new Splat $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Variables and properties that can be assigned to. +

    + +
    + +
      SimpleAssignable: [
    +    o 'Identifier',                             -> new Value $1
    +    o 'Value Accessor',                         -> $1.add $2
    +    o 'Invocation Accessor',                    -> new Value $1, [].concat $2
    +    o 'ThisProperty'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Everything that can be assigned to. +

    + +
    + +
      Assignable: [
    +    o 'SimpleAssignable'
    +    o 'Array',                                  -> new Value $1
    +    o 'Object',                                 -> new Value $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The types of things that can be treated as values -- assigned to, invoked +as functions, indexed into, named as a class, etc. +

    + +
    + +
      Value: [
    +    o 'Assignable'
    +    o 'Literal',                                -> new Value $1
    +    o 'Parenthetical',                          -> new Value $1
    +    o 'Range',                                  -> new Value $1
    +    o 'This'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The general group of accessors into an object, by property, by prototype +or by array index or slice. +

    + +
    + +
      Accessor: [
    +    o '.  Identifier',                          -> new Access $2
    +    o '?. Identifier',                          -> new Access $2, 'soak'
    +    o ':: Identifier',                          -> [LOC(1)(new Access new Literal('prototype')), LOC(2)(new Access $2)]
    +    o '?:: Identifier',                         -> [LOC(1)(new Access new Literal('prototype'), 'soak'), LOC(2)(new Access $2)]
    +    o '::',                                     -> new Access new Literal 'prototype'
    +    o 'Index'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Indexing into an object or array using bracket notation. +

    + +
    + +
      Index: [
    +    o 'INDEX_START IndexValue INDEX_END',       -> $2
    +    o 'INDEX_SOAK  Index',                      -> extend $2, soak : yes
    +  ]
    +
    +  IndexValue: [
    +    o 'Expression',                             -> new Index $1
    +    o 'Slice',                                  -> new Slice $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    In CoffeeScript, an object literal is simply a list of assignments. +

    + +
    + +
      Object: [
    +    o '{ AssignList OptComma }',                -> new Obj $2, $1.generated
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Assignment of properties within an object literal can be separated by +comma, as in JavaScript, or simply by newline. +

    + +
    + +
      AssignList: [
    +    o '',                                                       -> []
    +    o 'AssignObj',                                              -> [$1]
    +    o 'AssignList , AssignObj',                                 -> $1.concat $3
    +    o 'AssignList OptComma TERMINATOR AssignObj',               -> $1.concat $4
    +    o 'AssignList OptComma INDENT AssignList OptComma OUTDENT', -> $1.concat $4
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Class definitions have optional bodies of prototype property assignments, +and optional references to the superclass. +

    + +
    + +
      Class: [
    +    o 'CLASS',                                           -> new Class
    +    o 'CLASS Block',                                     -> new Class null, null, $2
    +    o 'CLASS EXTENDS Expression',                        -> new Class null, $3
    +    o 'CLASS EXTENDS Expression Block',                  -> new Class null, $3, $4
    +    o 'CLASS SimpleAssignable',                          -> new Class $2
    +    o 'CLASS SimpleAssignable Block',                    -> new Class $2, null, $3
    +    o 'CLASS SimpleAssignable EXTENDS Expression',       -> new Class $2, $4
    +    o 'CLASS SimpleAssignable EXTENDS Expression Block', -> new Class $2, $4, $5
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Ordinary function invocation, or a chained series of calls. +

    + +
    + +
      Invocation: [
    +    o 'Value OptFuncExist Arguments',           -> new Call $1, $3, $2
    +    o 'Invocation OptFuncExist Arguments',      -> new Call $1, $3, $2
    +    o 'SUPER',                                  -> new Call 'super', [new Splat new Literal 'arguments']
    +    o 'SUPER Arguments',                        -> new Call 'super', $2
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    An optional existence check on a function. +

    + +
    + +
      OptFuncExist: [
    +    o '',                                       -> no
    +    o 'FUNC_EXIST',                             -> yes
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The list of arguments to a function call. +

    + +
    + +
      Arguments: [
    +    o 'CALL_START CALL_END',                    -> []
    +    o 'CALL_START ArgList OptComma CALL_END',   -> $2
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A reference to the this current object. +

    + +
    + +
      This: [
    +    o 'THIS',                                   -> new Value new Literal 'this'
    +    o '@',                                      -> new Value new Literal 'this'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A reference to a property on this. +

    + +
    + +
      ThisProperty: [
    +    o '@ Identifier',                           -> new Value LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The array literal. +

    + +
    + +
      Array: [
    +    o '[ ]',                                    -> new Arr []
    +    o '[ ArgList OptComma ]',                   -> new Arr $2
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Inclusive and exclusive range dots. +

    + +
    + +
      RangeDots: [
    +    o '..',                                     -> 'inclusive'
    +    o '...',                                    -> 'exclusive'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The CoffeeScript range literal. +

    + +
    + +
      Range: [
    +    o '[ Expression RangeDots Expression ]',    -> new Range $2, $4, $3
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Array slice literals. +

    + +
    + +
      Slice: [
    +    o 'Expression RangeDots Expression',        -> new Range $1, $3, $2
    +    o 'Expression RangeDots',                   -> new Range $1, null, $2
    +    o 'RangeDots Expression',                   -> new Range null, $2, $1
    +    o 'RangeDots',                              -> new Range null, null, $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The ArgList is both the list of objects passed into a function call, as well as the contents of an array literal -(i.e. comma-separated expressions). Newlines work as well.

  •   ArgList: [
    -    o 'Arg',                                              -> [$1]
    -    o 'ArgList , Arg',                                    -> $1.concat $3
    -    o 'ArgList OptComma TERMINATOR Arg',                  -> $1.concat $4
    -    o 'INDENT ArgList OptComma OUTDENT',                  -> $2
    -    o 'ArgList OptComma INDENT ArgList OptComma OUTDENT', -> $1.concat $4
    -  ]

    Valid arguments are Blocks or Splats.

      Arg: [
    -    o 'Expression'
    -    o 'Splat'
    -  ]

    Just simple, comma-separated, required arguments (no fancy syntax). We need +(i.e. comma-separated expressions). Newlines work as well. +

    + + + +
      ArgList: [
    +    o 'Arg',                                              -> [$1]
    +    o 'ArgList , Arg',                                    -> $1.concat $3
    +    o 'ArgList OptComma TERMINATOR Arg',                  -> $1.concat $4
    +    o 'INDENT ArgList OptComma OUTDENT',                  -> $2
    +    o 'ArgList OptComma INDENT ArgList OptComma OUTDENT', -> $1.concat $4
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    Valid arguments are Blocks or Splats. +

    + +
    + +
      Arg: [
    +    o 'Expression'
    +    o 'Splat'
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Just simple, comma-separated, required arguments (no fancy syntax). We need this to be separate from the ArgList for use in Switch blocks, where -having the newlines wouldn't make sense.

  •   SimpleArgs: [
    -    o 'Expression'
    -    o 'SimpleArgs , Expression',                -> [].concat $1, $3
    -  ]

    The variants of try/catch/finally exception handling blocks.

      Try: [
    -    o 'TRY Block',                              -> new Try $2
    -    o 'TRY Block Catch',                        -> new Try $2, $3[0], $3[1]
    -    o 'TRY Block FINALLY Block',                -> new Try $2, null, null, $4
    -    o 'TRY Block Catch FINALLY Block',          -> new Try $2, $3[0], $3[1], $5
    -  ]

    A catch clause names its error and runs a block of code.

      Catch: [
    -    o 'CATCH Identifier Block',                 -> [$2, $3]
    -    o 'CATCH Object Block',                     -> [LOC(2)(new Value($2)), $3]
    -  ]

    Throw an exception object.

      Throw: [
    -    o 'THROW Expression',                       -> new Throw $2
    -  ]

    Parenthetical expressions. Note that the Parenthetical is a Value, +having the newlines wouldn't make sense. +

    + + + +
      SimpleArgs: [
    +    o 'Expression'
    +    o 'SimpleArgs , Expression',                -> [].concat $1, $3
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    The variants of try/catch/finally exception handling blocks. +

    + +
    + +
      Try: [
    +    o 'TRY Block',                              -> new Try $2
    +    o 'TRY Block Catch',                        -> new Try $2, $3[0], $3[1]
    +    o 'TRY Block FINALLY Block',                -> new Try $2, null, null, $4
    +    o 'TRY Block Catch FINALLY Block',          -> new Try $2, $3[0], $3[1], $5
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    A catch clause names its error and runs a block of code. +

    + +
    + +
      Catch: [
    +    o 'CATCH Identifier Block',                 -> [$2, $3]
    +    o 'CATCH Object Block',                     -> [LOC(2)(new Value($2)), $3]
    +    o 'CATCH Block',                            -> [null, $2]
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Throw an exception object. +

    + +
    + +
      Throw: [
    +    o 'THROW Expression',                       -> new Throw $2
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Parenthetical expressions. Note that the Parenthetical is a Value, not an Expression, so if you need to use an expression in a place where only values are accepted, wrapping it in parentheses will always do -the trick.

  •   Parenthetical: [
    -    o '( Body )',                               -> new Parens $2
    -    o '( INDENT Body OUTDENT )',                -> new Parens $3
    -  ]

    The condition portion of a while loop.

      WhileSource: [
    -    o 'WHILE Expression',                       -> new While $2
    -    o 'WHILE Expression WHEN Expression',       -> new While $2, guard: $4
    -    o 'UNTIL Expression',                       -> new While $2, invert: true
    -    o 'UNTIL Expression WHEN Expression',       -> new While $2, invert: true, guard: $4
    -  ]

    The while loop can either be normal, with a block of expressions to execute, -or postfix, with a single expression. There is no do..while.

      While: [
    -    o 'WhileSource Block',                      -> $1.addBody $2
    -    o 'Statement  WhileSource',                 -> $2.addBody LOC(1) Block.wrap([$1])
    -    o 'Expression WhileSource',                 -> $2.addBody LOC(1) Block.wrap([$1])
    -    o 'Loop',                                   -> $1
    -  ]
    -
    -  Loop: [
    -    o 'LOOP Block',                             -> new While(LOC(1) new Literal 'true').addBody $2
    -    o 'LOOP Expression',                        -> new While(LOC(1) new Literal 'true').addBody LOC(2) Block.wrap [$2]
    -  ]

    Array, object, and range comprehensions, at the most generic level. +the trick. +

    + + + +
      Parenthetical: [
    +    o '( Body )',                               -> new Parens $2
    +    o '( INDENT Body OUTDENT )',                -> new Parens $3
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    The condition portion of a while loop. +

    + +
    + +
      WhileSource: [
    +    o 'WHILE Expression',                       -> new While $2
    +    o 'WHILE Expression WHEN Expression',       -> new While $2, guard: $4
    +    o 'UNTIL Expression',                       -> new While $2, invert: true
    +    o 'UNTIL Expression WHEN Expression',       -> new While $2, invert: true, guard: $4
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The while loop can either be normal, with a block of expressions to execute, +or postfix, with a single expression. There is no do..while. +

    + +
    + +
      While: [
    +    o 'WhileSource Block',                      -> $1.addBody $2
    +    o 'Statement  WhileSource',                 -> $2.addBody LOC(1) Block.wrap([$1])
    +    o 'Expression WhileSource',                 -> $2.addBody LOC(1) Block.wrap([$1])
    +    o 'Loop',                                   -> $1
    +  ]
    +
    +  Loop: [
    +    o 'LOOP Block',                             -> new While(LOC(1) new Literal 'true').addBody $2
    +    o 'LOOP Expression',                        -> new While(LOC(1) new Literal 'true').addBody LOC(2) Block.wrap [$2]
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Array, object, and range comprehensions, at the most generic level. Comprehensions can either be normal, with a block of expressions to execute, -or postfix, with a single expression.

  •   For: [
    -    o 'Statement  ForBody',                     -> new For $1, $2
    -    o 'Expression ForBody',                     -> new For $1, $2
    -    o 'ForBody    Block',                       -> new For $2, $1
    -  ]
    -
    -  ForBody: [
    -    o 'FOR Range',                              -> source: LOC(2) new Value($2)
    -    o 'ForStart ForSource',                     -> $2.own = $1.own; $2.name = $1[0]; $2.index = $1[1]; $2
    -  ]
    -
    -  ForStart: [
    -    o 'FOR ForVariables',                       -> $2
    -    o 'FOR OWN ForVariables',                   -> $3.own = yes; $3
    -  ]

    An array of all accepted values for a variable inside the loop. -This enables support for pattern matching.

      ForValue: [
    -    o 'Identifier'
    -    o 'ThisProperty'
    -    o 'Array',                                  -> new Value $1
    -    o 'Object',                                 -> new Value $1
    -  ]

    An array or range comprehension has variables for the current element +or postfix, with a single expression. +

    + + + +
      For: [
    +    o 'Statement  ForBody',                     -> new For $1, $2
    +    o 'Expression ForBody',                     -> new For $1, $2
    +    o 'ForBody    Block',                       -> new For $2, $1
    +  ]
    +
    +  ForBody: [
    +    o 'FOR Range',                              -> source: LOC(2) new Value($2)
    +    o 'ForStart ForSource',                     -> $2.own = $1.own; $2.name = $1[0]; $2.index = $1[1]; $2
    +  ]
    +
    +  ForStart: [
    +    o 'FOR ForVariables',                       -> $2
    +    o 'FOR OWN ForVariables',                   -> $3.own = yes; $3
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    An array of all accepted values for a variable inside the loop. +This enables support for pattern matching. +

    + +
    + +
      ForValue: [
    +    o 'Identifier'
    +    o 'ThisProperty'
    +    o 'Array',                                  -> new Value $1
    +    o 'Object',                                 -> new Value $1
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    An array or range comprehension has variables for the current element and (optional) reference to the current index. Or, key, value, in the case -of object comprehensions.

  •   ForVariables: [
    -    o 'ForValue',                               -> [$1]
    -    o 'ForValue , ForValue',                    -> [$1, $3]
    -  ]

    The source of a comprehension is an array or object with an optional guard -clause. If it's an array comprehension, you can also choose to step through -in fixed-size increments.

      ForSource: [
    -    o 'FORIN Expression',                               -> source: $2
    -    o 'FOROF Expression',                               -> source: $2, object: yes
    -    o 'FORIN Expression WHEN Expression',               -> source: $2, guard: $4
    -    o 'FOROF Expression WHEN Expression',               -> source: $2, guard: $4, object: yes
    -    o 'FORIN Expression BY Expression',                 -> source: $2, step:  $4
    -    o 'FORIN Expression WHEN Expression BY Expression', -> source: $2, guard: $4, step: $6
    -    o 'FORIN Expression BY Expression WHEN Expression', -> source: $2, step:  $4, guard: $6
    -  ]
    -
    -  Switch: [
    -    o 'SWITCH Expression INDENT Whens OUTDENT',            -> new Switch $2, $4
    -    o 'SWITCH Expression INDENT Whens ELSE Block OUTDENT', -> new Switch $2, $4, $6
    -    o 'SWITCH INDENT Whens OUTDENT',                       -> new Switch null, $3
    -    o 'SWITCH INDENT Whens ELSE Block OUTDENT',            -> new Switch null, $3, $5
    -  ]
    -
    -  Whens: [
    -    o 'When'
    -    o 'Whens When',                             -> $1.concat $2
    -  ]

    An individual When clause, with action.

      When: [
    -    o 'LEADING_WHEN SimpleArgs Block',            -> [[$2, $3]]
    -    o 'LEADING_WHEN SimpleArgs Block TERMINATOR', -> [[$2, $3]]
    -  ]

    The most basic form of if is a condition and an action. The following +of object comprehensions. +

    + + + +
      ForVariables: [
    +    o 'ForValue',                               -> [$1]
    +    o 'ForValue , ForValue',                    -> [$1, $3]
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    The source of a comprehension is an array or object with an optional guard +clause. If it's an array comprehension, you can also choose to step through +in fixed-size increments. +

    + +
    + +
      ForSource: [
    +    o 'FORIN Expression',                               -> source: $2
    +    o 'FOROF Expression',                               -> source: $2, object: yes
    +    o 'FORIN Expression WHEN Expression',               -> source: $2, guard: $4
    +    o 'FOROF Expression WHEN Expression',               -> source: $2, guard: $4, object: yes
    +    o 'FORIN Expression BY Expression',                 -> source: $2, step:  $4
    +    o 'FORIN Expression WHEN Expression BY Expression', -> source: $2, guard: $4, step: $6
    +    o 'FORIN Expression BY Expression WHEN Expression', -> source: $2, step:  $4, guard: $6
    +  ]
    +
    +  Switch: [
    +    o 'SWITCH Expression INDENT Whens OUTDENT',            -> new Switch $2, $4
    +    o 'SWITCH Expression INDENT Whens ELSE Block OUTDENT', -> new Switch $2, $4, $6
    +    o 'SWITCH INDENT Whens OUTDENT',                       -> new Switch null, $3
    +    o 'SWITCH INDENT Whens ELSE Block OUTDENT',            -> new Switch null, $3, $5
    +  ]
    +
    +  Whens: [
    +    o 'When'
    +    o 'Whens When',                             -> $1.concat $2
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    An individual When clause, with action. +

    + +
    + +
      When: [
    +    o 'LEADING_WHEN SimpleArgs Block',            -> [[$2, $3]]
    +    o 'LEADING_WHEN SimpleArgs Block TERMINATOR', -> [[$2, $3]]
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    The most basic form of if is a condition and an action. The following if-related rules are broken up along these lines in order to avoid -ambiguity.

  •   IfBlock: [
    -    o 'IF Expression Block',                    -> new If $2, $3, type: $1
    -    o 'IfBlock ELSE IF Expression Block',       -> $1.addElse new If $4, $5, type: $3
    -  ]

    The full complement of if expressions, including postfix one-liner -if and unless.

      If: [
    -    o 'IfBlock'
    -    o 'IfBlock ELSE Block',                     -> $1.addElse $3
    -    o 'Statement  POST_IF Expression',          -> new If $3, LOC(1)(Block.wrap [$1]), type: $2, statement: true
    -    o 'Expression POST_IF Expression',          -> new If $3, LOC(1)(Block.wrap [$1]), type: $2, statement: true
    -  ]

    Arithmetic and logical operators, working on one or more operands. +ambiguity. +

    + + + +
      IfBlock: [
    +    o 'IF Expression Block',                    -> new If $2, $3, type: $1
    +    o 'IfBlock ELSE IF Expression Block',       -> $1.addElse new If $4, $5, type: $3
    +  ]
    + + + + +
  • +
    + +
    + +
    +

    The full complement of if expressions, including postfix one-liner +if and unless. +

    + +
    + +
      If: [
    +    o 'IfBlock'
    +    o 'IfBlock ELSE Block',                     -> $1.addElse $3
    +    o 'Statement  POST_IF Expression',          -> new If $3, LOC(1)(Block.wrap [$1]), type: $2, statement: true
    +    o 'Expression POST_IF Expression',          -> new If $3, LOC(1)(Block.wrap [$1]), type: $2, statement: true
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Arithmetic and logical operators, working on one or more operands. Here they are grouped by order of precedence. The actual precedence rules are defined at the bottom of the page. It would be shorter if we could combine most of these rules into a single generic Operand OpSymbol Operand -type rule, but in order to make the precedence binding possible, separate -rules are necessary.

  •   Operation: [
    -    o 'UNARY Expression',                       -> new Op $1 , $2
    -    o '-     Expression',                      (-> new Op '-', $2), prec: 'UNARY'
    -    o '+     Expression',                      (-> new Op '+', $2), prec: 'UNARY'
    -
    -    o '-- SimpleAssignable',                    -> new Op '--', $2
    -    o '++ SimpleAssignable',                    -> new Op '++', $2
    -    o 'SimpleAssignable --',                    -> new Op '--', $1, null, true
    -    o 'SimpleAssignable ++',                    -> new Op '++', $1, null, true

    The existential operator.

        o 'Expression ?',                           -> new Existence $1
    -
    -    o 'Expression +  Expression',               -> new Op '+' , $1, $3
    -    o 'Expression -  Expression',               -> new Op '-' , $1, $3
    -
    -    o 'Expression MATH     Expression',         -> new Op $2, $1, $3
    -    o 'Expression SHIFT    Expression',         -> new Op $2, $1, $3
    -    o 'Expression COMPARE  Expression',         -> new Op $2, $1, $3
    -    o 'Expression LOGIC    Expression',         -> new Op $2, $1, $3
    -    o 'Expression RELATION Expression',         ->
    -      if $2.charAt(0) is '!'
    -        new Op($2[1..], $1, $3).invert()
    -      else
    -        new Op $2, $1, $3
    -
    -    o 'SimpleAssignable COMPOUND_ASSIGN
    -       Expression',                             -> new Assign $1, $3, $2
    -    o 'SimpleAssignable COMPOUND_ASSIGN
    -       INDENT Expression OUTDENT',              -> new Assign $1, $4, $2
    -    o 'SimpleAssignable COMPOUND_ASSIGN TERMINATOR
    -       Expression',                             -> new Assign $1, $4, $2
    -    o 'SimpleAssignable EXTENDS Expression',    -> new Extends $1, $3
    -  ]

    Precedence

    Operators at the top of this list have higher precedence than the ones lower -down. Following these rules is what makes 2 + 3 * 4 parse as:

    - -
    2 + (3 * 4)
    -
    - -

    And not:

    - -
    (2 + 3) * 4
    -
    operators = [
    -  ['left',      '.', '?.', '::', '?::']
    -  ['left',      'CALL_START', 'CALL_END']
    -  ['nonassoc',  '++', '--']
    -  ['left',      '?']
    -  ['right',     'UNARY']
    -  ['left',      'MATH']
    -  ['left',      '+', '-']
    -  ['left',      'SHIFT']
    -  ['left',      'RELATION']
    -  ['left',      'COMPARE']
    -  ['left',      'LOGIC']
    -  ['nonassoc',  'INDENT', 'OUTDENT']
    -  ['right',     '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS']
    -  ['right',     'FORIN', 'FOROF', 'BY', 'WHEN']
    -  ['right',     'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS']
    -  ['right',     'POST_IF']
    -]

    Wrapping Up

    Finally, now that we have our grammar and our operators, we can create +rules are necessary. +

    + + + +
      Operation: [
    +    o 'UNARY Expression',                       -> new Op $1 , $2
    +    o '-     Expression',                      (-> new Op '-', $2), prec: 'UNARY'
    +    o '+     Expression',                      (-> new Op '+', $2), prec: 'UNARY'
    +
    +    o '-- SimpleAssignable',                    -> new Op '--', $2
    +    o '++ SimpleAssignable',                    -> new Op '++', $2
    +    o 'SimpleAssignable --',                    -> new Op '--', $1, null, true
    +    o 'SimpleAssignable ++',                    -> new Op '++', $1, null, true
    + + + + +
  • +
    + +
    + +
    +

    The existential operator. +

    + +
    + +
        o 'Expression ?',                           -> new Existence $1
    +
    +    o 'Expression +  Expression',               -> new Op '+' , $1, $3
    +    o 'Expression -  Expression',               -> new Op '-' , $1, $3
    +
    +    o 'Expression MATH     Expression',         -> new Op $2, $1, $3
    +    o 'Expression SHIFT    Expression',         -> new Op $2, $1, $3
    +    o 'Expression COMPARE  Expression',         -> new Op $2, $1, $3
    +    o 'Expression LOGIC    Expression',         -> new Op $2, $1, $3
    +    o 'Expression RELATION Expression',         ->
    +      if $2.charAt(0) is '!'
    +        new Op($2[1..], $1, $3).invert()
    +      else
    +        new Op $2, $1, $3
    +
    +    o 'SimpleAssignable COMPOUND_ASSIGN
    +       Expression',                             -> new Assign $1, $3, $2
    +    o 'SimpleAssignable COMPOUND_ASSIGN
    +       INDENT Expression OUTDENT',              -> new Assign $1, $4, $2
    +    o 'SimpleAssignable COMPOUND_ASSIGN TERMINATOR
    +       Expression',                             -> new Assign $1, $4, $2
    +    o 'SimpleAssignable EXTENDS Expression',    -> new Extends $1, $3
    +  ]
    + +
  • + + +
  • +
    + +
    + +
    +

    Precedence

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Operators at the top of this list have higher precedence than the ones lower +down. Following these rules is what makes 2 + 3 * 4 parse as: + +

    +
    2 + (3 * 4)
    +

    And not: + +

    +
    (2 + 3) * 4
    + +
    + +
    operators = [
    +  ['left',      '.', '?.', '::', '?::']
    +  ['left',      'CALL_START', 'CALL_END']
    +  ['nonassoc',  '++', '--']
    +  ['left',      '?']
    +  ['right',     'UNARY']
    +  ['left',      'MATH']
    +  ['left',      '+', '-']
    +  ['left',      'SHIFT']
    +  ['left',      'RELATION']
    +  ['left',      'COMPARE']
    +  ['left',      'LOGIC']
    +  ['nonassoc',  'INDENT', 'OUTDENT']
    +  ['right',     '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS']
    +  ['right',     'FORIN', 'FOROF', 'BY', 'WHEN']
    +  ['right',     'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS']
    +  ['right',     'POST_IF']
    +]
    + +
  • + + +
  • +
    + +
    + +
    +

    Wrapping Up

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Finally, now that we have our grammar and our operators, we can create our Jison.Parser. We do this by processing all of our rules, recording all terminals (every symbol which does not appear as the name of a rule above) -as "tokens".

  • tokens = []
    -for name, alternatives of grammar
    -  grammar[name] = for alt in alternatives
    -    for token in alt[0].split ' '
    -      tokens.push token unless grammar[token]
    -    alt[1] = "return #{alt[1]}" if name is 'Root'
    -    alt

    Initialize the Parser with our list of terminal tokens, our grammar +as "tokens". +

    + + + +
    tokens = []
    +for name, alternatives of grammar
    +  grammar[name] = for alt in alternatives
    +    for token in alt[0].split ' '
    +      tokens.push token unless grammar[token]
    +    alt[1] = "return #{alt[1]}" if name is 'Root'
    +    alt
    + + + + +
  • +
    + +
    + +
    +

    Initialize the Parser with our list of terminal tokens, our grammar rules, and the name of the root. Reverse the operators because Jison orders precedence from low to high, and we have it high to low -(as in Yacc).

  • exports.parser = new Parser
    -  tokens      : tokens.join ' '
    -  bnf         : grammar
    -  operators   : operators.reverse()
    -  startSymbol : 'Root'
    +(as in Yacc).
    +

    -
    \ No newline at end of file + + +
    exports.parser = new Parser
    +  tokens      : tokens.join ' '
    +  bnf         : grammar
    +  operators   : operators.reverse()
    +  startSymbol : 'Root'
    + + + + + + + diff --git a/documentation/docs/helpers.html b/documentation/docs/helpers.html index 0ec8514ef9..6efe3f55bf 100644 --- a/documentation/docs/helpers.html +++ b/documentation/docs/helpers.html @@ -1,63 +1,595 @@ - helpers.coffee

    helpers.coffee

    This file contains the common helper functions that we'd like to share among + + + + + helpers.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      helpers.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      This file contains the common helper functions that we'd like to share among the Lexer, Rewriter, and the Nodes. Merge objects, flatten -arrays, count characters, that sort of thing.

    Peek at the beginning of a given string to see if it matches a sequence.

    exports.starts = (string, literal, start) ->
    -  literal is string.substr start, literal.length

    Peek at the end of a given string to see if it matches a sequence.

    exports.ends = (string, literal, back) ->
    -  len = literal.length
    -  literal is string.substr string.length - len - (back or 0), len

    Trim out all falsy values from an array.

    exports.compact = (array) ->
    -  item for item in array when item

    Count the number of occurrences of a string in a string.

    exports.count = (string, substr) ->
    -  num = pos = 0
    -  return 1/0 unless substr.length
    -  num++ while pos = 1 + string.indexOf substr, pos
    -  num

    Merge objects, returning a fresh copy with attributes from both sides. +arrays, count characters, that sort of thing. +

    + + + + + + +
  • +
    + +
    + +
    +

    Peek at the beginning of a given string to see if it matches a sequence. +

    + +
    + +
    exports.starts = (string, literal, start) ->
    +  literal is string.substr start, literal.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Peek at the end of a given string to see if it matches a sequence. +

    + +
    + +
    exports.ends = (string, literal, back) ->
    +  len = literal.length
    +  literal is string.substr string.length - len - (back or 0), len
    + +
  • + + +
  • +
    + +
    + +
    +

    Repeat a string n times. +

    + +
    + +
    exports.repeat = repeat = (str, n) ->
    + +
  • + + +
  • +
    + +
    + +
    +

    Use clever algorithm to have O(log(n)) string concatenation operations. +

    + +
    + +
      res = ''
    +  while n > 0
    +    res += str if n & 1
    +    n >>>= 1
    +    str += str
    +  res
    + +
  • + + +
  • +
    + +
    + +
    +

    Trim out all falsy values from an array. +

    + +
    + +
    exports.compact = (array) ->
    +  item for item in array when item
    + +
  • + + +
  • +
    + +
    + +
    +

    Count the number of occurrences of a string in a string. +

    + +
    + +
    exports.count = (string, substr) ->
    +  num = pos = 0
    +  return 1/0 unless substr.length
    +  num++ while pos = 1 + string.indexOf substr, pos
    +  num
    + +
  • + + +
  • +
    + +
    + +
    +

    Merge objects, returning a fresh copy with attributes from both sides. Used every time Base#compile is called, to allow properties in the -options hash to propagate down the tree without polluting other branches.

  • exports.merge = (options, overrides) ->
    -  extend (extend {}, options), overrides

    Extend a source object with the properties of another object (shallow copy).

    extend = exports.extend = (object, properties) ->
    -  for key, val of properties
    -    object[key] = val
    -  object

    Return a flattened version of an array. -Handy for getting a list of children from the nodes.

    exports.flatten = flatten = (array) ->
    -  flattened = []
    -  for element in array
    -    if element instanceof Array
    -      flattened = flattened.concat flatten element
    -    else
    -      flattened.push element
    -  flattened

    Delete a key from an object, returning the value. Useful when a node is -looking for a particular method in an options hash.

    exports.del = (obj, key) ->
    -  val =  obj[key]
    -  delete obj[key]
    -  val

    Gets the last item of an array(-like) object.

    exports.last = (array, back) -> array[array.length - (back or 0) - 1]

    Typical Array::some

    exports.some = Array::some ? (fn) ->
    -  return true for e in this when fn e
    -  false

    Merge two jison-style location data objects together. -If last is not provided, this will simply return first.

    buildLocationData = (first, last) ->
    -  if not last
    -    first
    -  else
    -    first_line: first.first_line
    -    first_column: first.first_column
    -    last_line: last.last_line
    -    last_column: last.last_column

    This returns a function which takes an object as a parameter, and if that object is an AST node, -updates that object's locationData. The object is returned either way.

    exports.addLocationDataFn = (first, last) ->
    -    (obj) ->
    -      if ((typeof obj) is 'object') and (!!obj['updateLocationDataIfMissing'])
    -        obj.updateLocationDataIfMissing buildLocationData(first, last)
    -
    -      return obj

    Convert jison location data to a string. -obj can be a token, or a locationData.

    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
    -
    -    if locationData
    -      "#{locationData.first_line + 1}:#{locationData.first_column + 1}-" +
    -      "#{locationData.last_line + 1}:#{locationData.last_column + 1}"
    -    else
    -      "No location data"

    A .coffee.md compatible version of basename, that returns the file sans-extension.

    exports.baseFileName = (file, stripExt = no) ->
    -  parts = file.split('/')
    -  file = parts[parts.length - 1]
    -  return file unless stripExt
    -  parts = file.split('.')
    -  parts.pop()
    -  parts.pop() if parts[parts.length - 1] is 'coffee'
    -  parts.join('.')

    Determine if a filename represents a CoffeeScript file.

    exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file

    Determine if a filename represents a Literate CoffeeScript file.

    exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
    -
    -
    \ No newline at end of file +options hash to propagate down the tree without polluting other branches. +

    + + + +
    exports.merge = (options, overrides) ->
    +  extend (extend {}, options), overrides
    + + + + +
  • +
    + +
    + +
    +

    Extend a source object with the properties of another object (shallow copy). +

    + +
    + +
    extend = exports.extend = (object, properties) ->
    +  for key, val of properties
    +    object[key] = val
    +  object
    + +
  • + + +
  • +
    + +
    + +
    +

    Return a flattened version of an array. +Handy for getting a list of children from the nodes. +

    + +
    + +
    exports.flatten = flatten = (array) ->
    +  flattened = []
    +  for element in array
    +    if element instanceof Array
    +      flattened = flattened.concat flatten element
    +    else
    +      flattened.push element
    +  flattened
    + +
  • + + +
  • +
    + +
    + +
    +

    Delete a key from an object, returning the value. Useful when a node is +looking for a particular method in an options hash. +

    + +
    + +
    exports.del = (obj, key) ->
    +  val =  obj[key]
    +  delete obj[key]
    +  val
    + +
  • + + +
  • +
    + +
    + +
    +

    Gets the last item of an array(-like) object. +

    + +
    + +
    exports.last = last = (array, back) -> array[array.length - (back or 0) - 1]
    + +
  • + + +
  • +
    + +
    + +
    +

    Typical Array::some +

    + +
    + +
    exports.some = Array::some ? (fn) ->
    +  return true for e in this when fn e
    +  false
    + +
  • + + +
  • +
    + +
    + +
    +

    Simple function for inverting Literate CoffeeScript code by putting the +documentation in comments, producing a string of CoffeeScript code that +can be compiled "normally". +

    + +
    + +
    exports.invertLiterate = (code) ->
    +  maybe_code = true
    +  lines = for line in code.split('\n')
    +    if maybe_code and /^([ ]{4}|[ ]{0,3}\t)/.test line
    +      line
    +    else if maybe_code = /^\s*$/.test line
    +      line
    +    else
    +      '# ' + line
    +  lines.join '\n'
    + +
  • + + +
  • +
    + +
    + +
    +

    Merge two jison-style location data objects together. +If last is not provided, this will simply return first. +

    + +
    + +
    buildLocationData = (first, last) ->
    +  if not last
    +    first
    +  else
    +    first_line: first.first_line
    +    first_column: first.first_column
    +    last_line: last.last_line
    +    last_column: last.last_column
    + +
  • + + +
  • +
    + +
    + +
    +

    This returns a function which takes an object as a parameter, and if that +object is an AST node, updates that object's locationData. +The object is returned either way. +

    + +
    + +
    exports.addLocationDataFn = (first, last) ->
    +    (obj) ->
    +      if ((typeof obj) is 'object') and (!!obj['updateLocationDataIfMissing'])
    +        obj.updateLocationDataIfMissing buildLocationData(first, last)
    +
    +      return obj
    + +
  • + + +
  • +
    + +
    + +
    +

    Convert jison location data to a string. +obj can be a token, or a locationData. +

    + +
    + +
    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
    +
    +    if locationData
    +      "#{locationData.first_line + 1}:#{locationData.first_column + 1}-" +
    +      "#{locationData.last_line + 1}:#{locationData.last_column + 1}"
    +    else
    +      "No location data"
    + +
  • + + +
  • +
    + +
    + +
    +

    A .coffee.md compatible version of basename, that returns the file sans-extension. +

    + +
    + +
    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
    +  parts = file.split('.')
    +  parts.pop()
    +  parts.pop() if parts[parts.length - 1] is 'coffee' and parts.length > 1
    +  parts.join('.')
    + +
  • + + +
  • +
    + +
    + +
    +

    Determine if a filename represents a CoffeeScript file. +

    + +
    + +
    exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file
    + +
  • + + +
  • +
    + +
    + +
    +

    Determine if a filename represents a Literate CoffeeScript file. +

    + +
    + +
    exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
    + +
  • + + +
  • +
    + +
    + +
    +

    Throws a SyntaxError with a source file location data attached to it in a +property called location. +

    + +
    + +
    exports.throwSyntaxError = (message, location) ->
    +  location.last_line ?= location.first_line
    +  location.last_column ?= location.first_column
    +  error = new SyntaxError message
    +  error.location = location
    +  throw error
    + +
  • + + +
  • +
    + +
    + +
    +

    Creates a nice error message like, following the "standard" format +

    +

    ::: plus the line with the error and a marker +showing where the error is. +

    + +
    + +
    exports.prettyErrorMessage = (error, fileName, code, useColors) ->
    +  return error.stack or "#{error}" unless error.location
    +
    +  {first_line, first_column, last_line, last_column} = error.location
    +  codeLine = code.split('\n')[first_line]
    +  start    = first_column
    + +
  • + + +
  • +
    + +
    + +
    +

    Show only the first line on multi-line errors. +

    + +
    + +
      end      = if first_line is last_line then last_column + 1 else codeLine.length
    +  marker   = repeat(' ', start) + repeat('^', end - start)
    +
    +  if useColors
    +    colorize  = (str) -> "\x1B[1;31m#{str}\x1B[0m"
    +    codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..]
    +    marker    = colorize marker
    +
    +  message = """
    +  #{fileName}:#{first_line + 1}:#{first_column + 1}: error: #{error.message}
    +  #{codeLine}
    +  #{marker}
    +            """
    + +
  • + + +
  • +
    + +
    + +
    +

    Uncomment to add stacktrace. +message += "\n#{error.stack}" +

    + +
    + +
    +  message
    + +
  • + + + + + diff --git a/documentation/docs/index.html b/documentation/docs/index.html index e01224ccd1..9ee66be169 100644 --- a/documentation/docs/index.html +++ b/documentation/docs/index.html @@ -1,3 +1,123 @@ - index.coffee

    index.coffee

    Loader for CoffeeScript as a Node.js library.

    exports[key] = val for key, val of require './coffee-script'
    +
     
    -
    \ No newline at end of file + + + index.coffee + + + + + +
    +
    + + + + +
    + + diff --git a/documentation/docs/lexer.html b/documentation/docs/lexer.html index aeccd12c17..148921d22f 100644 --- a/documentation/docs/lexer.html +++ b/documentation/docs/lexer.html @@ -1,650 +1,2061 @@ - lexer.coffee

    lexer.coffee

    The CoffeeScript Lexer. Uses a series of token-matching regexes to attempt + + + + + lexer.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      lexer.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      The CoffeeScript Lexer. Uses a series of token-matching regexes to attempt matches against the beginning of the source code. When a match is found, a token is produced, we consume the match, and start again. Tokens are in the -form:

      - -
      [tag, value, locationData]
      -
      +form: -

      where locationData is {firstline, firstcolumn, lastline, lastcolumn}, which is a +

      +
      [tag, value, locationData]
      +

      where locationData is {first_line, first_column, last_line, last_column}, which is a format that can be fed directly into Jison. These -are read by jison in the parser.lexer function defined in coffee-script.coffee.

    {Rewriter, INVERSES} = require './rewriter'

    Import the helpers we need.

    {count, starts, compact, last, locationDataToString} = require './helpers'

    The Lexer Class

    The Lexer class reads a stream of CoffeeScript and divvies it up into tagged +are read by jison in the parser.lexer function defined in coffee-script.coffee. +

    + + + +
    +{Rewriter, INVERSES} = require './rewriter'
    + + + + +
  • +
    + +
    + +
    +

    Import the helpers we need. +

    + +
    + +
    {count, starts, compact, last, repeat, invertLiterate,
    +locationDataToString,  throwSyntaxError} = require './helpers'
    + +
  • + + +
  • +
    + +
    + +
    +

    The Lexer Class

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The Lexer class reads a stream of CoffeeScript and divvies it up into tagged tokens. Some potential ambiguity in the grammar has been avoided by -pushing some extra smarts into the Lexer.

  • exports.Lexer = class Lexer

    tokenize is the Lexer's main method. Scan by attempting to match tokens +pushing some extra smarts into the Lexer. +

    + + + +
    exports.Lexer = class Lexer
    + + + + +
  • +
    + +
    + +
    +

    tokenize is the Lexer's main method. Scan by attempting to match tokens one at a time, using a regular expression anchored at the start of the remaining code, or a custom recursive token-matching method (for interpolations). When the next token has been recorded, we move forward -within the code past the token, and begin again.

    +within the code past the token, and begin again. +

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

    +it has consumed. +

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

  •   tokenize: (code, opts = {}) ->
    -    @literate = opts.literate  # Are we lexing literate CoffeeScript?
    -    @indent   = 0              # The current indentation level.
    -    @indebt   = 0              # The over-indentation at the current level.
    -    @outdebt  = 0              # The under-outdentation at the current level.
    -    @indents  = []             # The stack of all current indentation levels.
    -    @ends     = []             # The stack for pairing up tokens.
    -    @tokens   = []             # Stream of parsed tokens in the form `['TYPE', value, line]`.
    -
    -    @chunkLine =
    -        opts.line or 0         # The start line for the current @chunk.
    -    @chunkColumn =
    -        opts.column or 0       # The start column of the current @chunk.
    -    code = @clean code         # The stripped, cleaned original source code.

    At every position, run through this list of attempted matches, +unless explicitly asked not to. +

    + + + +
      tokenize: (code, opts = {}) ->
    +    @literate = opts.literate  # Are we lexing literate CoffeeScript?
    +    @indent   = 0              # The current indentation level.
    +    @indebt   = 0              # The over-indentation at the current level.
    +    @outdebt  = 0              # The under-outdentation at the current level.
    +    @indents  = []             # The stack of all current indentation levels.
    +    @ends     = []             # The stack for pairing up tokens.
    +    @tokens   = []             # Stream of parsed tokens in the form `['TYPE', value, location data]`.
    +
    +    @chunkLine =
    +        opts.line or 0         # The start line for the current @chunk.
    +    @chunkColumn =
    +        opts.column or 0       # The start column of the current @chunk.
    +    code = @clean code         # The stripped, cleaned original source code.
    + + + + +
  • +
    + +
    + +
    +

    At every position, run through this list of attempted matches, short-circuiting if any of them succeed. Their order determines precedence: -@literalToken is the fallback catch-all.

  •     i = 0
    -    while @chunk = code[i..]
    -      consumed = \
    -           @identifierToken() or
    -           @commentToken()    or
    -           @whitespaceToken() or
    -           @lineToken()       or
    -           @heredocToken()    or
    -           @stringToken()     or
    -           @numberToken()     or
    -           @regexToken()      or
    -           @jsToken()         or
    -           @literalToken()

    Update position

          [@chunkLine, @chunkColumn] = @getLineAndColumnFromChunk consumed
    -
    -      i += consumed
    -
    -    @closeIndentation()
    -    @error "missing #{tag}" if tag = @ends.pop()
    -    return @tokens if opts.rewrite is off
    -    (new Rewriter).rewrite @tokens

    Preprocess the code to remove leading and trailing whitespace, carriage -returns, etc. If we're lexing literate CoffeeScript, strip external Markdown -by removing all lines that aren't indented by at least four spaces or a tab.

      clean: (code) ->
    -    code = code.slice(1) if code.charCodeAt(0) is BOM
    -    code = code.replace(/\r/g, '').replace TRAILING_SPACES, ''
    -    if WHITESPACE.test code
    -        code = "\n#{code}"
    -        @chunkLine--
    -    if @literate
    -      lines = for line in code.split('\n')
    -        if match = LITERATE.exec line
    -          line[match[0].length..]
    -        else
    -          '# ' + line
    -      code = lines.join '\n'
    -    code

    Tokenizers

    Matches identifying literals: variables, keywords, method names, etc. -Check to ensure that JavaScript reserved words aren't being used as +@literalToken is the fallback catch-all. +

    + + + +
        i = 0
    +    while @chunk = code[i..]
    +      consumed = \
    +           @identifierToken() or
    +           @commentToken()    or
    +           @whitespaceToken() or
    +           @lineToken()       or
    +           @heredocToken()    or
    +           @stringToken()     or
    +           @numberToken()     or
    +           @regexToken()      or
    +           @jsToken()         or
    +           @literalToken()
    + + + + +
  • +
    + +
    + +
    +

    Update position +

    + +
    + +
          [@chunkLine, @chunkColumn] = @getLineAndColumnFromChunk consumed
    +
    +      i += consumed
    +
    +    @closeIndentation()
    +    @error "missing #{tag}" if tag = @ends.pop()
    +    return @tokens if opts.rewrite is off
    +    (new Rewriter).rewrite @tokens
    + +
  • + + +
  • +
    + +
    + +
    +

    Preprocess the code to remove leading and trailing whitespace, carriage +returns, etc. If we're lexing literate CoffeeScript, strip external Markdown +by removing all lines that aren't indented by at least four spaces or a tab. +

    + +
    + +
      clean: (code) ->
    +    code = code.slice(1) if code.charCodeAt(0) is BOM
    +    code = code.replace(/\r/g, '').replace TRAILING_SPACES, ''
    +    if WHITESPACE.test code
    +        code = "\n#{code}"
    +        @chunkLine--
    +    code = invertLiterate code if @literate
    +    code
    + +
  • + + +
  • +
    + +
    + +
    +

    Tokenizers

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Matches identifying literals: variables, keywords, method names, etc. +Check to ensure that JavaScript reserved words aren't being used as identifiers. Because CoffeeScript reserves a handful of keywords that are -allowed in JavaScript, we're careful not to tag them as keywords when +allowed in JavaScript, we're careful not to tag them as keywords when referenced as property names here, so you can still do jQuery.is() even -though is means === otherwise.

  •   identifierToken: ->
    -    return 0 unless match = IDENTIFIER.exec @chunk
    -    [input, id, colon] = match

    Preserve length of id for location data

        idLength = id.length
    -    poppedToken = undefined
    -
    -    if id is 'own' and @tag() is 'FOR'
    -      @token 'OWN', id
    -      return id.length
    -    forcedIdentifier = colon or
    -      (prev = last @tokens) and (prev[0] in ['.', '?.', '::', '?::'] or
    -      not prev.spaced and prev[0] is '@')
    -    tag = 'IDENTIFIER'
    -
    -    if not forcedIdentifier and (id in JS_KEYWORDS or id in COFFEE_KEYWORDS)
    -      tag = id.toUpperCase()
    -      if tag is 'WHEN' and @tag() in LINE_BREAK
    -        tag = 'LEADING_WHEN'
    -      else if tag is 'FOR'
    -        @seenFor = yes
    -      else if tag is 'UNLESS'
    -        tag = 'IF'
    -      else if tag in UNARY
    -        tag = 'UNARY'
    -      else if tag in RELATION
    -        if tag isnt 'INSTANCEOF' and @seenFor
    -          tag = 'FOR' + tag
    -          @seenFor = no
    -        else
    -          tag = 'RELATION'
    -          if @value() is '!'
    -            poppedToken = @tokens.pop()
    -            id = '!' + id
    -
    -    if id in JS_FORBIDDEN
    -      if forcedIdentifier
    -        tag = 'IDENTIFIER'
    -        id  = new String id
    -        id.reserved = yes
    -      else if id in RESERVED
    -        @error "reserved word \"#{id}\""
    -
    -    unless forcedIdentifier
    -      id  = COFFEE_ALIAS_MAP[id] if id in COFFEE_ALIASES
    -      tag = switch id
    -        when '!'                 then 'UNARY'
    -        when '==', '!='          then 'COMPARE'
    -        when '&&', '||'          then 'LOGIC'
    -        when 'true', 'false'     then 'BOOL'
    -        when 'break', 'continue' then 'STATEMENT'
    -        else  tag
    -
    -    tagToken = @token tag, id, 0, idLength
    -    if poppedToken
    -      [tagToken[2].first_line, tagToken[2].first_column] =
    -        [poppedToken[2].first_line, poppedToken[2].first_column]
    -    if colon
    -      colonOffset = input.lastIndexOf ':'
    -      @token ':', ':', colonOffset, colon.length
    -
    -    input.length

    Matches numbers, including decimals, hex, and exponential notation. -Be careful not to interfere with ranges-in-progress.

      numberToken: ->
    -    return 0 unless match = NUMBER.exec @chunk
    -    number = match[0]
    -    if /^0[BOX]/.test number
    -      @error "radix prefix '#{number}' must be lowercase"
    -    else if /E/.test(number) and not /^0x/.test number
    -      @error "exponential notation '#{number}' must be indicated with a lowercase 'e'"
    -    else if /^0\d*[89]/.test number
    -      @error "decimal literal '#{number}' must not be prefixed with '0'"
    -    else if /^0\d+/.test number
    -      @error "octal literal '#{number}' must be prefixed with '0o'"
    -    lexedLength = number.length
    -    if octalLiteral = /^0o([0-7]+)/.exec number
    -      number = '0x' + (parseInt octalLiteral[1], 8).toString 16
    -    if binaryLiteral = /^0b([01]+)/.exec number
    -      number = '0x' + (parseInt binaryLiteral[1], 2).toString 16
    -    @token 'NUMBER', number, 0, lexedLength
    -    lexedLength

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

      stringToken: ->
    -    switch @chunk.charAt 0
    -      when "'"
    -        return 0 unless match = SIMPLESTR.exec @chunk
    -        string = match[0]
    -        @token 'STRING', string.replace(MULTILINER, '\\\n'), 0, string.length
    -      when '"'
    -        return 0 unless string = @balancedString @chunk, '"'
    -        if 0 < string.indexOf '#{', 1
    -          @interpolateString string[1...-1], strOffset: 1, lexedLength: string.length
    -        else
    -          @token 'STRING', @escapeLines string, 0, string.length
    -      else
    -        return 0
    -    if octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test string
    -      @error "octal escape sequences #{string} are not allowed"
    -    string.length

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

      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 '#{'
    -      @interpolateString doc, heredoc: yes, strOffset: 3, lexedLength: heredoc.length
    -    else
    -      @token 'STRING', @makeString(doc, quote, yes), 0, heredoc.length
    -    heredoc.length

    Matches and consumes comments.

      commentToken: ->
    -    return 0 unless match = @chunk.match COMMENT
    -    [comment, here] = match
    -    if here
    -      @token 'HERECOMMENT',
    -        (@sanitizeHeredoc here,
    -          herecomment: true, indent: Array(@indent + 1).join(' ')),
    -        0, comment.length
    -    comment.length

    Matches JavaScript interpolated directly into the source via backticks.

      jsToken: ->
    -    return 0 unless @chunk.charAt(0) is '`' and match = JSTOKEN.exec @chunk
    -    @token 'JS', (script = match[0])[1...-1], 0, script.length
    -    script.length

    Matches regular expression literals. Lexing regular expressions is difficult +though is means === otherwise. +

    + + + +
      identifierToken: ->
    +    return 0 unless match = IDENTIFIER.exec @chunk
    +    [input, id, colon] = match
    + + + + +
  • +
    + +
    + +
    +

    Preserve length of id for location data +

    + +
    + +
        idLength = id.length
    +    poppedToken = undefined
    +
    +    if id is 'own' and @tag() is 'FOR'
    +      @token 'OWN', id
    +      return id.length
    +    forcedIdentifier = colon or
    +      (prev = last @tokens) and (prev[0] in ['.', '?.', '::', '?::'] or
    +      not prev.spaced and prev[0] is '@')
    +    tag = 'IDENTIFIER'
    +
    +    if not forcedIdentifier and (id in JS_KEYWORDS or id in COFFEE_KEYWORDS)
    +      tag = id.toUpperCase()
    +      if tag is 'WHEN' and @tag() in LINE_BREAK
    +        tag = 'LEADING_WHEN'
    +      else if tag is 'FOR'
    +        @seenFor = yes
    +      else if tag is 'UNLESS'
    +        tag = 'IF'
    +      else if tag in UNARY
    +        tag = 'UNARY'
    +      else if tag in RELATION
    +        if tag isnt 'INSTANCEOF' and @seenFor
    +          tag = 'FOR' + tag
    +          @seenFor = no
    +        else
    +          tag = 'RELATION'
    +          if @value() is '!'
    +            poppedToken = @tokens.pop()
    +            id = '!' + id
    +
    +    if id in JS_FORBIDDEN
    +      if forcedIdentifier
    +        tag = 'IDENTIFIER'
    +        id  = new String id
    +        id.reserved = yes
    +      else if id in RESERVED
    +        @error "reserved word \"#{id}\""
    +
    +    unless forcedIdentifier
    +      id  = COFFEE_ALIAS_MAP[id] if id in COFFEE_ALIASES
    +      tag = switch id
    +        when '!'                 then 'UNARY'
    +        when '==', '!='          then 'COMPARE'
    +        when '&&', '||'          then 'LOGIC'
    +        when 'true', 'false'     then 'BOOL'
    +        when 'break', 'continue' then 'STATEMENT'
    +        else  tag
    +
    +    tagToken = @token tag, id, 0, idLength
    +    if poppedToken
    +      [tagToken[2].first_line, tagToken[2].first_column] =
    +        [poppedToken[2].first_line, poppedToken[2].first_column]
    +    if colon
    +      colonOffset = input.lastIndexOf ':'
    +      @token ':', ':', colonOffset, colon.length
    +
    +    input.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Matches numbers, including decimals, hex, and exponential notation. +Be careful not to interfere with ranges-in-progress. +

    + +
    + +
      numberToken: ->
    +    return 0 unless match = NUMBER.exec @chunk
    +    number = match[0]
    +    if /^0[BOX]/.test number
    +      @error "radix prefix '#{number}' must be lowercase"
    +    else if /E/.test(number) and not /^0x/.test number
    +      @error "exponential notation '#{number}' must be indicated with a lowercase 'e'"
    +    else if /^0\d*[89]/.test number
    +      @error "decimal literal '#{number}' must not be prefixed with '0'"
    +    else if /^0\d+/.test number
    +      @error "octal literal '#{number}' must be prefixed with '0o'"
    +    lexedLength = number.length
    +    if octalLiteral = /^0o([0-7]+)/.exec number
    +      number = '0x' + parseInt(octalLiteral[1], 8).toString 16
    +    if binaryLiteral = /^0b([01]+)/.exec number
    +      number = '0x' + parseInt(binaryLiteral[1], 2).toString 16
    +    @token 'NUMBER', number, 0, lexedLength
    +    lexedLength
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
      stringToken: ->
    +    switch @chunk.charAt 0
    +      when "'"
    +        return 0 unless match = SIMPLESTR.exec @chunk
    +        string = match[0]
    +        @token 'STRING', string.replace(MULTILINER, '\\\n'), 0, string.length
    +      when '"'
    +        return 0 unless string = @balancedString @chunk, '"'
    +        if 0 < string.indexOf '#{', 1
    +          @interpolateString string[1...-1], strOffset: 1, lexedLength: string.length
    +        else
    +          @token 'STRING', @escapeLines string, 0, string.length
    +      else
    +        return 0
    +    if octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test string
    +      @error "octal escape sequences #{string} are not allowed"
    +    string.length
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
      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 '#{'
    +      @interpolateString doc, heredoc: yes, strOffset: 3, lexedLength: heredoc.length
    +    else
    +      @token 'STRING', @makeString(doc, quote, yes), 0, heredoc.length
    +    heredoc.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Matches and consumes comments. +

    + +
    + +
      commentToken: ->
    +    return 0 unless match = @chunk.match COMMENT
    +    [comment, here] = match
    +    if here
    +      @token 'HERECOMMENT',
    +        (@sanitizeHeredoc here,
    +          herecomment: true, indent: repeat ' ', @indent),
    +        0, comment.length
    +    comment.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Matches JavaScript interpolated directly into the source via backticks. +

    + +
    + +
      jsToken: ->
    +    return 0 unless @chunk.charAt(0) is '`' and match = JSTOKEN.exec @chunk
    +    @token 'JS', (script = match[0])[1...-1], 0, script.length
    +    script.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Matches regular expression literals. 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 '/'
    -    if match = HEREGEX.exec @chunk
    -      length = @heregexToken match
    -      return length
    -
    -    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
    -    if regex[..1] is '/*' then @error 'regular expressions cannot begin with `*`'
    -    if regex is '//' then regex = '/(?:)/'
    -    @token 'REGEX', "#{regex}#{flags}", 0, match.length
    -    match.length

    Matches multiline extended regular expressions.

      heregexToken: (match) ->
    -    [heregex, body, flags] = match
    -    if 0 > body.indexOf '#{'
    -      re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/')
    -      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)
    -      [tag, value] = token
    -      if tag is 'TOKENS'
    -        tokens.push value...
    -      else if tag is 'NEOSTRING'
    -        continue unless value = value.replace HEREGEX_OMIT, ''

    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. +JavaScript and Ruby. +

    + + + +
      regexToken: ->
    +    return 0 if @chunk.charAt(0) isnt '/'
    +    if match = HEREGEX.exec @chunk
    +      length = @heregexToken match
    +      return length
    +
    +    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
    +    if regex[..1] is '/*' then @error 'regular expressions cannot begin with `*`'
    +    if regex is '//' then regex = '/(?:)/'
    +    @token 'REGEX', "#{regex}#{flags}", 0, match.length
    +    match.length
    + + + + +
  • +
    + +
    + +
    +

    Matches multiline extended regular expressions. +

    + +
    + +
      heregexToken: (match) ->
    +    [heregex, body, flags] = match
    +    if 0 > body.indexOf '#{'
    +      re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/')
    +      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)
    +      [tag, value] = token
    +      if tag is 'TOKENS'
    +        tokens.push value...
    +      else if tag is 'NEOSTRING'
    +        continue unless value = value.replace HEREGEX_OMIT, ''
    + +
  • + + +
  • +
    + +
    + +
    +

    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:

    +then the newline is suppressed: +

    elements
       .each( ... )
    -  .map( ... )
    -
    - + .map( ... )

    Keeps track of the level of indentation, because a single outdent token -can close multiple indents, so we need to know how far in we happen to be.

  •   lineToken: ->
    -    return 0 unless match = MULTI_DENT.exec @chunk
    -    indent = match[0]
    -    @seenFor = no
    -    size = indent.length - 1 - indent.lastIndexOf '\n'
    -    noNewlines = @unfinished()
    -    if size - @indebt is @indent
    -      if noNewlines then @suppressNewlines() else @newlineToken 0
    -      return indent.length
    -
    -    if size > @indent
    -      if noNewlines
    -        @indebt = size - @indent
    -        @suppressNewlines()
    -        return indent.length
    -      diff = size - @indent + @outdebt
    -      @token 'INDENT', diff, 0, indent.length
    -      @indents.push diff
    -      @ends.push 'OUTDENT'
    -      @outdebt = @indebt = 0
    -    else
    -      @indebt = 0
    -      @outdentToken @indent - size, noNewlines, indent.length
    -    @indent = size
    -    indent.length

    Record an outdent token or multiple tokens, if we happen to be moving back -inwards past several recorded indents.

      outdentToken: (moveOut, noNewlines, outdentLength) ->
    -    while moveOut > 0
    -      len = @indents.length - 1
    -      if @indents[len] is undefined
    -        moveOut = 0
    -      else if @indents[len] is @outdebt
    -        moveOut -= @outdebt
    -        @outdebt = 0
    -      else if @indents[len] < @outdebt
    -        @outdebt -= @indents[len]
    -        moveOut  -= @indents[len]
    -      else
    -        dent = @indents.pop() + @outdebt
    -        moveOut -= dent
    -        @outdebt = 0
    -        @pair 'OUTDENT'
    -        @token 'OUTDENT', dent, 0, outdentLength
    -    @outdebt -= moveOut if dent
    -    @tokens.pop() while @value() is ';'
    -
    -    @token 'TERMINATOR', '\n', outdentLength, 0 unless @tag() is 'TERMINATOR' or noNewlines
    -    this

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

      whitespaceToken: ->
    -    return 0 unless (match = WHITESPACE.exec @chunk) or
    -                    (nline = @chunk.charAt(0) is '\n')
    -    prev = last @tokens
    -    prev[if match then 'spaced' else 'newLine'] = true if prev
    -    if match then match[0].length else 0

    Generate a newline token. Consecutive newlines get merged together.

      newlineToken: (offset) ->
    -    @tokens.pop() while @value() is ';'
    -    @token 'TERMINATOR', '\n', offset, 0 unless @tag() is 'TERMINATOR'
    -    this

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

      suppressNewlines: ->
    -    @tokens.pop() if @value() is '\\'
    -    this

    We treat all other single characters as a token. E.g.: ( ) , . ! +can close multiple indents, so we need to know how far in we happen to be. +

    + + + +
      lineToken: ->
    +    return 0 unless match = MULTI_DENT.exec @chunk
    +    indent = match[0]
    +    @seenFor = no
    +    size = indent.length - 1 - indent.lastIndexOf '\n'
    +    noNewlines = @unfinished()
    +    if size - @indebt is @indent
    +      if noNewlines then @suppressNewlines() else @newlineToken 0
    +      return indent.length
    +
    +    if size > @indent
    +      if noNewlines
    +        @indebt = size - @indent
    +        @suppressNewlines()
    +        return indent.length
    +      diff = size - @indent + @outdebt
    +      @token 'INDENT', diff, indent.length - size, size
    +      @indents.push diff
    +      @ends.push 'OUTDENT'
    +      @outdebt = @indebt = 0
    +    else
    +      @indebt = 0
    +      @outdentToken @indent - size, noNewlines, indent.length
    +    @indent = size
    +    indent.length
    + + + + +
  • +
    + +
    + +
    +

    Record an outdent token or multiple tokens, if we happen to be moving back +inwards past several recorded indents. +

    + +
    + +
      outdentToken: (moveOut, noNewlines, outdentLength) ->
    +    while moveOut > 0
    +      len = @indents.length - 1
    +      if @indents[len] is undefined
    +        moveOut = 0
    +      else if @indents[len] is @outdebt
    +        moveOut -= @outdebt
    +        @outdebt = 0
    +      else if @indents[len] < @outdebt
    +        @outdebt -= @indents[len]
    +        moveOut  -= @indents[len]
    +      else
    +        dent = @indents.pop() + @outdebt
    +        moveOut -= dent
    +        @outdebt = 0
    +        @pair 'OUTDENT'
    +        @token 'OUTDENT', dent, 0, outdentLength
    +    @outdebt -= moveOut if dent
    +    @tokens.pop() while @value() is ';'
    +
    +    @token 'TERMINATOR', '\n', outdentLength, 0 unless @tag() is 'TERMINATOR' or noNewlines
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
      whitespaceToken: ->
    +    return 0 unless (match = WHITESPACE.exec @chunk) or
    +                    (nline = @chunk.charAt(0) is '\n')
    +    prev = last @tokens
    +    prev[if match then 'spaced' else 'newLine'] = true if prev
    +    if match then match[0].length else 0
    + +
  • + + +
  • +
    + +
    + +
    +

    Generate a newline token. Consecutive newlines get merged together. +

    + +
    + +
      newlineToken: (offset) ->
    +    @tokens.pop() while @value() is ';'
    +    @token 'TERMINATOR', '\n', offset, 0 unless @tag() is 'TERMINATOR'
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
      suppressNewlines: ->
    +    @tokens.pop() if @value() is '\\'
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    We treat all other single characters as a token. E.g.: ( ) , . ! Multi-character operators are also literal tokens, so that Jison can assign the proper order of operations. There are some symbols that we tag specially here. ; and newlines are both treated as a TERMINATOR, we distinguish -parentheses that indicate a method call from regular parentheses, and so on.

  •   literalToken: ->
    -    if match = OPERATOR.exec @chunk
    -      [value] = match
    -      @tagParameters() if CODE.test value
    -    else
    -      value = @chunk.charAt 0
    -    tag  = value
    -    prev = last @tokens
    -    if value is '=' and prev
    -      if not prev[1].reserved and prev[1] in JS_FORBIDDEN
    -        @error "reserved word \"#{@value()}\" can't be assigned"
    -      if prev[1] in ['||', '&&']
    -        prev[0] = 'COMPOUND_ASSIGN'
    -        prev[1] += '='
    -        return value.length
    -    if value is ';'
    -      @seenFor = no
    -      tag = 'TERMINATOR'
    -    else if value in MATH            then tag = 'MATH'
    -    else if value in COMPARE         then tag = 'COMPARE'
    -    else if value in COMPOUND_ASSIGN then tag = 'COMPOUND_ASSIGN'
    -    else if value in UNARY           then tag = 'UNARY'
    -    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
    -        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'
    -    switch value
    -      when '(', '{', '[' then @ends.push INVERSES[value]
    -      when ')', '}', ']' then @pair value
    -    @token tag, value
    -    value.length

    Token Manipulators

    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# \n/g, '\n\n' if @literate
    -    doc = doc.replace /^\n/, '' unless herecomment
    -    doc

    A source of ambiguity in our grammar used to be parameter lists in function +parentheses that indicate a method call from regular parentheses, and so on. +

    + + + +
      literalToken: ->
    +    if match = OPERATOR.exec @chunk
    +      [value] = match
    +      @tagParameters() if CODE.test value
    +    else
    +      value = @chunk.charAt 0
    +    tag  = value
    +    prev = last @tokens
    +    if value is '=' and prev
    +      if not prev[1].reserved and prev[1] in JS_FORBIDDEN
    +        @error "reserved word \"#{@value()}\" can't be assigned"
    +      if prev[1] in ['||', '&&']
    +        prev[0] = 'COMPOUND_ASSIGN'
    +        prev[1] += '='
    +        return value.length
    +    if value is ';'
    +      @seenFor = no
    +      tag = 'TERMINATOR'
    +    else if value in MATH            then tag = 'MATH'
    +    else if value in COMPARE         then tag = 'COMPARE'
    +    else if value in COMPOUND_ASSIGN then tag = 'COMPOUND_ASSIGN'
    +    else if value in UNARY           then tag = 'UNARY'
    +    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
    +        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'
    +    switch value
    +      when '(', '{', '[' then @ends.push INVERSES[value]
    +      when ')', '}', ']' then @pair value
    +    @token tag, value
    +    value.length
    + + + + +
  • +
    + +
    + +
    +

    Token Manipulators

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    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 -parameters specially in order to make things easier for the parser.

  •   tagParameters: ->
    -    return this if @tag() isnt ')'
    -    stack = []
    -    {tokens} = this
    -    i = tokens.length
    -    tokens[--i][0] = 'PARAM_END'
    -    while tok = tokens[--i]
    -      switch tok[0]
    -        when ')'
    -          stack.push tok
    -        when '(', 'CALL_START'
    -          if stack.length then stack.pop()
    -          else if tok[0] is '('
    -            tok[0] = 'PARAM_START'
    -            return this
    -          else return this
    -    this

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

      closeIndentation: ->
    -    @outdentToken @indent

    Matches a balanced group such as a single or double-quoted string. Pass in +parameters specially in order to make things easier for the parser. +

    + + + +
      tagParameters: ->
    +    return this if @tag() isnt ')'
    +    stack = []
    +    {tokens} = this
    +    i = tokens.length
    +    tokens[--i][0] = 'PARAM_END'
    +    while tok = tokens[--i]
    +      switch tok[0]
    +        when ')'
    +          stack.push tok
    +        when '(', 'CALL_START'
    +          if stack.length then stack.pop()
    +          else if tok[0] is '('
    +            tok[0] = 'PARAM_START'
    +            return this
    +          else return this
    +    this
    + + + + +
  • +
    + +
    + +
    +

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

    + +
    + +
      closeIndentation: ->
    +    @outdentToken @indent
    + +
  • + + +
  • +
    + +
    + +
    +

    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.

  •   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"

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

    - -
    "Hello #{name.capitalize()}."
    -
    +interpolations within strings, ad infinitum. +

    + + + +
      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"
    + + + + +
  • +
    + +
    + +
    +

    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.

    +token stream. +

      -
    • str is the start of the string contents (IE with the " or """ stripped +
    • 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 +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.
    • -
  •   interpolateString: (str, options = {}) ->
    -    {heredoc, regex, offsetInChunk, strOffset, lexedLength} = options
    -    offsetInChunk = offsetInChunk || 0
    -    strOffset = strOffset || 0
    -    lexedLength = lexedLength || str.length

    Clip leading \n from heredoc

        if heredoc and str.length > 0 and str[0] == '\n'
    -      str = str[1...]
    -      strOffset++

    Parse the string.

        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

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

          tokens.push @makeToken('NEOSTRING', str[pi...i], strOffset + pi) if pi < i
    -      inner = expr[1...-1]
    -      if inner.length
    -        [line, column] = @getLineAndColumnFromChunk(strOffset + i + 1)
    -        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

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

              tokens.push ['TOKENS', nested]
    -      i += expr.length
    -      pi = i + 1
    -    tokens.push @makeToken('NEOSTRING', str[pi..], strOffset + pi) if i > pi < str.length

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

        return tokens if regex

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

        return @token 'STRING', '""', offsetInChunk, lexedLength unless tokens.length

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

        tokens.unshift @makeToken('NEOSTRING', '', offsetInChunk) unless tokens[0][0] is 'NEOSTRING'
    -
    -    @token '(', '(', offsetInChunk, 0 if interpolated = tokens.length > 1

    Push all the tokens

        for token, i in tokens
    -      [tag, value] = token
    -      if i

    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}"
    -    @token ')', ')', offsetInChunk + lexedLength, 0 if interpolated
    -    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:

    + + + + +
      interpolateString: (str, options = {}) ->
    +    {heredoc, regex, offsetInChunk, strOffset, lexedLength} = options
    +    offsetInChunk = offsetInChunk || 0
    +    strOffset = strOffset || 0
    +    lexedLength = lexedLength || str.length
    + + + + +
  • +
    + +
    + +
    +

    Clip leading \n from heredoc +

    + +
    + +
        if heredoc and str.length > 0 and str[0] == '\n'
    +      str = str[1...]
    +      strOffset++
    + +
  • + + +
  • +
    + +
    + +
    +

    Parse the string. +

    + +
    + +
        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
    + +
  • + + +
  • +
    + +
    + +
    +

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

    +
    + +
          tokens.push @makeToken('NEOSTRING', str[pi...i], strOffset + pi) if pi < i
    +      inner = expr[1...-1]
    +      if inner.length
    +        [line, column] = @getLineAndColumnFromChunk(strOffset + i + 1)
    +        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
    + +
  • + + +
  • +
    + +
    + +
    +

    Push a fake 'TOKENS' token, which will get turned into real tokens below. +

    + +
    + +
              tokens.push ['TOKENS', nested]
    +      i += expr.length
    +      pi = i + 1
    +    tokens.push @makeToken('NEOSTRING', str[pi..], strOffset + pi) if i > pi < str.length
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
        return tokens if regex
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
        return @token 'STRING', '""', offsetInChunk, lexedLength unless tokens.length
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
        tokens.unshift @makeToken('NEOSTRING', '', offsetInChunk) unless tokens[0][0] is 'NEOSTRING'
    +
    +    @token '(', '(', offsetInChunk, 0 if interpolated = tokens.length > 1
    + +
  • + + +
  • +
    + +
    + +
    +

    Push all the tokens +

    + +
    + +
        for token, i in tokens
    +      [tag, value] = token
    +      if i
    + +
  • + + +
  • +
    + +
    + +
    +

    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())
    -
  •       @indent -= size = last @indents
    -      @outdentToken size, true
    -      return @pair tag
    -    @ends.pop()

    Helpers

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

    - -

    offset is a number of characters into @chunk.

      getLineAndColumnFromChunk: (offset) ->
    -    if offset is 0
    -      return [@chunkLine, @chunkColumn]
    -
    -    if offset >= @chunk.length
    -      string = @chunk
    -    else
    -      string = @chunk[..offset-1]
    -
    -    lineCount = count string, '\n'
    -
    -    column = @chunkColumn
    -    if lineCount > 0
    -      lines = string.split '\n'
    -      column = (last lines).length
    -    else
    -      column += string.length
    -
    -    [@chunkLine + lineCount, column]

    Same as "token", exception this just returns the token without adding it -to the results.

      makeToken: (tag, value, offsetInChunk = 0, length = value.length) ->
    -    locationData = {}
    -    [locationData.first_line, locationData.first_column] =
    -      @getLineAndColumnFromChunk offsetInChunk

    Use length - 1 for the final offset - we're supplying the lastline and the lastcolumn, -so if lastcolumn == firstcolumn, then we're looking at a character of length 1.

        lastCharacter = Math.max 0, length - 1
    -    [locationData.last_line, locationData.last_column] =
    -      @getLineAndColumnFromChunk offsetInChunk + (length - 1)
    -
    -    token = [tag, value, locationData]
    -
    -    token

    Add a token to the results. + el.hide()) + + + +

          @indent -= size = last @indents
    +      @outdentToken size, true
    +      return @pair tag
    +    @ends.pop()
    + + + + +
  • +
    + +
    + +
    +

    Helpers

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

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

    +

    offset is a number of characters into @chunk. +

    + +
    + +
      getLineAndColumnFromChunk: (offset) ->
    +    if offset is 0
    +      return [@chunkLine, @chunkColumn]
    +
    +    if offset >= @chunk.length
    +      string = @chunk
    +    else
    +      string = @chunk[..offset-1]
    +
    +    lineCount = count string, '\n'
    +
    +    column = @chunkColumn
    +    if lineCount > 0
    +      lines = string.split '\n'
    +      column = last(lines).length
    +    else
    +      column += string.length
    +
    +    [@chunkLine + lineCount, column]
    + +
  • + + +
  • +
    + +
    + +
    +

    Same as "token", exception this just returns the token without adding it +to the results. +

    + +
    + +
      makeToken: (tag, value, offsetInChunk = 0, length = value.length) ->
    +    locationData = {}
    +    [locationData.first_line, locationData.first_column] =
    +      @getLineAndColumnFromChunk offsetInChunk
    + +
  • + + +
  • +
    + +
    + +
    +

    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. +

    + +
    + +
        lastCharacter = Math.max 0, length - 1
    +    [locationData.last_line, locationData.last_column] =
    +      @getLineAndColumnFromChunk offsetInChunk + lastCharacter
    +
    +    token = [tag, value, locationData]
    +
    +    token
    + +
  • + + +
  • +
    + +
    + +
    +

    Add a token to the results. offset is the offset into the current @chunk where the token starts. length is the length of the token in the @chunk, after the offset. If -not specified, the length of value will be used.

    - -

    Returns the new token.

  •   token: (tag, value, offsetInChunk, length) ->
    -    token = @makeToken tag, value, offsetInChunk, length
    -    @tokens.push token
    -    token

    Peek at a tag in the current token stream.

      tag: (index, tag) ->
    -    (tok = last @tokens, index) and if tag then tok[0] = tag else tok[0]

    Peek at a value in the current token stream.

      value: (index, val) ->
    -    (tok = last @tokens, index) and if val then tok[1] = val else tok[1]

    Are we in the midst of an unfinished expression?

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

    Converts newlines for string literals.

      escapeLines: (str, heredoc) ->
    -    str.replace MULTILINER, if heredoc then '\\n' else ''

    Constructs a string token by escaping quotes and newlines.

      makeString: (body, quote, heredoc) ->
    -    return quote + quote unless body
    -    body = body.replace /\\([\s\S])/g, (match, contents) ->
    -      if contents in ['\n', quote] then contents else match
    -    body = body.replace /// #{quote} ///g, '\\$&'
    -    quote + @escapeLines(body, heredoc) + quote

    Throws a syntax error on the current @line.

      error: (message) ->

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

        throw SyntaxError "#{message} on line #{ @chunkLine + 1 }"

    Constants

    Keywords that CoffeeScript shares in common with JavaScript.

    JS_KEYWORDS = [
    -  'true', 'false', 'null', 'this'
    -  'new', 'delete', 'typeof', 'in', 'instanceof'
    -  'return', 'throw', 'break', 'continue', 'debugger'
    -  'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
    -  'class', 'extends', 'super'
    -]

    CoffeeScript-only keywords.

    COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']
    -
    -COFFEE_ALIAS_MAP =
    -  and  : '&&'
    -  or   : '||'
    -  is   : '=='
    -  isnt : '!='
    -  not  : '!'
    -  yes  : 'true'
    -  no   : 'false'
    -  on   : 'true'
    -  off  : 'false'
    -
    -COFFEE_ALIASES  = (key for key of COFFEE_ALIAS_MAP)
    -COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES

    The list of keywords that are reserved by JavaScript, but not used, or are +not specified, the length of value will be used. + +

    +

    Returns the new token. +

    + + + +
      token: (tag, value, offsetInChunk, length) ->
    +    token = @makeToken tag, value, offsetInChunk, length
    +    @tokens.push token
    +    token
    + + + + +
  • +
    + +
    + +
    +

    Peek at a tag in the current token stream. +

    + +
    + +
      tag: (index, tag) ->
    +    (tok = last @tokens, index) and if tag then tok[0] = tag else tok[0]
    + +
  • + + +
  • +
    + +
    + +
    +

    Peek at a value in the current token stream. +

    + +
    + +
      value: (index, val) ->
    +    (tok = last @tokens, index) and if val then tok[1] = val else tok[1]
    + +
  • + + +
  • +
    + +
    + +
    +

    Are we in the midst of an unfinished expression? +

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

    Converts newlines for string literals. +

    + +
    + +
      escapeLines: (str, heredoc) ->
    +    str.replace MULTILINER, if heredoc then '\\n' else ''
    + +
  • + + +
  • +
    + +
    + +
    +

    Constructs a string token by escaping quotes and newlines. +

    + +
    + +
      makeString: (body, quote, heredoc) ->
    +    return quote + quote unless body
    +    body = body.replace /\\([\s\S])/g, (match, contents) ->
    +      if contents in ['\n', quote] then contents else match
    +    body = body.replace /// #{quote} ///g, '\\$&'
    +    quote + @escapeLines(body, heredoc) + quote
    + +
  • + + +
  • +
    + +
    + +
    +

    Throws a compiler error on the current position. +

    + +
    + +
      error: (message) ->
    + +
  • + + +
  • +
    + +
    + +
    +

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

    + +
    + +
        throwSyntaxError message, first_line: @chunkLine, first_column: @chunkColumn
    + +
  • + + +
  • +
    + +
    + +
    +

    Constants

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Keywords that CoffeeScript shares in common with JavaScript. +

    + +
    + +
    JS_KEYWORDS = [
    +  'true', 'false', 'null', 'this'
    +  'new', 'delete', 'typeof', 'in', 'instanceof'
    +  'return', 'throw', 'break', 'continue', 'debugger'
    +  'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
    +  'class', 'extends', 'super'
    +]
    + +
  • + + +
  • +
    + +
    + +
    +

    CoffeeScript-only keywords. +

    + +
    + +
    COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']
    +
    +COFFEE_ALIAS_MAP =
    +  and  : '&&'
    +  or   : '||'
    +  is   : '=='
    +  isnt : '!='
    +  not  : '!'
    +  yes  : 'true'
    +  no   : 'false'
    +  on   : 'true'
    +  off  : 'false'
    +
    +COFFEE_ALIASES  = (key for key of COFFEE_ALIAS_MAP)
    +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, -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'
    -]
    +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'
    +]
    +
    +STRICT_PROSCRIBED = ['arguments', 'eval']
    + + + + +
  • +
    + +
    + +
    +

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

    + +
    + +
    JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED)
     
    -STRICT_PROSCRIBED = ['arguments', 'eval']
  • The superset of both JavaScript keywords and reserved words, none of which may -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
    + + + + +
  • +
    + +
    + +
    +

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

    -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.

    BOM = 65279

    Token matching regexes.

    IDENTIFIER = /// ^
    -  ( [$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]* )
    -  ( [^\n\S]* : (?!:) )?  # Is this a property name?
    -///
    +            
    + +
    BOM = 65279
    + + + + +
  • +
    + +
    + +
    +

    Token matching regexes. +

    -NUMBER = /// - ^ 0b[01]+ | # binary - ^ 0o[0-7]+ | # octal - ^ 0x[\da-f]+ | # hex - ^ \d*\.?\d+ (?:e[+-]?\d+)? # decimal -///i +
    + +
    IDENTIFIER = /// ^
    +  ( [$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]* )
    +  ( [^\n\S]* : (?!:) )?  # Is this a property name?
    +///
     
    -HEREDOC    = /// ^ ("""|''') ([\s\S]*?) (?:\n[^\n\S]*)? \1 ///
    +NUMBER     = ///
    +  ^ 0b[01]+    |              # binary
    +  ^ 0o[0-7]+   |              # octal
    +  ^ 0x[\da-f]+ |              # hex
    +  ^ \d*\.?\d+ (?:e[+-]?\d+)?  # decimal
    +///i
     
    -OPERATOR   = /// ^ (
    -  ?: [-=]>             # function
    -   | [-+*/%<>&|^!?=]=  # compound assign / compare
    -   | >>>=?             # zero-fill right shift
    -   | ([-+:])\1         # doubles
    -   | ([&|<>])\2=?      # logic / shift
    -   | \?(\.|::)         # soak access
    -   | \.{2,3}           # range or splat
    -) ///
    +HEREDOC    = /// ^ ("""|''') ([\s\S]*?) (?:\n[^\n\S]*)? \1 ///
     
    -WHITESPACE = /^[^\n\S]+/
    +OPERATOR   = /// ^ (
    +  ?: [-=]>             # function
    +   | [-+*/%<>&|^!?=]=  # compound assign / compare
    +   | >>>=?             # zero-fill right shift
    +   | ([-+:])\1         # doubles
    +   | ([&|<>])\2=?      # logic / shift
    +   | \?(\.|::)         # soak access
    +   | \.{2,3}           # range or splat
    +) ///
     
    -COMMENT    = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/
    +WHITESPACE = /^[^\n\S]+/
     
    -LITERATE   = /^([ ]{4}|\t)/
    +COMMENT    = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/
     
    -CODE       = /^[-=]>/
    +CODE       = /^[-=]>/
     
    -MULTI_DENT = /^(?:\n[^\n\S]*)+/
    +MULTI_DENT = /^(?:\n[^\n\S]*)+/
     
    -SIMPLESTR  = /^'[^\\']*(?:\\.[^\\']*)*'/
    +SIMPLESTR  = /^'[^\\']*(?:\\.[^\\']*)*'/
     
    -JSTOKEN    = /^`[^\\`]*(?:\\.[^\\`]*)*`/
  • 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)
    -///
    +JSTOKEN    = /^`[^\\`]*(?:\\.[^\\`]*)*`/
    + + + + +
  • +
    + +
    + +
    +

    Regex-matching-regexes. +

    -HEREGEX = /// ^ /{3} ([\s\S]+?) /{3} ([imgy]{0,4}) (?!\w) /// +
    + +
    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)
    +///
     
    -HEREGEX_OMIT = /\s+(?:#.*)?/g
  • Token cleaning regexes.

    MULTILINER      = /\n/g
    +HEREGEX      = /// ^ /{3} ([\s\S]+?) /{3} ([imgy]{0,4}) (?!\w) ///
     
    -HEREDOC_INDENT  = /\n+([^\n\S]*)/g
    +HEREGEX_OMIT = /\s+(?:#.*)?/g
    + + + + +
  • +
    + +
    + +
    +

    Token cleaning regexes. +

    -HEREDOC_ILLEGAL = /\*\// +
    + +
    MULTILINER      = /\n/g
     
    -LINE_CONTINUER  = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) ///
    +HEREDOC_INDENT  = /\n+([^\n\S]*)/g
     
    -TRAILING_SPACES = /\s+$/
  • Compound assignment tokens.

    COMPOUND_ASSIGN = [
    -  '-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='
    -]

    Unary tokens.

    UNARY   = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']

    Logical tokens.

    LOGIC   = ['&&', '||', '&', '|', '^']

    Bit-shifting tokens.

    SHIFT   = ['<<', '>>', '>>>']

    Comparison tokens.

    COMPARE = ['==', '!=', '<', '>', '<=', '>=']

    Mathematical tokens.

    MATH    = ['*', '/', '%']

    Relational tokens that are negatable with not prefix.

    RELATION = ['IN', 'OF', 'INSTANCEOF']

    Boolean tokens.

    BOOL = ['TRUE', 'FALSE']

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

    +HEREDOC_ILLEGAL = /\*\// -

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

    +LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) /// -

    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 +TRAILING_SPACES = /\s+$/ + + + + +

  • +
    + +
    + +
    +

    Compound assignment tokens. +

    + +
    + +
    COMPOUND_ASSIGN = [
    +  '-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='
    +]
    + +
  • + + +
  • +
    + +
    + +
    +

    Unary tokens. +

    + +
    + +
    UNARY   = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']
    + +
  • + + +
  • +
    + +
    + +
    +

    Logical tokens. +

    + +
    + +
    LOGIC   = ['&&', '||', '&', '|', '^']
    + +
  • + + +
  • +
    + +
    + +
    +

    Bit-shifting tokens. +

    + +
    + +
    SHIFT   = ['<<', '>>', '>>>']
    + +
  • + + +
  • +
    + +
    + +
    +

    Comparison tokens. +

    + +
    + +
    COMPARE = ['==', '!=', '<', '>', '<=', '>=']
    + +
  • + + +
  • +
    + +
    + +
    +

    Mathematical tokens. +

    + +
    + +
    MATH    = ['*', '/', '%']
    + +
  • + + +
  • +
    + +
    + +
    +

    Relational tokens that are negatable with not prefix. +

    + +
    + +
    RELATION = ['IN', 'OF', 'INSTANCEOF']
    + +
  • + + +
  • +
    + +
    + +
    +

    Boolean tokens. +

    + +
    + +
    BOOL = ['TRUE', 'FALSE']
    + +
  • + + +
  • +
    + +
    + +
    +

    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 -of a function invocation or indexing operation.

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

    Tokens that, when immediately preceding a WHEN, indicate that the WHEN +of a function invocation or indexing operation. +

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

    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 -avoid an ambiguity in the grammar.

  • LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']
    +avoid an ambiguity in the grammar.
    +

    -
    \ No newline at end of file + + +
    LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']
    + + + + + + + diff --git a/documentation/docs/nodes.html b/documentation/docs/nodes.html index d2ce4538ab..14e83767ba 100644 --- a/documentation/docs/nodes.html +++ b/documentation/docs/nodes.html @@ -1,25 +1,259 @@ - nodes.coffee

    nodes.coffee

    nodes.coffee contains all of the node classes for the syntax tree. Most + + + + + nodes.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      nodes.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      nodes.coffee contains all of the node classes for the syntax tree. Most nodes are created as the result of actions in the grammar, but some are created by other nodes as a method of code generation. To convert -the syntax tree into a string of JavaScript code, call compile() on the root.

    Error.stackTraceLimit = Infinity
    -
    -{Scope} = require './scope'
    -{RESERVED, STRICT_PROSCRIBED} = require './lexer'

    Import the helpers we plan to use.

    {compact, flatten, extend, merge, del, starts, ends, last, some, addLocationDataFn, locationDataToString} = require './helpers'

    Functions required by parser

    exports.extend = extend
    -exports.addLocationDataFn = addLocationDataFn

    Constant functions for nodes that don't need customization.

    YES     = -> yes
    -NO      = -> no
    -THIS    = -> this
    -NEGATE  = -> @negated = not @negated; this

    CodeFragment

    The various nodes defined below all compile to a collection of CodeFragment objects. +the syntax tree into a string of JavaScript code, call compile() on the root. +

    + + + +
    +Error.stackTraceLimit = Infinity
    +
    +{Scope} = require './scope'
    +{RESERVED, STRICT_PROSCRIBED} = require './lexer'
    + + + + +
  • +
    + +
    + +
    +

    Import the helpers we plan to use. +

    + +
    + +
    {compact, flatten, extend, merge, del, starts, ends, last, some,
    +addLocationDataFn, locationDataToString, throwSyntaxError} = require './helpers'
    + +
  • + + +
  • +
    + +
    + +
    +

    Functions required by parser +

    + +
    + +
    exports.extend = extend
    +exports.addLocationDataFn = addLocationDataFn
    + +
  • + + +
  • +
    + +
    + +
    +

    Constant functions for nodes that don't need customization. +

    + +
    + +
    YES     = -> yes
    +NO      = -> no
    +THIS    = -> this
    +NEGATE  = -> @negated = not @negated; this
    + +
  • + + +
  • +
    + +
    + +
    +

    CodeFragment

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The various nodes defined below all compile to a collection of CodeFragment objects. A CodeFragments is a block of generated code, and the location in the source file where the code came from. CodeFragments can be assembled together into working code just by catting together -all the CodeFragments' code snippets, in order.

  • exports.CodeFragment = class CodeFragment
    -  constructor: (parent, code) ->
    -    @code = "#{code}"
    -    @locationData = parent?.locationData
    -    @type = parent?.constructor?.name or 'unknown'
    -
    -  toString: () ->
    -    "#{@code}#{[if @locationData then ": " + locationDataToString(@locationData)]}"

    Convert an array of CodeFragments into a string.

    fragmentsToText = (fragments) ->
    -  (fragment.code for fragment in fragments).join('')

    Base

    The Base is the abstract base class for all nodes in the syntax tree. +all the CodeFragments' code snippets, in order. +

    + + + +
    exports.CodeFragment = class CodeFragment
    +  constructor: (parent, code) ->
    +    @code = "#{code}"
    +    @locationData = parent?.locationData
    +    @type = parent?.constructor?.name or 'unknown'
    +
    +  toString:   ->
    +    "#{@code}#{if @locationData then ": " + locationDataToString(@locationData) else ''}"
    + + + + +
  • +
    + +
    + +
    +

    Convert an array of CodeFragments into a string. +

    + +
    + +
    fragmentsToText = (fragments) ->
    +  (fragment.code for fragment in fragments).join('')
    + +
  • + + +
  • +
    + +
    + +
    +

    Base

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The Base is the abstract base class for all nodes in the syntax tree. Each subclass implements the compileNode method, which performs the code generation for that node. To compile a node to JavaScript, call compile on it, which wraps compileNode in some generic extra smarts, @@ -27,1699 +261,4284 @@ An options hash is passed and cloned throughout, containing information about the environment from higher in the tree (such as if a returned value is being requested by the surrounding function), information about the current -scope, and indentation level.

  • exports.Base = class Base
    -
    -  compile: (o, lvl) ->
    -    fragmentsToText @compileToFragments o, lvl

    Common logic for determining whether to wrap this node in a closure before +scope, and indentation level. +

    + + + +
    exports.Base = class Base
    +
    +  compile: (o, lvl) ->
    +    fragmentsToText @compileToFragments o, lvl
    + + + + +
  • +
    + +
    + +
    +

    Common logic for determining whether to wrap this node in a closure before compiling it, or to compile directly. We need to wrap if this node is a -statement, and it's not a pureStatement, and we're not at -the top level of a block (which would be unnecessary), and we haven't +statement, and it's not a pureStatement, and we're not at +the top level of a block (which would be unnecessary), and we haven't already been asked to return the result (because statements know how to -return results).

  •   compileToFragments: (o, lvl) ->
    -    o        = extend {}, o
    -    o.level  = lvl if lvl
    -    node     = @unfoldSoak(o) or this
    -    node.tab = o.indent
    -    if o.level is LEVEL_TOP or not node.isStatement(o)
    -      node.compileNode o
    -    else
    -      node.compileClosure o

    Statements converted into expressions via closure-wrapping share a scope -object with their parent closure, to preserve the expected lexical scope.

      compileClosure: (o) ->
    -    if @jumps()
    -      throw SyntaxError 'cannot use a pure statement in an expression.'
    -    o.sharedScope = yes
    -    Closure.wrap(this).compileNode o

    If the code generation wishes to use the result of a complex expression +return results). +

    + + + +
      compileToFragments: (o, lvl) ->
    +    o        = extend {}, o
    +    o.level  = lvl if lvl
    +    node     = @unfoldSoak(o) or this
    +    node.tab = o.indent
    +    if o.level is LEVEL_TOP or not node.isStatement(o)
    +      node.compileNode o
    +    else
    +      node.compileClosure o
    + + + + +
  • +
    + +
    + +
    +

    Statements converted into expressions via closure-wrapping share a scope +object with their parent closure, to preserve the expected lexical scope. +

    + +
    + +
      compileClosure: (o) ->
    +    if jumpNode = @jumps()
    +      jumpNode.error 'cannot use a pure statement in an expression'
    +    o.sharedScope = yes
    +    Closure.wrap(this).compileNode o
    + +
  • + + +
  • +
    + +
    + +
    +

    If the code generation wishes to use the result of a complex expression in multiple places, ensure that the expression is only ever evaluated once, -by assigning it to a temporary variable. Pass a level to precompile.

    +by assigning it to a temporary variable. Pass a level to precompile. +

    If level is passed, then returns [val, ref], where val is the compiled value, and ref is the compiled reference. If level is not passed, this returns [val, ref] where -the two values are raw nodes which have not been compiled.

  •   cache: (o, level, reused) ->
    -    unless @isComplex()
    -      ref = if level then @compileToFragments o, level else this
    -      [ref, ref]
    -    else
    -      ref = new Literal reused or o.scope.freeVariable 'ref'
    -      sub = new Assign ref, this
    -      if level then [sub.compileToFragments(o, level), [@makeCode(ref.value)]] else [sub, ref]
    -
    -  cacheToCodeFragments: (cacheValues) ->
    -    [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]

    Construct a node that returns the current node's result. +the two values are raw nodes which have not been compiled. +

    + + + +
      cache: (o, level, reused) ->
    +    unless @isComplex()
    +      ref = if level then @compileToFragments o, level else this
    +      [ref, ref]
    +    else
    +      ref = new Literal reused or o.scope.freeVariable 'ref'
    +      sub = new Assign ref, this
    +      if level then [sub.compileToFragments(o, level), [@makeCode(ref.value)]] else [sub, ref]
    +
    +  cacheToCodeFragments: (cacheValues) ->
    +    [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]
    + + + + +
  • +
    + +
    + +
    +

    Construct a node that returns the current node's result. Note that this is overridden for smarter behavior for -many statement nodes (e.g. If, For)...

  •   makeReturn: (res) ->
    -    me = @unwrapAll()
    -    if res
    -      new Call new Literal("#{res}.push"), [me]
    -    else
    -      new Return me

    Does this node, or any of its children, contain a node of a certain kind? -Recursively traverses down the children of the nodes, yielding to a block -and returning true when the block finds a match. contains does not cross -scope boundaries.

      contains: (pred) ->
    -    contains = no
    -    @traverseChildren no, (node) ->
    -      if pred node
    -        contains = yes
    -        return no
    -    contains

    Is this node of a certain type, or does it contain the type?

      containsType: (type) ->
    -    this instanceof type or @contains (node) -> node instanceof type

    Pull out the last non-comment node of a node list.

      lastNonComment: (list) ->
    -    i = list.length
    -    return list[i] while i-- when list[i] not instanceof Comment
    -    null

    toString representation of the node, for inspecting the parse tree. -This is what coffee --nodes prints out.

      toString: (idt = '', name = @constructor.name) ->
    -    location = if @locationData then locationDataToString @locationData else "??"
    -    tree = '\n' + idt + location + ": " + name
    -    tree += '?' if @soak
    -    @eachChild (node) -> tree += node.toString idt + TAB
    -    tree

    Passes each child to a function, breaking when the function returns false.

      eachChild: (func) ->
    -    return this unless @children
    -    for attr in @children when @[attr]
    -      for child in flatten [@[attr]]
    -        return this if func(child) is false
    -    this
    -
    -  traverseChildren: (crossScope, func) ->
    -    @eachChild (child) ->
    -      return false if func(child) is false
    -      child.traverseChildren crossScope, func
    -
    -  invert: ->
    -    new Op '!', this
    -
    -  unwrapAll: ->
    -    node = this
    -    continue until node is node = node.unwrap()
    -    node

    Default implementations of the common node properties and methods. Nodes -will override these with custom logic, if needed.

      children: []
    -
    -  isStatement     : NO
    -  jumps           : NO
    -  isComplex       : YES
    -  isChainable     : NO
    -  isAssignable    : NO
    -
    -  unwrap     : THIS
    -  unfoldSoak : NO

    Is this node used to assign a certain variable?

      assigns: NO

    For this node and all descendents, set the location data to locationData if the location -data is not already set.

      updateLocationDataIfMissing: (locationData) ->
    -    if not @locationData
    -      @locationData = {}
    -      extend @locationData, locationData
    -
    -    @eachChild (child) ->
    -      child.updateLocationDataIfMissing locationData
    -
    -  makeCode: (code) ->
    -    new CodeFragment this, code
    -
    -  wrapInBraces: (fragments) ->
    -    [].concat @makeCode('('), fragments, @makeCode(')')

    fragmentsList is an array of arrays of fragments. Each array in fragmentsList will be +many statement nodes (e.g. If, For)... +

    + + + +
      makeReturn: (res) ->
    +    me = @unwrapAll()
    +    if res
    +      new Call new Literal("#{res}.push"), [me]
    +    else
    +      new Return me
    + + + + +
  • +
    + +
    + +
    +

    Does this node, or any of its children, contain a node of a certain kind? +Recursively traverses down the children nodes and returns the first one +that verifies pred. Otherwise return undefined. contains does not cross +scope boundaries. +

    + +
    + +
      contains: (pred) ->
    +    node = undefined
    +    @traverseChildren no, (n) ->
    +      if pred n
    +        node = n
    +        return no
    +    node
    + +
  • + + +
  • +
    + +
    + +
    +

    Pull out the last non-comment node of a node list. +

    + +
    + +
      lastNonComment: (list) ->
    +    i = list.length
    +    return list[i] while i-- when list[i] not instanceof Comment
    +    null
    + +
  • + + +
  • +
    + +
    + +
    +

    toString representation of the node, for inspecting the parse tree. +This is what coffee --nodes prints out. +

    + +
    + +
      toString: (idt = '', name = @constructor.name) ->
    +    tree = '\n' + idt + name
    +    tree += '?' if @soak
    +    @eachChild (node) -> tree += node.toString idt + TAB
    +    tree
    + +
  • + + +
  • +
    + +
    + +
    +

    Passes each child to a function, breaking when the function returns false. +

    + +
    + +
      eachChild: (func) ->
    +    return this unless @children
    +    for attr in @children when @[attr]
    +      for child in flatten [@[attr]]
    +        return this if func(child) is false
    +    this
    +
    +  traverseChildren: (crossScope, func) ->
    +    @eachChild (child) ->
    +      recur = func(child)
    +      child.traverseChildren(crossScope, func) unless recur is no
    +
    +  invert: ->
    +    new Op '!', this
    +
    +  unwrapAll: ->
    +    node = this
    +    continue until node is node = node.unwrap()
    +    node
    + +
  • + + +
  • +
    + +
    + +
    +

    Default implementations of the common node properties and methods. Nodes +will override these with custom logic, if needed. +

    + +
    + +
      children: []
    +
    +  isStatement     : NO
    +  jumps           : NO
    +  isComplex       : YES
    +  isChainable     : NO
    +  isAssignable    : NO
    +
    +  unwrap     : THIS
    +  unfoldSoak : NO
    + +
  • + + +
  • +
    + +
    + +
    +

    Is this node used to assign a certain variable? +

    + +
    + +
      assigns: NO
    + +
  • + + +
  • +
    + +
    + +
    +

    For this node and all descendents, set the location data to locationData +if the location data is not already set. +

    + +
    + +
      updateLocationDataIfMissing: (locationData) ->
    +    @locationData or= locationData
    +
    +    @eachChild (child) ->
    +      child.updateLocationDataIfMissing locationData
    + +
  • + + +
  • +
    + +
    + +
    +

    Throw a SyntaxError associated with this node's location. +

    + +
    + +
      error: (message) ->
    +    throwSyntaxError message, @locationData
    +
    +  makeCode: (code) ->
    +    new CodeFragment this, code
    +
    +  wrapInBraces: (fragments) ->
    +    [].concat @makeCode('('), fragments, @makeCode(')')
    + +
  • + + +
  • +
    + +
    + +
    +

    fragmentsList is an array of arrays of fragments. Each array in fragmentsList will be concatonated together, with joinStr added in between each, to produce a final flat array -of fragments.

  •   joinFragmentArrays: (fragmentsList, joinStr) ->
    -    answer = []
    -    for fragments,i in fragmentsList
    -      if i then answer.push @makeCode joinStr
    -      answer = answer.concat fragments
    -    answer

    Block

    The block is the list of expressions that forms the body of an +of fragments. +

    + + + +
      joinFragmentArrays: (fragmentsList, joinStr) ->
    +    answer = []
    +    for fragments,i in fragmentsList
    +      if i then answer.push @makeCode joinStr
    +      answer = answer.concat fragments
    +    answer
    + + + + +
  • +
    + +
    + +
    +

    Block

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The block is the list of expressions that forms the body of an indented block of code -- the implementation of a function, a clause in an -if, switch, or try, and so on...

  • exports.Block = class Block extends Base
    -  constructor: (nodes) ->
    -    @expressions = compact flatten nodes or []
    -
    -  children: ['expressions']

    Tack an expression on to the end of this expression list.

      push: (node) ->
    -    @expressions.push node
    -    this

    Remove and return the last expression of this expression list.

      pop: ->
    -    @expressions.pop()

    Add an expression at the beginning of this expression list.

      unshift: (node) ->
    -    @expressions.unshift node
    -    this

    If this Block consists of just a single node, unwrap it by pulling -it back out.

      unwrap: ->
    -    if @expressions.length is 1 then @expressions[0] else this

    Is this an empty block of code?

      isEmpty: ->
    -    not @expressions.length
    -
    -  isStatement: (o) ->
    -    for exp in @expressions when exp.isStatement o
    -      return yes
    -    no
    -
    -  jumps: (o) ->
    -    for exp in @expressions
    -      return exp if exp.jumps o

    A Block node does not return its entire body, rather it -ensures that the final expression is returned.

      makeReturn: (res) ->
    -    len = @expressions.length
    -    while len--
    -      expr = @expressions[len]
    -      if expr not instanceof Comment
    -        @expressions[len] = expr.makeReturn res
    -        @expressions.splice(len, 1) if expr instanceof Return and not expr.expression
    -        break
    -    this

    A Block is the only node that can serve as the root.

      compileToFragments: (o = {}, level) ->
    -    if o.scope then super o, level else @compileRoot o

    Compile all expressions within the Block body. If we need to -return the result, and it's an expression, simply return it. If it's a -statement, ask the statement to do so.

      compileNode: (o) ->
    -    @tab  = o.indent
    -    top   = o.level is LEVEL_TOP
    -    compiledNodes = []
    -
    -    for node, index in @expressions
    -
    -      node = node.unwrapAll()
    -      node = (node.unfoldSoak(o) or node)
    -      if node instanceof Block

    This is a nested block. We don't do anything special here like enclose +if, switch, or try, and so on... +

    + + + +
    exports.Block = class Block extends Base
    +  constructor: (nodes) ->
    +    @expressions = compact flatten nodes or []
    +
    +  children: ['expressions']
    + + + + +
  • +
    + +
    + +
    +

    Tack an expression on to the end of this expression list. +

    + +
    + +
      push: (node) ->
    +    @expressions.push node
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    Remove and return the last expression of this expression list. +

    + +
    + +
      pop: ->
    +    @expressions.pop()
    + +
  • + + +
  • +
    + +
    + +
    +

    Add an expression at the beginning of this expression list. +

    + +
    + +
      unshift: (node) ->
    +    @expressions.unshift node
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    If this Block consists of just a single node, unwrap it by pulling +it back out. +

    + +
    + +
      unwrap: ->
    +    if @expressions.length is 1 then @expressions[0] else this
    + +
  • + + +
  • +
    + +
    + +
    +

    Is this an empty block of code? +

    + +
    + +
      isEmpty: ->
    +    not @expressions.length
    +
    +  isStatement: (o) ->
    +    for exp in @expressions when exp.isStatement o
    +      return yes
    +    no
    +
    +  jumps: (o) ->
    +    for exp in @expressions
    +      return exp if exp.jumps o
    + +
  • + + +
  • +
    + +
    + +
    +

    A Block node does not return its entire body, rather it +ensures that the final expression is returned. +

    + +
    + +
      makeReturn: (res) ->
    +    len = @expressions.length
    +    while len--
    +      expr = @expressions[len]
    +      if expr not instanceof Comment
    +        @expressions[len] = expr.makeReturn res
    +        @expressions.splice(len, 1) if expr instanceof Return and not expr.expression
    +        break
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    A Block is the only node that can serve as the root. +

    + +
    + +
      compileToFragments: (o = {}, level) ->
    +    if o.scope then super o, level else @compileRoot o
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile all expressions within the Block body. If we need to +return the result, and it's an expression, simply return it. If it's a +statement, ask the statement to do so. +

    + +
    + +
      compileNode: (o) ->
    +    @tab  = o.indent
    +    top   = o.level is LEVEL_TOP
    +    compiledNodes = []
    +
    +    for node, index in @expressions
    +
    +      node = node.unwrapAll()
    +      node = (node.unfoldSoak(o) or node)
    +      if node instanceof Block
    + +
  • + + +
  • +
    + +
    + +
    +

    This is a nested block. We don't do anything special here like enclose it in a new scope; we just compile the statements in this block along with -our own

  •         compiledNodes.push node.compileNode o
    -      else if top
    -        node.front = true
    -        fragments = node.compileToFragments o
    -        unless node.isStatement o
    -          fragments.unshift @makeCode "#{@tab}"
    -          fragments.push @makeCode ";"
    -        compiledNodes.push fragments
    -      else
    -        compiledNodes.push node.compileToFragments o, LEVEL_LIST
    -    if top
    -      if @spaced
    -        return [].concat @makeCode("\n"), @joinFragmentArrays(compiledNodes, '\n\n'), @makeCode("\n")
    -      else
    -        return @joinFragmentArrays(compiledNodes, '\n')
    -    if compiledNodes.length
    -      answer = @joinFragmentArrays(compiledNodes, ', ')
    -    else
    -      answer = [@makeCode "void 0"]
    -    if compiledNodes.length > 1 and o.level >= LEVEL_LIST then @wrapInBraces answer else answer

    If we happen to be the top-level Block, wrap everything in +our own +

    + + + +
            compiledNodes.push node.compileNode o
    +      else if top
    +        node.front = true
    +        fragments = node.compileToFragments o
    +        unless node.isStatement o
    +          fragments.unshift @makeCode "#{@tab}"
    +          fragments.push @makeCode ";"
    +        compiledNodes.push fragments
    +      else
    +        compiledNodes.push node.compileToFragments o, LEVEL_LIST
    +    if top
    +      if @spaced
    +        return [].concat @joinFragmentArrays(compiledNodes, '\n\n'), @makeCode("\n")
    +      else
    +        return @joinFragmentArrays(compiledNodes, '\n')
    +    if compiledNodes.length
    +      answer = @joinFragmentArrays(compiledNodes, ', ')
    +    else
    +      answer = [@makeCode "void 0"]
    +    if compiledNodes.length > 1 and o.level >= LEVEL_LIST then @wrapInBraces answer else answer
    + + + + +
  • +
    + +
    + +
    +

    If we happen to be the top-level Block, wrap everything in a safety closure, unless requested not to. It would be better not to generate them in the first place, but for now, -clean up obvious double-parentheses.

  •   compileRoot: (o) ->
    -    o.indent  = if o.bare then '' else TAB
    -    o.scope   = new Scope null, this, null
    -    o.level   = LEVEL_TOP
    -    @spaced   = yes
    -    prelude   = []
    -    unless o.bare
    -      preludeExps = for exp, i in @expressions
    -        break unless exp.unwrap() instanceof Comment
    -        exp
    -      rest = @expressions[preludeExps.length...]
    -      @expressions = preludeExps
    -      if preludeExps.length
    -        prelude = @compileNode merge(o, indent: '')
    -        prelude.push @makeCode "\n"
    -      @expressions = rest
    -    fragments = @compileWithDeclarations o
    -    return fragments if o.bare
    -    [].concat prelude, @makeCode("(function() {\n"), fragments, @makeCode("\n}).call(this);\n")

    Compile the expressions body for the contents of a function, with -declarations of all inner variables pushed up to the top.

      compileWithDeclarations: (o) ->
    -    fragments = []
    -    post = []
    -    for exp, i in @expressions
    -      exp = exp.unwrap()
    -      break unless exp instanceof Comment or exp instanceof Literal
    -    o = merge(o, level: LEVEL_TOP)
    -    if i
    -      rest = @expressions.splice i, 9e9
    -      [spaced,    @spaced] = [@spaced, no]
    -      [fragments, @spaced] = [(@compileNode o), spaced]
    -      @expressions = rest
    -    post = @compileNode o
    -    {scope} = o
    -    if scope.expressions is this
    -      declars = o.scope.hasDeclarations()
    -      assigns = scope.hasAssignments
    -      if declars or assigns
    -        fragments.push @makeCode '\n' if i
    -        fragments.push @makeCode "#{@tab}var "
    -        if declars
    -          fragments.push @makeCode(scope.declaredVariables().join ', ')
    -        if assigns
    -          fragments.push @makeCode ",\n#{@tab + TAB}" if declars
    -          fragments.push @makeCode (scope.assignedVariables().join ",\n#{@tab + TAB}")
    -        fragments.push @makeCode ';\n'
    -    fragments.concat post

    Wrap up the given nodes as a Block, unless it already happens -to be one.

      @wrap: (nodes) ->
    -    return nodes[0] if nodes.length is 1 and nodes[0] instanceof Block
    -    new Block nodes

    Literal

    Literals are static values that can be passed through directly into +clean up obvious double-parentheses. +

    + + + +
      compileRoot: (o) ->
    +    o.indent  = if o.bare then '' else TAB
    +    o.level   = LEVEL_TOP
    +    @spaced   = yes
    +    o.scope   = new Scope null, this, null
    + + + + +
  • +
    + +
    + +
    +

    Mark given local variables in the root scope as parameters so they don't +end up being declared on this block. +

    + +
    + +
        o.scope.parameter name for name in o.locals or []
    +    prelude   = []
    +    unless o.bare
    +      preludeExps = for exp, i in @expressions
    +        break unless exp.unwrap() instanceof Comment
    +        exp
    +      rest = @expressions[preludeExps.length...]
    +      @expressions = preludeExps
    +      if preludeExps.length
    +        prelude = @compileNode merge(o, indent: '')
    +        prelude.push @makeCode "\n"
    +      @expressions = rest
    +    fragments = @compileWithDeclarations o
    +    return fragments if o.bare
    +    [].concat prelude, @makeCode("(function() {\n"), fragments, @makeCode("\n}).call(this);\n")
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile the expressions body for the contents of a function, with +declarations of all inner variables pushed up to the top. +

    + +
    + +
      compileWithDeclarations: (o) ->
    +    fragments = []
    +    post = []
    +    for exp, i in @expressions
    +      exp = exp.unwrap()
    +      break unless exp instanceof Comment or exp instanceof Literal
    +    o = merge(o, level: LEVEL_TOP)
    +    if i
    +      rest = @expressions.splice i, 9e9
    +      [spaced,    @spaced] = [@spaced, no]
    +      [fragments, @spaced] = [@compileNode(o), spaced]
    +      @expressions = rest
    +    post = @compileNode o
    +    {scope} = o
    +    if scope.expressions is this
    +      declars = o.scope.hasDeclarations()
    +      assigns = scope.hasAssignments
    +      if declars or assigns
    +        fragments.push @makeCode '\n' if i
    +        fragments.push @makeCode "#{@tab}var "
    +        if declars
    +          fragments.push @makeCode scope.declaredVariables().join(', ')
    +        if assigns
    +          fragments.push @makeCode ",\n#{@tab + TAB}" if declars
    +          fragments.push @makeCode scope.assignedVariables().join(",\n#{@tab + TAB}")
    +        fragments.push @makeCode ";\n#{if @spaced then '\n' else ''}"
    +      else if fragments.length and post.length
    +        fragments.push @makeCode "\n"
    +    fragments.concat post
    + +
  • + + +
  • +
    + +
    + +
    +

    Wrap up the given nodes as a Block, unless it already happens +to be one. +

    + +
    + +
      @wrap: (nodes) ->
    +    return nodes[0] if nodes.length is 1 and nodes[0] instanceof Block
    +    new Block nodes
    + +
  • + + +
  • +
    + +
    + +
    +

    Literal

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Literals are static values that can be passed through directly into JavaScript without translation, such as: strings, numbers, -true, false, null...

  • exports.Literal = class Literal extends Base
    -  constructor: (@value) ->
    -
    -  makeReturn: ->
    -    if @isStatement() then this else super
    -
    -  isAssignable: ->
    -    IDENTIFIER.test @value
    -
    -  isStatement: ->
    -    @value in ['break', 'continue', 'debugger']
    -
    -  isComplex: NO
    -
    -  assigns: (name) ->
    -    name is @value
    -
    -  jumps: (o) ->
    -    return this if @value is 'break' and not (o?.loop or o?.block)
    -    return this if @value is 'continue' and not o?.loop
    -
    -  compileNode: (o) ->
    -    code = if @value is 'this'
    -      if o.scope.method?.bound then o.scope.method.context else @value
    -    else if @value.reserved
    -      "\"#{@value}\""
    -    else
    -      @value
    -    answer = if @isStatement() then "#{@tab}#{code};" else code
    -    [@makeCode answer]
    -
    -  toString: ->
    -    ' "' + @value + '"'
    -
    -class exports.Undefined extends Base
    -  isAssignable: NO
    -  isComplex: NO
    -  compileNode: (o) ->
    -    [@makeCode if o.level >= LEVEL_ACCESS then '(void 0)' else 'void 0']
    -
    -class exports.Null extends Base
    -  isAssignable: NO
    -  isComplex: NO
    -  compileNode: -> [@makeCode "null"]
    -
    -class exports.Bool extends Base
    -  isAssignable: NO
    -  isComplex: NO
    -  compileNode: -> [@makeCode @val]
    -  constructor: (@val) ->

    Return

    A return is a pureStatement -- wrapping it in a closure wouldn't -make sense.

    exports.Return = class Return extends Base
    -  constructor: (expr) ->
    -    @expression = expr if expr and not expr.unwrap().isUndefined
    -
    -  children: ['expression']
    -
    -  isStatement:     YES
    -  makeReturn:      THIS
    -  jumps:           THIS
    -
    -  compileToFragments: (o, level) ->
    -    expr = @expression?.makeReturn()
    -    if expr and expr not instanceof Return then expr.compileToFragments o, level else super o, level
    -
    -  compileNode: (o) ->
    -    answer = []

    TODO: If we call expression.compile() here twice, we'll sometimes get back different results!

        answer.push @makeCode(@tab + "return#{[" " if @expression]}")
    -    if @expression
    -      answer = answer.concat @expression.compileToFragments(o, LEVEL_PAREN)
    -    answer.push @makeCode ";"
    -    return answer

    Value

    A value, variable or literal or parenthesized, indexed or dotted into, -or vanilla.

    exports.Value = class Value extends Base
    -  constructor: (base, props, tag) ->
    -    return base if not props and base instanceof Value
    -    @base       = base
    -    @properties = props or []
    -    @[tag]      = true if tag
    -    return this
    -
    -  children: ['base', 'properties']

    Add a property (or properties ) Access to the list.

      add: (props) ->
    -    @properties = @properties.concat props
    -    this
    -
    -  hasProperties: ->
    -    !!@properties.length

    Some boolean checks for the benefit of other nodes.

      isArray        : -> not @properties.length and @base instanceof Arr
    -  isComplex      : -> @hasProperties() or @base.isComplex()
    -  isAssignable   : -> @hasProperties() or @base.isAssignable()
    -  isSimpleNumber : -> @base instanceof Literal and SIMPLENUM.test @base.value
    -  isString       : -> @base instanceof Literal and IS_STRING.test @base.value
    -  isAtomic       : ->
    -    for node in @properties.concat @base
    -      return no if node.soak or node instanceof Call
    -    yes
    -
    -  isStatement : (o)    -> not @properties.length and @base.isStatement o
    -  assigns     : (name) -> not @properties.length and @base.assigns name
    -  jumps       : (o)    -> not @properties.length and @base.jumps o
    -
    -  isObject: (onlyGenerated) ->
    -    return no if @properties.length
    -    (@base instanceof Obj) and (not onlyGenerated or @base.generated)
    -
    -  isSplice: ->
    -    last(@properties) instanceof Slice

    The value can be unwrapped as its inner node, if there are no attached -properties.

      unwrap: ->
    -    if @properties.length then this else @base

    A reference has base part (this value) and name part. +true, false, null... +

    + + + +
    exports.Literal = class Literal extends Base
    +  constructor: (@value) ->
    +
    +  makeReturn: ->
    +    if @isStatement() then this else super
    +
    +  isAssignable: ->
    +    IDENTIFIER.test @value
    +
    +  isStatement: ->
    +    @value in ['break', 'continue', 'debugger']
    +
    +  isComplex: NO
    +
    +  assigns: (name) ->
    +    name is @value
    +
    +  jumps: (o) ->
    +    return this if @value is 'break' and not (o?.loop or o?.block)
    +    return this if @value is 'continue' and not o?.loop
    +
    +  compileNode: (o) ->
    +    code = if @value is 'this'
    +      if o.scope.method?.bound then o.scope.method.context else @value
    +    else if @value.reserved
    +      "\"#{@value}\""
    +    else
    +      @value
    +    answer = if @isStatement() then "#{@tab}#{code};" else code
    +    [@makeCode answer]
    +
    +  toString: ->
    +    ' "' + @value + '"'
    +
    +class exports.Undefined extends Base
    +  isAssignable: NO
    +  isComplex: NO
    +  compileNode: (o) ->
    +    [@makeCode if o.level >= LEVEL_ACCESS then '(void 0)' else 'void 0']
    +
    +class exports.Null extends Base
    +  isAssignable: NO
    +  isComplex: NO
    +  compileNode: -> [@makeCode "null"]
    +
    +class exports.Bool extends Base
    +  isAssignable: NO
    +  isComplex: NO
    +  compileNode: -> [@makeCode @val]
    +  constructor: (@val) ->
    + + + + +
  • +
    + +
    + +
    +

    Return

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A return is a pureStatement -- wrapping it in a closure wouldn't +make sense. +

    + +
    + +
    exports.Return = class Return extends Base
    +  constructor: (expr) ->
    +    @expression = expr if expr and not expr.unwrap().isUndefined
    +
    +  children: ['expression']
    +
    +  isStatement:     YES
    +  makeReturn:      THIS
    +  jumps:           THIS
    +
    +  compileToFragments: (o, level) ->
    +    expr = @expression?.makeReturn()
    +    if expr and expr not instanceof Return then expr.compileToFragments o, level else super o, level
    +
    +  compileNode: (o) ->
    +    answer = []
    + +
  • + + +
  • +
    + +
    + +
    +

    TODO: If we call expression.compile() here twice, we'll sometimes get back different results! +

    + +
    + +
        answer.push @makeCode @tab + "return#{if @expression then " " else ""}"
    +    if @expression
    +      answer = answer.concat @expression.compileToFragments o, LEVEL_PAREN
    +    answer.push @makeCode ";"
    +    return answer
    + +
  • + + +
  • +
    + +
    + +
    +

    Value

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A value, variable or literal or parenthesized, indexed or dotted into, +or vanilla. +

    + +
    + +
    exports.Value = class Value extends Base
    +  constructor: (base, props, tag) ->
    +    return base if not props and base instanceof Value
    +    @base       = base
    +    @properties = props or []
    +    @[tag]      = true if tag
    +    return this
    +
    +  children: ['base', 'properties']
    + +
  • + + +
  • +
    + +
    + +
    +

    Add a property (or properties ) Access to the list. +

    + +
    + +
      add: (props) ->
    +    @properties = @properties.concat props
    +    this
    +
    +  hasProperties: ->
    +    !!@properties.length
    + +
  • + + +
  • +
    + +
    + +
    +

    Some boolean checks for the benefit of other nodes. +

    + +
    + +
      isArray        : -> not @properties.length and @base instanceof Arr
    +  isComplex      : -> @hasProperties() or @base.isComplex()
    +  isAssignable   : -> @hasProperties() or @base.isAssignable()
    +  isSimpleNumber : -> @base instanceof Literal and SIMPLENUM.test @base.value
    +  isString       : -> @base instanceof Literal and IS_STRING.test @base.value
    +  isAtomic       : ->
    +    for node in @properties.concat @base
    +      return no if node.soak or node instanceof Call
    +    yes
    +
    +  isStatement : (o)    -> not @properties.length and @base.isStatement o
    +  assigns     : (name) -> not @properties.length and @base.assigns name
    +  jumps       : (o)    -> not @properties.length and @base.jumps o
    +
    +  isObject: (onlyGenerated) ->
    +    return no if @properties.length
    +    (@base instanceof Obj) and (not onlyGenerated or @base.generated)
    +
    +  isSplice: ->
    +    last(@properties) instanceof Slice
    + +
  • + + +
  • +
    + +
    + +
    +

    The value can be unwrapped as its inner node, if there are no attached +properties. +

    + +
    + +
      unwrap: ->
    +    if @properties.length then this else @base
    + +
  • + + +
  • +
    + +
    + +
    +

    A reference has base part (this value) and name part. We cache them separately for compiling complex expressions. -a()[b()] ?= c -> (_base = a())[_name = b()] ? _base[_name] = c

  •   cacheReference: (o) ->
    -    name = last @properties
    -    if @properties.length < 2 and not @base.isComplex() and not name?.isComplex()
    -      return [this, this]  # `a` `a.b`
    -    base = new Value @base, @properties[...-1]
    -    if base.isComplex()  # `a().b`
    -      bref = new Literal o.scope.freeVariable 'base'
    -      base = new Value new Parens new Assign bref, base
    -    return [base, bref] unless name  # `a()`
    -    if name.isComplex()  # `a[b()]`
    -      nref = new Literal o.scope.freeVariable 'name'
    -      name = new Index new Assign nref, name.index
    -      nref = new Index nref
    -    [base.add(name), new Value(bref or base.base, [nref or name])]

    We compile a value to JavaScript by compiling and joining each property. +a()[b()] ?= c -> (_base = a())[_name = b()] ? _base[_name] = c +

    + + + +
      cacheReference: (o) ->
    +    name = last @properties
    +    if @properties.length < 2 and not @base.isComplex() and not name?.isComplex()
    +      return [this, this]  # `a` `a.b`
    +    base = new Value @base, @properties[...-1]
    +    if base.isComplex()  # `a().b`
    +      bref = new Literal o.scope.freeVariable 'base'
    +      base = new Value new Parens new Assign bref, base
    +    return [base, bref] unless name  # `a()`
    +    if name.isComplex()  # `a[b()]`
    +      nref = new Literal o.scope.freeVariable 'name'
    +      name = new Index new Assign nref, name.index
    +      nref = new Index nref
    +    [base.add(name), new Value(bref or base.base, [nref or name])]
    + + + + +
  • +
    + +
    + +
    +

    We compile a value to JavaScript by compiling and joining each property. Things get much more interesting if the chain of properties has soak operators ?. interspersed. Then we have to take care not to accidentally -evaluate anything twice when building the soak chain.

  •   compileNode: (o) ->
    -    @base.front = @front
    -    props = @properties
    -    fragments = @base.compileToFragments o, (if props.length then LEVEL_ACCESS else null)
    -    if (@base instanceof Parens or props.length) and SIMPLENUM.test fragmentsToText fragments
    -      fragments.push @makeCode '.'
    -    for prop in props
    -      fragments.push (prop.compileToFragments o)...
    -    fragments

    Unfold a soak into an If: a?.b -> a.b if a?

      unfoldSoak: (o) ->
    -    @unfoldedSoak ?= do =>
    -      if ifn = @base.unfoldSoak o
    -        ifn.body.properties.push @properties...
    -        return ifn
    -      for prop, i in @properties when prop.soak
    -        prop.soak = off
    -        fst = new Value @base, @properties[...i]
    -        snd = new Value @base, @properties[i..]
    -        if fst.isComplex()
    -          ref = new Literal o.scope.freeVariable 'ref'
    -          fst = new Parens new Assign ref, fst
    -          snd.base = ref
    -        return new If new Existence(fst), snd, soak: on
    -      no

    Comment

    CoffeeScript passes through block comments as JavaScript block comments -at the same position.

    exports.Comment = class Comment extends Base
    -  constructor: (@comment) ->
    -
    -  isStatement:     YES
    -  makeReturn:      THIS
    -
    -  compileNode: (o, level) ->
    -    code = '/*' + multident(@comment, @tab) + "\n#{@tab}*/\n"
    -    code = o.indent + code if (level or o.level) is LEVEL_TOP
    -    [@makeCode code]

    Call

    Node for a function invocation. Takes care of converting super() calls into -calls against the prototype's function of the same name.

    exports.Call = class Call extends Base
    -  constructor: (variable, @args = [], @soak) ->
    -    @isNew    = false
    -    @isSuper  = variable is 'super'
    -    @variable = if @isSuper then null else variable
    -
    -  children: ['variable', 'args']

    Tag this invocation as creating a new instance.

      newInstance: ->
    -    base = @variable?.base or @variable
    -    if base instanceof Call and not base.isNew
    -      base.newInstance()
    -    else
    -      @isNew = true
    -    this

    Grab the reference to the superclass's implementation of the current -method.

      superReference: (o) ->
    -    method = o.scope.namedMethod()
    -    if method?.klass
    -      accesses = [new Access(new Literal '__super__')]
    -      accesses.push new Access new Literal 'constructor' if method.static
    -      accesses.push new Access new Literal method.name
    -      (new Value (new Literal method.klass), accesses).compile o
    -    else if method?.ctor
    -      "#{method.name}.__super__.constructor"
    -    else
    -      throw SyntaxError 'cannot call super outside of an instance method.'

    The appropriate this value for a super call.

      superThis : (o) ->
    -    method = o.scope.method
    -    (method and not method.klass and method.context) or "this"

    Soaked chained invocations unfold into if/else ternary structures.

      unfoldSoak: (o) ->
    -    if @soak
    -      if @variable
    -        return ifn if ifn = unfoldSoak o, this, 'variable'
    -        [left, rite] = new Value(@variable).cacheReference o
    -      else
    -        left = new Literal @superReference o
    -        rite = new Value left
    -      rite = new Call rite, @args
    -      rite.isNew = @isNew
    -      left = new Literal "typeof #{ left.compile o } === \"function\""
    -      return new If left, new Value(rite), soak: yes
    -    call = this
    -    list = []
    -    loop
    -      if call.variable instanceof Call
    -        list.push call
    -        call = call.variable
    -        continue
    -      break unless call.variable instanceof Value
    -      list.push call
    -      break unless (call = call.variable.base) instanceof Call
    -    for call in list.reverse()
    -      if ifn
    -        if call.variable instanceof Call
    -          call.variable = ifn
    -        else
    -          call.variable.base = ifn
    -      ifn = unfoldSoak o, call, 'variable'
    -    ifn

    Compile a vanilla function call.

      compileNode: (o) ->
    -    @variable?.front = @front
    -    compiledArray = Splat.compileSplattedArray o, @args, true
    -    if compiledArray.length
    -      return @compileSplat o, compiledArray
    -    compiledArgs = []
    -    for arg, argIndex in @args
    -      if argIndex then compiledArgs.push @makeCode ", "
    -      compiledArgs.push (arg.compileToFragments o, LEVEL_LIST)...
    -
    -    fragments = []
    -    if @isSuper
    -      preface = @superReference(o) + ".call(#{@superThis(o)}"
    -      if compiledArgs.length then preface += ", "
    -      fragments.push @makeCode preface
    -    else
    -      if @isNew then fragments.push @makeCode 'new '
    -      fragments.push (@variable.compileToFragments(o, LEVEL_ACCESS))...
    -      fragments.push @makeCode "("
    -    fragments.push compiledArgs...
    -    fragments.push @makeCode ")"
    -    fragments

    If you call a function with a splat, it's converted into a JavaScript +evaluate anything twice when building the soak chain. +

    + + + +
      compileNode: (o) ->
    +    @base.front = @front
    +    props = @properties
    +    fragments = @base.compileToFragments o, (if props.length then LEVEL_ACCESS else null)
    +    if (@base instanceof Parens or props.length) and SIMPLENUM.test fragmentsToText fragments
    +      fragments.push @makeCode '.'
    +    for prop in props
    +      fragments.push (prop.compileToFragments o)...
    +    fragments
    + + + + +
  • +
    + +
    + +
    +

    Unfold a soak into an If: a?.b -> a.b if a? +

    + +
    + +
      unfoldSoak: (o) ->
    +    @unfoldedSoak ?= do =>
    +      if ifn = @base.unfoldSoak o
    +        ifn.body.properties.push @properties...
    +        return ifn
    +      for prop, i in @properties when prop.soak
    +        prop.soak = off
    +        fst = new Value @base, @properties[...i]
    +        snd = new Value @base, @properties[i..]
    +        if fst.isComplex()
    +          ref = new Literal o.scope.freeVariable 'ref'
    +          fst = new Parens new Assign ref, fst
    +          snd.base = ref
    +        return new If new Existence(fst), snd, soak: on
    +      no
    + +
  • + + +
  • +
    + +
    + +
    +

    Comment

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    CoffeeScript passes through block comments as JavaScript block comments +at the same position. +

    + +
    + +
    exports.Comment = class Comment extends Base
    +  constructor: (@comment) ->
    +
    +  isStatement:     YES
    +  makeReturn:      THIS
    +
    +  compileNode: (o, level) ->
    +    code = "/*#{multident @comment, @tab}#{if '\n' in @comment then "\n#{@tab}" else ''}*/\n"
    +    code = o.indent + code if (level or o.level) is LEVEL_TOP
    +    [@makeCode code]
    + +
  • + + +
  • +
    + +
    + +
    +

    Call

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Node for a function invocation. Takes care of converting super() calls into +calls against the prototype's function of the same name. +

    + +
    + +
    exports.Call = class Call extends Base
    +  constructor: (variable, @args = [], @soak) ->
    +    @isNew    = false
    +    @isSuper  = variable is 'super'
    +    @variable = if @isSuper then null else variable
    +
    +  children: ['variable', 'args']
    + +
  • + + +
  • +
    + +
    + +
    +

    Tag this invocation as creating a new instance. +

    + +
    + +
      newInstance: ->
    +    base = @variable?.base or @variable
    +    if base instanceof Call and not base.isNew
    +      base.newInstance()
    +    else
    +      @isNew = true
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    Grab the reference to the superclass's implementation of the current +method. +

    + +
    + +
      superReference: (o) ->
    +    method = o.scope.namedMethod()
    +    if method?.klass
    +      accesses = [new Access(new Literal '__super__')]
    +      accesses.push new Access new Literal 'constructor' if method.static
    +      accesses.push new Access new Literal method.name
    +      (new Value (new Literal method.klass), accesses).compile o
    +    else if method?.ctor
    +      "#{method.name}.__super__.constructor"
    +    else
    +      @error 'cannot call super outside of an instance method.'
    + +
  • + + +
  • +
    + +
    + +
    +

    The appropriate this value for a super call. +

    + +
    + +
      superThis : (o) ->
    +    method = o.scope.method
    +    (method and not method.klass and method.context) or "this"
    + +
  • + + +
  • +
    + +
    + +
    +

    Soaked chained invocations unfold into if/else ternary structures. +

    + +
    + +
      unfoldSoak: (o) ->
    +    if @soak
    +      if @variable
    +        return ifn if ifn = unfoldSoak o, this, 'variable'
    +        [left, rite] = new Value(@variable).cacheReference o
    +      else
    +        left = new Literal @superReference o
    +        rite = new Value left
    +      rite = new Call rite, @args
    +      rite.isNew = @isNew
    +      left = new Literal "typeof #{ left.compile o } === \"function\""
    +      return new If left, new Value(rite), soak: yes
    +    call = this
    +    list = []
    +    loop
    +      if call.variable instanceof Call
    +        list.push call
    +        call = call.variable
    +        continue
    +      break unless call.variable instanceof Value
    +      list.push call
    +      break unless (call = call.variable.base) instanceof Call
    +    for call in list.reverse()
    +      if ifn
    +        if call.variable instanceof Call
    +          call.variable = ifn
    +        else
    +          call.variable.base = ifn
    +      ifn = unfoldSoak o, call, 'variable'
    +    ifn
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile a vanilla function call. +

    + +
    + +
      compileNode: (o) ->
    +    @variable?.front = @front
    +    compiledArray = Splat.compileSplattedArray o, @args, true
    +    if compiledArray.length
    +      return @compileSplat o, compiledArray
    +    compiledArgs = []
    +    for arg, argIndex in @args
    +      if argIndex then compiledArgs.push @makeCode ", "
    +      compiledArgs.push (arg.compileToFragments o, LEVEL_LIST)...
    +
    +    fragments = []
    +    if @isSuper
    +      preface = @superReference(o) + ".call(#{@superThis(o)}"
    +      if compiledArgs.length then preface += ", "
    +      fragments.push @makeCode preface
    +    else
    +      if @isNew then fragments.push @makeCode 'new '
    +      fragments.push @variable.compileToFragments(o, LEVEL_ACCESS)...
    +      fragments.push @makeCode "("
    +    fragments.push compiledArgs...
    +    fragments.push @makeCode ")"
    +    fragments
    + +
  • + + +
  • +
    + +
    + +
    +

    If you call a function with a splat, it's converted into a JavaScript .apply() call to allow an array of arguments to be passed. -If it's a constructor, then things get real tricky. We have to inject an -inner constructor in order to be able to pass the varargs.

    - -

    splatArgs is an array of CodeFragments to put into the 'apply'.

  •   compileSplat: (o, splatArgs) ->
    -    if @isSuper
    -      return [].concat @makeCode("#{ @superReference o }.apply(#{@superThis(o)}, "),
    -        splatArgs, @makeCode(")")
    -
    -    if @isNew
    -      idt = @tab + TAB
    -      return [].concat @makeCode("""
    -        (function(func, args, ctor) {
    -        #{idt}ctor.prototype = func.prototype;
    -        #{idt}var child = new ctor, result = func.apply(child, args);
    -        #{idt}return Object(result) === result ? result : child;
    -        #{@tab}})("""),
    -        (@variable.compileToFragments o, LEVEL_LIST),
    -        @makeCode(", "), splatArgs, @makeCode(", function(){})")
    -
    -    answer = []
    -    base = new Value @variable
    -    if (name = base.properties.pop()) and base.isComplex()
    -      ref = o.scope.freeVariable 'ref'
    -      answer = answer.concat @makeCode("(#{ref} = "),
    -        (base.compileToFragments o, LEVEL_LIST),
    -        @makeCode(")"),
    -        name.compileToFragments(o)
    -    else
    -      fun = base.compileToFragments o, LEVEL_ACCESS
    -      fun = @wrapInBraces fun if SIMPLENUM.test fragmentsToText fun
    -      if name
    -        ref = fragmentsToText fun
    -        fun.push (name.compileToFragments o)...
    -      else
    -        ref = 'null'
    -      answer = answer.concat fun
    -    answer = answer.concat @makeCode(".apply(#{ref}, "), splatArgs, @makeCode(")")

    Extends

    Node to extend an object's prototype with an ancestor object. +If it's a constructor, then things get real tricky. We have to inject an +inner constructor in order to be able to pass the varargs. + +

    +

    splatArgs is an array of CodeFragments to put into the 'apply'. +

    + + + +
      compileSplat: (o, splatArgs) ->
    +    if @isSuper
    +      return [].concat @makeCode("#{ @superReference o }.apply(#{@superThis(o)}, "),
    +        splatArgs, @makeCode(")")
    +
    +    if @isNew
    +      idt = @tab + TAB
    +      return [].concat @makeCode("""
    +        (function(func, args, ctor) {
    +        #{idt}ctor.prototype = func.prototype;
    +        #{idt}var child = new ctor, result = func.apply(child, args);
    +        #{idt}return Object(result) === result ? result : child;
    +        #{@tab}})("""),
    +        (@variable.compileToFragments o, LEVEL_LIST),
    +        @makeCode(", "), splatArgs, @makeCode(", function(){})")
    +
    +    answer = []
    +    base = new Value @variable
    +    if (name = base.properties.pop()) and base.isComplex()
    +      ref = o.scope.freeVariable 'ref'
    +      answer = answer.concat @makeCode("(#{ref} = "),
    +        (base.compileToFragments o, LEVEL_LIST),
    +        @makeCode(")"),
    +        name.compileToFragments(o)
    +    else
    +      fun = base.compileToFragments o, LEVEL_ACCESS
    +      fun = @wrapInBraces fun if SIMPLENUM.test fragmentsToText fun
    +      if name
    +        ref = fragmentsToText fun
    +        fun.push (name.compileToFragments o)...
    +      else
    +        ref = 'null'
    +      answer = answer.concat fun
    +    answer = answer.concat @makeCode(".apply(#{ref}, "), splatArgs, @makeCode(")")
    + + + + +
  • +
    + +
    + +
    +

    Extends

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Node to extend an object's prototype with an ancestor object. After goog.inherits from the -Closure Library.

  • exports.Extends = class Extends extends Base
    -  constructor: (@child, @parent) ->
    -
    -  children: ['child', 'parent']

    Hooks one constructor into another's prototype chain.

      compileToFragments: (o) ->
    -    new Call(new Value(new Literal utility 'extends'), [@child, @parent]).compileToFragments o

    Access

    A . access into a property of a value, or the :: shorthand for -an access into the object's prototype.

    exports.Access = class Access extends Base
    -  constructor: (@name, tag) ->
    -    @name.asKey = yes
    -    @soak  = tag is 'soak'
    -
    -  children: ['name']
    -
    -  compileToFragments: (o) ->
    -    name = @name.compileToFragments o
    -    if IDENTIFIER.test fragmentsToText name
    -      name.unshift @makeCode "."
    -    else
    -      name.unshift @makeCode "["
    -      name.push @makeCode "]"
    -    name
    -
    -  isComplex: NO

    Index

    A [ ... ] indexed access into an array or object.

    exports.Index = class Index extends Base
    -  constructor: (@index) ->
    -
    -  children: ['index']
    -
    -  compileToFragments: (o) ->
    -    [].concat @makeCode("["), (@index.compileToFragments o, LEVEL_PAREN), @makeCode("]")
    -
    -  isComplex: ->
    -    @index.isComplex()

    Range

    A range literal. Ranges can be used to extract portions (slices) of arrays, +Closure Library. +

    + + + +
    exports.Extends = class Extends extends Base
    +  constructor: (@child, @parent) ->
    +
    +  children: ['child', 'parent']
    + + + + +
  • +
    + +
    + +
    +

    Hooks one constructor into another's prototype chain. +

    + +
    + +
      compileToFragments: (o) ->
    +    new Call(new Value(new Literal utility 'extends'), [@child, @parent]).compileToFragments o
    + +
  • + + +
  • +
    + +
    + +
    +

    Access

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A . access into a property of a value, or the :: shorthand for +an access into the object's prototype. +

    + +
    + +
    exports.Access = class Access extends Base
    +  constructor: (@name, tag) ->
    +    @name.asKey = yes
    +    @soak  = tag is 'soak'
    +
    +  children: ['name']
    +
    +  compileToFragments: (o) ->
    +    name = @name.compileToFragments o
    +    if IDENTIFIER.test fragmentsToText name
    +      name.unshift @makeCode "."
    +    else
    +      name.unshift @makeCode "["
    +      name.push @makeCode "]"
    +    name
    +
    +  isComplex: NO
    + +
  • + + +
  • +
    + +
    + +
    +

    Index

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A [ ... ] indexed access into an array or object. +

    + +
    + +
    exports.Index = class Index extends Base
    +  constructor: (@index) ->
    +
    +  children: ['index']
    +
    +  compileToFragments: (o) ->
    +    [].concat @makeCode("["), @index.compileToFragments(o, LEVEL_PAREN), @makeCode("]")
    +
    +  isComplex: ->
    +    @index.isComplex()
    + +
  • + + +
  • +
    + +
    + +
    +

    Range

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A range literal. Ranges can be used to extract portions (slices) of arrays, to specify a range for comprehensions, or as a value, to be expanded into the -corresponding array of integers at runtime.

  • exports.Range = class Range extends Base
    -
    -  children: ['from', 'to']
    -
    -  constructor: (@from, @to, tag) ->
    -    @exclusive = tag is 'exclusive'
    -    @equals = if @exclusive then '' else '='

    Compiles the range's source variables -- where it starts and where it ends. -But only if they need to be cached to avoid double evaluation.

      compileVariables: (o) ->
    -    o = merge o, top: true
    -    [@fromC, @fromVar]  =  @cacheToCodeFragments @from.cache o, LEVEL_LIST
    -    [@toC, @toVar]      =  @cacheToCodeFragments @to.cache o, LEVEL_LIST
    -    [@step, @stepVar]   =  @cacheToCodeFragments step.cache o, LEVEL_LIST if step = del o, 'step'
    -    [@fromNum, @toNum]  = [@fromVar.match(SIMPLENUM), @toVar.match(SIMPLENUM)]
    -    @stepNum            = @stepVar.match(SIMPLENUM) if @stepVar

    When compiled normally, the range returns the contents of the for loop -needed to iterate over the values in the range. Used by comprehensions.

      compileNode: (o) ->
    -    @compileVariables o unless @fromVar
    -    return @compileArray(o) unless o.index

    Set up endpoints.

        known    = @fromNum and @toNum
    -    idx      = del o, 'index'
    -    idxName  = del o, 'name'
    -    namedIndex = idxName and idxName isnt idx
    -    varPart  = "#{idx} = #{@fromC}"
    -    varPart += ", #{@toC}" if @toC isnt @toVar
    -    varPart += ", #{@step}" if @step isnt @stepVar
    -    [lt, gt] = ["#{idx} <#{@equals}", "#{idx} >#{@equals}"]

    Generate the condition.

        condPart = if @stepNum
    -      if +@stepNum > 0 then "#{lt} #{@toVar}" else "#{gt} #{@toVar}"
    -    else if known
    -      [from, to] = [+@fromNum, +@toNum]
    -      if from <= to then "#{lt} #{to}" else "#{gt} #{to}"
    -    else
    -      cond = if @stepVar then "#{@stepVar} > 0" else "#{@fromVar} <= #{@toVar}"
    -      "#{cond} ? #{lt} #{@toVar} : #{gt} #{@toVar}"

    Generate the step.

        stepPart = if @stepVar
    -      "#{idx} += #{@stepVar}"
    -    else if known
    -      if namedIndex
    -        if from <= to then "++#{idx}" else "--#{idx}"
    -      else
    -        if from <= to then "#{idx}++" else "#{idx}--"
    -    else
    -      if namedIndex
    -        "#{cond} ? ++#{idx} : --#{idx}"
    -      else
    -        "#{cond} ? #{idx}++ : #{idx}--"
    -
    -    varPart  = "#{idxName} = #{varPart}" if namedIndex
    -    stepPart = "#{idxName} = #{stepPart}" if namedIndex

    The final loop body.

        [@makeCode "#{varPart}; #{condPart}; #{stepPart}"]

    When used as a value, expand the range into the equivalent array.

      compileArray: (o) ->
    -    if @fromNum and @toNum and Math.abs(@fromNum - @toNum) <= 20
    -      range = [+@fromNum..+@toNum]
    -      range.pop() if @exclusive
    -      return [@makeCode "[#{ range.join(', ') }]"]
    -    idt    = @tab + TAB
    -    i      = o.scope.freeVariable 'i'
    -    result = o.scope.freeVariable 'results'
    -    pre    = "\n#{idt}#{result} = [];"
    -    if @fromNum and @toNum
    -      o.index = i
    -      body    = fragmentsToText @compileNode o
    -    else
    -      vars    = "#{i} = #{@fromC}" + if @toC isnt @toVar then ", #{@toC}" else ''
    -      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 (n) -> n instanceof Literal and n.value is 'arguments' and not n.asKey
    -    args   = ', arguments' if hasArgs(@from) or hasArgs(@to)
    -    [@makeCode "(function() {#{pre}\n#{idt}for (#{body})#{post}}).apply(this#{args ? ''})"]

    Slice

    An array slice literal. Unlike JavaScript's Array#slice, the second parameter +corresponding array of integers at runtime. +

    + + + +
    exports.Range = class Range extends Base
    +
    +  children: ['from', 'to']
    +
    +  constructor: (@from, @to, tag) ->
    +    @exclusive = tag is 'exclusive'
    +    @equals = if @exclusive then '' else '='
    + + + + +
  • +
    + +
    + +
    +

    Compiles the range's source variables -- where it starts and where it ends. +But only if they need to be cached to avoid double evaluation. +

    + +
    + +
      compileVariables: (o) ->
    +    o = merge o, top: true
    +    [@fromC, @fromVar]  =  @cacheToCodeFragments @from.cache o, LEVEL_LIST
    +    [@toC, @toVar]      =  @cacheToCodeFragments @to.cache o, LEVEL_LIST
    +    [@step, @stepVar]   =  @cacheToCodeFragments step.cache o, LEVEL_LIST if step = del o, 'step'
    +    [@fromNum, @toNum]  = [@fromVar.match(SIMPLENUM), @toVar.match(SIMPLENUM)]
    +    @stepNum            = @stepVar.match(SIMPLENUM) if @stepVar
    + +
  • + + +
  • +
    + +
    + +
    +

    When compiled normally, the range returns the contents of the for loop +needed to iterate over the values in the range. Used by comprehensions. +

    + +
    + +
      compileNode: (o) ->
    +    @compileVariables o unless @fromVar
    +    return @compileArray(o) unless o.index
    + +
  • + + +
  • +
    + +
    + +
    +

    Set up endpoints. +

    + +
    + +
        known    = @fromNum and @toNum
    +    idx      = del o, 'index'
    +    idxName  = del o, 'name'
    +    namedIndex = idxName and idxName isnt idx
    +    varPart  = "#{idx} = #{@fromC}"
    +    varPart += ", #{@toC}" if @toC isnt @toVar
    +    varPart += ", #{@step}" if @step isnt @stepVar
    +    [lt, gt] = ["#{idx} <#{@equals}", "#{idx} >#{@equals}"]
    + +
  • + + +
  • +
    + +
    + +
    +

    Generate the condition. +

    + +
    + +
        condPart = if @stepNum
    +      if +@stepNum > 0 then "#{lt} #{@toVar}" else "#{gt} #{@toVar}"
    +    else if known
    +      [from, to] = [+@fromNum, +@toNum]
    +      if from <= to then "#{lt} #{to}" else "#{gt} #{to}"
    +    else
    +      cond = if @stepVar then "#{@stepVar} > 0" else "#{@fromVar} <= #{@toVar}"
    +      "#{cond} ? #{lt} #{@toVar} : #{gt} #{@toVar}"
    + +
  • + + +
  • +
    + +
    + +
    +

    Generate the step. +

    + +
    + +
        stepPart = if @stepVar
    +      "#{idx} += #{@stepVar}"
    +    else if known
    +      if namedIndex
    +        if from <= to then "++#{idx}" else "--#{idx}"
    +      else
    +        if from <= to then "#{idx}++" else "#{idx}--"
    +    else
    +      if namedIndex
    +        "#{cond} ? ++#{idx} : --#{idx}"
    +      else
    +        "#{cond} ? #{idx}++ : #{idx}--"
    +
    +    varPart  = "#{idxName} = #{varPart}" if namedIndex
    +    stepPart = "#{idxName} = #{stepPart}" if namedIndex
    + +
  • + + +
  • +
    + +
    + +
    +

    The final loop body. +

    + +
    + +
        [@makeCode "#{varPart}; #{condPart}; #{stepPart}"]
    + +
  • + + +
  • +
    + +
    + +
    +

    When used as a value, expand the range into the equivalent array. +

    + +
    + +
      compileArray: (o) ->
    +    if @fromNum and @toNum and Math.abs(@fromNum - @toNum) <= 20
    +      range = [+@fromNum..+@toNum]
    +      range.pop() if @exclusive
    +      return [@makeCode "[#{ range.join(', ') }]"]
    +    idt    = @tab + TAB
    +    i      = o.scope.freeVariable 'i'
    +    result = o.scope.freeVariable 'results'
    +    pre    = "\n#{idt}#{result} = [];"
    +    if @fromNum and @toNum
    +      o.index = i
    +      body    = fragmentsToText @compileNode o
    +    else
    +      vars    = "#{i} = #{@fromC}" + if @toC isnt @toVar then ", #{@toC}" else ''
    +      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 (n) -> n instanceof Literal and n.value is 'arguments' and not n.asKey
    +    args   = ', arguments' if hasArgs(@from) or hasArgs(@to)
    +    [@makeCode "(function() {#{pre}\n#{idt}for (#{body})#{post}}).apply(this#{args ? ''})"]
    + +
  • + + +
  • +
    + +
    + +
    +

    Slice

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    An array slice literal. Unlike JavaScript's Array#slice, the second parameter specifies the index of the end of the slice, just as the first parameter -is the index of the beginning.

  • exports.Slice = class Slice extends Base
    -
    -  children: ['range']
    -
    -  constructor: (@range) ->
    -    super()

    We have to be careful when trying to slice through the end of the array, +is the index of the beginning. +

    + + + +
    exports.Slice = class Slice extends Base
    +
    +  children: ['range']
    +
    +  constructor: (@range) ->
    +    super()
    + + + + +
  • +
    + +
    + +
    +

    We have to be careful when trying to slice through the end of the array, 9e9 is used because not all implementations respect undefined or 1/0. -9e9 should be safe because 9e9 > 2**32, the max array length.

  •   compileNode: (o) ->
    -    {to, from} = @range
    -    fromCompiled = from and from.compileToFragments(o, LEVEL_PAREN) or [@makeCode '0']

    TODO: jwalton - move this into the 'if'?

        if to
    -      compiled     = to.compileToFragments o, LEVEL_PAREN
    -      compiledText = fragmentsToText compiled
    -      if not (not @range.exclusive and +compiledText is -1)
    -        toStr = ', ' + if @range.exclusive
    -          compiledText
    -        else if SIMPLENUM.test compiledText
    -          "#{+compiledText + 1}"
    -        else
    -          compiled = to.compileToFragments o, LEVEL_ACCESS
    -          "+#{fragmentsToText compiled} + 1 || 9e9"
    -    [@makeCode ".slice(#{ fragmentsToText fromCompiled }#{ toStr or '' })"]

    Obj

    An object literal, nothing fancy.

    exports.Obj = class Obj extends Base
    -  constructor: (props, @generated = false) ->
    -    @objects = @properties = props or []
    -
    -  children: ['properties']
    -
    -  compileNode: (o) ->
    -    props = @properties
    -    return [@makeCode(if @front then '({})' else '{}')] unless props.length
    -    if @generated
    -      for node in props when node instanceof Value
    -        throw new Error 'cannot have an implicit value in an implicit object'
    -    idt         = o.indent += TAB
    -    lastNoncom  = @lastNonComment @properties
    -    answer = []
    -    for prop, i in props
    -      join = if i is props.length - 1
    -        ''
    -      else if prop is lastNoncom or prop instanceof Comment
    -        '\n'
    -      else
    -        ',\n'
    -      indent = if prop instanceof Comment then '' else idt
    -      if prop instanceof Value and prop.this
    -        prop = new Assign prop.properties[0].name, prop, 'object'
    -      if prop not instanceof Comment
    -        if prop not instanceof Assign
    -          prop = new Assign prop, prop, 'object'
    -        (prop.variable.base or prop.variable).asKey = yes
    -      if indent then answer.push @makeCode indent
    -      answer.push prop.compileToFragments(o, LEVEL_TOP)...
    -      if join then answer.push @makeCode join
    -    answer.unshift @makeCode "{#{ props.length and '\n' }"
    -    answer.push @makeCode "#{ props.length and '\n' + @tab }}"
    -    if @front then @wrapInBraces answer else answer
    -
    -  assigns: (name) ->
    -    for prop in @properties when prop.assigns name then return yes
    -    no

    Arr

    An array literal.

    exports.Arr = class Arr extends Base
    -  constructor: (objs) ->
    -    @objects = objs or []
    -
    -  children: ['objects']
    -
    -  compileNode: (o) ->
    -    return [@makeCode '[]'] unless @objects.length
    -    o.indent += TAB
    -    answer = Splat.compileSplattedArray o, @objects
    -    return answer if answer.length
    -
    -    answer = []
    -    compiledObjs = (obj.compileToFragments o, LEVEL_LIST for obj in @objects)
    -    for fragments, index in compiledObjs
    -      if index
    -        answer.push @makeCode ", "
    -      answer.push fragments...
    -    if (fragmentsToText answer).indexOf('\n') >= 0
    -      answer.unshift @makeCode "[\n#{o.indent}"
    -      answer.push @makeCode "\n#{@tab}]"
    -    else
    -      answer.unshift @makeCode "["
    -      answer.push @makeCode "]"
    -    answer
    -
    -  assigns: (name) ->
    -    for obj in @objects when obj.assigns name then return yes
    -    no

    Class

    The CoffeeScript class definition. +9e9 should be safe because 9e9 > 2**32, the max array length. +

    + + + +
      compileNode: (o) ->
    +    {to, from} = @range
    +    fromCompiled = from and from.compileToFragments(o, LEVEL_PAREN) or [@makeCode '0']
    + + + + +
  • +
    + +
    + +
    +

    TODO: jwalton - move this into the 'if'? +

    + +
    + +
        if to
    +      compiled     = to.compileToFragments o, LEVEL_PAREN
    +      compiledText = fragmentsToText compiled
    +      if not (not @range.exclusive and +compiledText is -1)
    +        toStr = ', ' + if @range.exclusive
    +          compiledText
    +        else if SIMPLENUM.test compiledText
    +          "#{+compiledText + 1}"
    +        else
    +          compiled = to.compileToFragments o, LEVEL_ACCESS
    +          "+#{fragmentsToText compiled} + 1 || 9e9"
    +    [@makeCode ".slice(#{ fragmentsToText fromCompiled }#{ toStr or '' })"]
    + +
  • + + +
  • +
    + +
    + +
    +

    Obj

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    An object literal, nothing fancy. +

    + +
    + +
    exports.Obj = class Obj extends Base
    +  constructor: (props, @generated = false) ->
    +    @objects = @properties = props or []
    +
    +  children: ['properties']
    +
    +  compileNode: (o) ->
    +    props = @properties
    +    return [@makeCode(if @front then '({})' else '{}')] unless props.length
    +    if @generated
    +      for node in props when node instanceof Value
    +        node.error 'cannot have an implicit value in an implicit object'
    +    idt         = o.indent += TAB
    +    lastNoncom  = @lastNonComment @properties
    +    answer = []
    +    for prop, i in props
    +      join = if i is props.length - 1
    +        ''
    +      else if prop is lastNoncom or prop instanceof Comment
    +        '\n'
    +      else
    +        ',\n'
    +      indent = if prop instanceof Comment then '' else idt
    +      if prop instanceof Assign and prop.variable instanceof Value and prop.variable.hasProperties()
    +        prop.variable.error 'Invalid object key'
    +      if prop instanceof Value and prop.this
    +        prop = new Assign prop.properties[0].name, prop, 'object'
    +      if prop not instanceof Comment
    +        if prop not instanceof Assign
    +          prop = new Assign prop, prop, 'object'
    +        (prop.variable.base or prop.variable).asKey = yes
    +      if indent then answer.push @makeCode indent
    +      answer.push prop.compileToFragments(o, LEVEL_TOP)...
    +      if join then answer.push @makeCode join
    +    answer.unshift @makeCode "{#{ props.length and '\n' }"
    +    answer.push @makeCode "#{ props.length and '\n' + @tab }}"
    +    if @front then @wrapInBraces answer else answer
    +
    +  assigns: (name) ->
    +    for prop in @properties when prop.assigns name then return yes
    +    no
    + +
  • + + +
  • +
    + +
    + +
    +

    Arr

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    An array literal. +

    + +
    + +
    exports.Arr = class Arr extends Base
    +  constructor: (objs) ->
    +    @objects = objs or []
    +
    +  children: ['objects']
    +
    +  compileNode: (o) ->
    +    return [@makeCode '[]'] unless @objects.length
    +    o.indent += TAB
    +    answer = Splat.compileSplattedArray o, @objects
    +    return answer if answer.length
    +
    +    answer = []
    +    compiledObjs = (obj.compileToFragments o, LEVEL_LIST for obj in @objects)
    +    for fragments, index in compiledObjs
    +      if index
    +        answer.push @makeCode ", "
    +      answer.push fragments...
    +    if fragmentsToText(answer).indexOf('\n') >= 0
    +      answer.unshift @makeCode "[\n#{o.indent}"
    +      answer.push @makeCode "\n#{@tab}]"
    +    else
    +      answer.unshift @makeCode "["
    +      answer.push @makeCode "]"
    +    answer
    +
    +  assigns: (name) ->
    +    for obj in @objects when obj.assigns name then return yes
    +    no
    + +
  • + + +
  • +
    + +
    + +
    +

    Class

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The CoffeeScript class definition. Initialize a Class with its name, an optional superclass, and a -list of prototype property assignments.

  • exports.Class = class Class extends Base
    -  constructor: (@variable, @parent, @body = new Block) ->
    -    @boundFuncs = []
    -    @body.classBody = yes
    -
    -  children: ['variable', 'parent', 'body']

    Figure out the appropriate name for the constructor function of this class.

      determineName: ->
    -    return null unless @variable
    -    decl = if tail = last @variable.properties
    -      tail instanceof Access and tail.name.value
    -    else
    -      @variable.base.value
    -    if decl in STRICT_PROSCRIBED
    -      throw SyntaxError "variable name may not be #{decl}"
    -    decl and= IDENTIFIER.test(decl) and decl

    For all this-references and bound functions in the class definition, -this is the Class being constructed.

      setContext: (name) ->
    -    @body.traverseChildren false, (node) ->
    -      return false if node.classBody
    -      if node instanceof Literal and node.value is 'this'
    -        node.value    = name
    -      else if node instanceof Code
    -        node.klass    = name
    -        node.context  = name if node.bound

    Ensure that all functions bound to the instance are proxied in the -constructor.

      addBoundFunctions: (o) ->
    -    if @boundFuncs.length
    -      o.scope.assign '_this', 'this'
    -      for [name, func] in @boundFuncs
    -        lhs = new Value (new Literal "this"), [new Access name]
    -        body = new Block [new Return new Literal "#{@ctor.name}.prototype.#{name.value}.apply(_this, arguments)"]
    -        rhs = new Code func.params, body, 'boundfunc'
    -        bound = new Assign lhs, rhs
    -
    -        @ctor.body.unshift bound

    {base} = assign.variable -lhs = (new Value (new Literal "this"), [new Access base]).compile o -@ctor.body.unshift new Literal """#{lhs} = function() {

    - -

    {o.indent} return #{@ctor.name}.prototype.#{base.value}.apply(_this, arguments);

    - -

    {o.indent}}\n

    - -

    """

        return

    Merge the properties from a top-level object as prototypal properties -on the class.

      addProperties: (node, name, o) ->
    -    props = node.base.properties[..]
    -    exprs = while assign = props.shift()
    -      if assign instanceof Assign
    -        base = assign.variable.base
    -        delete assign.context
    -        func = assign.value
    -        if base.value is 'constructor'
    -          if @ctor
    -            throw new Error 'cannot define more than one constructor in a class'
    -          if func.bound
    -            throw new Error 'cannot define a constructor as a bound function'
    -          if func instanceof Code
    -            assign = @ctor = func
    -          else
    -            @externalCtor = o.scope.freeVariable 'class'
    -            assign = new Assign new Literal(@externalCtor), func
    -        else
    -          if assign.variable.this
    -            func.static = yes
    -            if func.bound
    -              func.context = name
    -          else
    -            assign.variable = new Value(new Literal(name), [(new Access new Literal 'prototype'), new Access base ])
    -            if func instanceof Code and func.bound
    -              @boundFuncs.push [base, func]
    -              func.bound = no
    -      assign
    -    compact exprs

    Walk the body of the class, looking for prototype properties to be converted.

      walkBody: (name, o) ->
    -    @traverseChildren false, (child) =>
    -      cont = true
    -      return false if child instanceof Class
    -      if child instanceof Block
    -        for node, i in exps = child.expressions
    -          if node instanceof Value and node.isObject(true)
    -            cont = false
    -            exps[i] = @addProperties node, name, o
    -        child.expressions = exps = flatten exps
    -      cont and child not instanceof Class

    use strict (and other directives) must be the first expression statement(s) +list of prototype property assignments. +

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

    Figure out the appropriate name for the constructor function of this class. +

    + +
    + +
      determineName: ->
    +    return null unless @variable
    +    decl = if tail = last @variable.properties
    +      tail instanceof Access and tail.name.value
    +    else
    +      @variable.base.value
    +    if decl in STRICT_PROSCRIBED
    +      @variable.error "class variable name may not be #{decl}"
    +    decl and= IDENTIFIER.test(decl) and decl
    + +
  • + + +
  • +
    + +
    + +
    +

    For all this-references and bound functions in the class definition, +this is the Class being constructed. +

    + +
    + +
      setContext: (name) ->
    +    @body.traverseChildren false, (node) ->
    +      return false if node.classBody
    +      if node instanceof Literal and node.value is 'this'
    +        node.value    = name
    +      else if node instanceof Code
    +        node.klass    = name
    +        node.context  = name if node.bound
    + +
  • + + +
  • +
    + +
    + +
    +

    Ensure that all functions bound to the instance are proxied in the +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)"
    +    return
    + +
  • + + +
  • +
    + +
    + +
    +

    Merge the properties from a top-level object as prototypal properties +on the class. +

    + +
    + +
      addProperties: (node, name, o) ->
    +    props = node.base.properties[..]
    +    exprs = while assign = props.shift()
    +      if assign instanceof Assign
    +        base = assign.variable.base
    +        delete assign.context
    +        func = assign.value
    +        if base.value is 'constructor'
    +          if @ctor
    +            assign.error 'cannot define more than one constructor in a class'
    +          if func.bound
    +            assign.error 'cannot define a constructor as a bound function'
    +          if func instanceof Code
    +            assign = @ctor = func
    +          else
    +            @externalCtor = o.scope.freeVariable 'class'
    +            assign = new Assign new Literal(@externalCtor), func
    +        else
    +          if assign.variable.this
    +            func.static = yes
    +            if func.bound
    +              func.context = name
    +          else
    +            assign.variable = new Value(new Literal(name), [(new Access new Literal 'prototype'), new Access base])
    +            if func instanceof Code and func.bound
    +              @boundFuncs.push base
    +              func.bound = no
    +      assign
    +    compact exprs
    + +
  • + + +
  • +
    + +
    + +
    +

    Walk the body of the class, looking for prototype properties to be converted. +

    + +
    + +
      walkBody: (name, o) ->
    +    @traverseChildren false, (child) =>
    +      cont = true
    +      return false if child instanceof Class
    +      if child instanceof Block
    +        for node, i in exps = child.expressions
    +          if node instanceof Value and node.isObject(true)
    +            cont = false
    +            exps[i] = @addProperties node, name, o
    +        child.expressions = exps = flatten exps
    +      cont and child not instanceof Class
    + +
  • + + +
  • +
    + +
    + +
    +

    use strict (and other directives) must be the first expression statement(s) of a function body. This method ensures the prologue is correctly positioned -above the constructor.

  •   hoistDirectivePrologue: ->
    -    index = 0
    -    {expressions} = @body
    -    ++index while (node = expressions[index]) and node instanceof Comment or
    -      node instanceof Value and node.isString()
    -    @directives = expressions.splice 0, index

    Make sure that a constructor is defined for the class, and properly -configured.

      ensureConstructor: (name) ->
    -    if not @ctor
    -      @ctor = new Code
    -      @ctor.body.push new Literal "#{name}.__super__.constructor.apply(this, arguments)" if @parent
    -      @ctor.body.push new Literal "#{@externalCtor}.apply(this, arguments)" if @externalCtor
    -      @ctor.body.makeReturn()
    -      @body.expressions.unshift @ctor
    -    @ctor.ctor     = @ctor.name = name
    -    @ctor.klass    = null
    -    @ctor.noReturn = yes

    Instead of generating the JavaScript string directly, we build up the +above the constructor. +

    + + + +
      hoistDirectivePrologue: ->
    +    index = 0
    +    {expressions} = @body
    +    ++index while (node = expressions[index]) and node instanceof Comment or
    +      node instanceof Value and node.isString()
    +    @directives = expressions.splice 0, index
    + + + + +
  • +
    + +
    + +
    +

    Make sure that a constructor is defined for the class, and properly +configured. +

    + +
    + +
      ensureConstructor: (name, o) ->
    +    missing = not @ctor
    +    @ctor or= new Code
    +    @ctor.ctor = @ctor.name = name
    +    @ctor.klass = null
    +    @ctor.noReturn = yes
    +    if missing
    +      superCall = new Literal "#{name}.__super__.constructor.apply(this, arguments)" if @parent
    +      superCall = new Literal "#{@externalCtor}.apply(this, arguments)" if @externalCtor
    +      if superCall
    +        ref = new Literal o.scope.freeVariable 'ref'
    +        @ctor.body.unshift new Assign ref, superCall
    +      @addBoundFunctions o
    +      if superCall
    +        @ctor.body.push ref
    +        @ctor.body.makeReturn()
    +      @body.expressions.unshift @ctor
    +    else
    +      @addBoundFunctions o
    + +
  • + + +
  • +
    + +
    + +
    +

    Instead of generating the JavaScript string directly, we build up the equivalent syntax tree and compile that, in pieces. You can see the -constructor, property assignments, and inheritance getting built out below.

  •   compileNode: (o) ->
    -    decl  = @determineName()
    -    name  = decl or '_Class'
    -    name = "_#{name}" if name.reserved
    -    lname = new Literal name
    -
    -    @hoistDirectivePrologue()
    -    @setContext name
    -    @walkBody name, o
    -    @ensureConstructor name
    -    @body.spaced = yes
    -    @body.expressions.unshift @ctor unless @ctor instanceof Code
    -    @body.expressions.push lname
    -    @body.expressions.unshift @directives...
    -    @addBoundFunctions o
    -
    -    call  = Closure.wrap @body
    -
    -    if @parent
    -      @superClass = new Literal o.scope.freeVariable 'super', no
    -      @body.expressions.unshift new Extends lname, @superClass
    -      call.args.push @parent
    -      params = call.variable.params or call.variable.base.params
    -      params.push new Param @superClass
    -
    -    klass = new Parens call, yes
    -    klass = new Assign @variable, klass if @variable
    -    klass.compileToFragments o

    Assign

    The Assign is used to assign a local variable to value, or to set the -property of an object -- including within object literals.

    exports.Assign = class Assign extends Base
    -  constructor: (@variable, @value, @context, options) ->
    -    @param = options and options.param
    -    @subpattern = options and options.subpattern
    -    forbidden = (name = @variable.unwrapAll().value) in STRICT_PROSCRIBED
    -    if forbidden and @context isnt 'object'
    -      throw SyntaxError "variable name may not be \"#{name}\""
    -
    -  children: ['variable', 'value']
    -
    -  isStatement: (o) ->
    -    o?.level is LEVEL_TOP and @context? and "?" in @context
    -
    -  assigns: (name) ->
    -    @[if @context is 'object' then 'value' else 'variable'].assigns name
    -
    -  unfoldSoak: (o) ->
    -    unfoldSoak o, this, 'variable'

    Compile an assignment, delegating to compilePatternMatch or +constructor, property assignments, and inheritance getting built out below. +

    + + + +
      compileNode: (o) ->
    +    decl  = @determineName()
    +    name  = decl or '_Class'
    +    name = "_#{name}" if name.reserved
    +    lname = new Literal name
    +
    +    @hoistDirectivePrologue()
    +    @setContext name
    +    @walkBody name, o
    +    @ensureConstructor name, o
    +    @body.spaced = yes
    +    @body.expressions.unshift @ctor unless @ctor instanceof Code
    +    @body.expressions.push lname
    +    @body.expressions.unshift @directives...
    +
    +    call  = Closure.wrap @body
    +
    +    if @parent
    +      @superClass = new Literal o.scope.freeVariable 'super', no
    +      @body.expressions.unshift new Extends lname, @superClass
    +      call.args.push @parent
    +      params = call.variable.params or call.variable.base.params
    +      params.push new Param @superClass
    +
    +    klass = new Parens call, yes
    +    klass = new Assign @variable, klass if @variable
    +    klass.compileToFragments o
    + + + + +
  • +
    + +
    + +
    +

    Assign

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    The Assign is used to assign a local variable to value, or to set the +property of an object -- including within object literals. +

    + +
    + +
    exports.Assign = class Assign extends Base
    +  constructor: (@variable, @value, @context, options) ->
    +    @param = options and options.param
    +    @subpattern = options and options.subpattern
    +    forbidden = (name = @variable.unwrapAll().value) in STRICT_PROSCRIBED
    +    if forbidden and @context isnt 'object'
    +      @variable.error "variable name may not be \"#{name}\""
    +
    +  children: ['variable', 'value']
    +
    +  isStatement: (o) ->
    +    o?.level is LEVEL_TOP and @context? and "?" in @context
    +
    +  assigns: (name) ->
    +    @[if @context is 'object' then 'value' else 'variable'].assigns name
    +
    +  unfoldSoak: (o) ->
    +    unfoldSoak o, this, 'variable'
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile an assignment, delegating to compilePatternMatch or compileSplice if appropriate. Keep track of the name of the base object -we've been assigned to, for correct internal references. If the variable -has not been seen yet within the current scope, declare it.

  •   compileNode: (o) ->
    -    if isValue = @variable instanceof Value
    -      return @compilePatternMatch o if @variable.isArray() or @variable.isObject()
    -      return @compileSplice       o if @variable.isSplice()
    -      return @compileConditional  o if @context in ['||=', '&&=', '?=']
    -    compiledName = @variable.compileToFragments o, LEVEL_LIST
    -    name = fragmentsToText compiledName
    -    unless @context
    -      unless (varBase = @variable.unwrapAll()).isAssignable()
    -        throw SyntaxError "\"#{ @variable.compile o }\" cannot be assigned."
    -      unless varBase.hasProperties?()
    -        if @param
    -          o.scope.add name, 'var'
    -        else
    -          o.scope.find name
    -    if @value instanceof Code and match = METHOD_DEF.exec name
    -      @value.klass = match[1] if match[1]
    -      @value.name  = match[2] ? match[3] ? match[4] ? match[5]
    -    val = @value.compileToFragments o, LEVEL_LIST
    -    return (compiledName.concat @makeCode(": "), val) if @context is 'object'
    -    answer = compiledName.concat @makeCode(" #{ @context or '=' } "), val
    -    if o.level <= LEVEL_LIST then answer else @wrapInBraces answer

    Brief implementation of recursive pattern matching, when assigning array or +we've been assigned to, for correct internal references. If the variable +has not been seen yet within the current scope, declare it. +

    + + + +
      compileNode: (o) ->
    +    if isValue = @variable instanceof Value
    +      return @compilePatternMatch o if @variable.isArray() or @variable.isObject()
    +      return @compileSplice       o if @variable.isSplice()
    +      return @compileConditional  o if @context in ['||=', '&&=', '?=']
    +    compiledName = @variable.compileToFragments o, LEVEL_LIST
    +    name = fragmentsToText compiledName
    +    unless @context
    +      varBase = @variable.unwrapAll()
    +      unless varBase.isAssignable()
    +        @variable.error "\"#{@variable.compile o}\" cannot be assigned"
    +      unless varBase.hasProperties?()
    +        if @param
    +          o.scope.add name, 'var'
    +        else
    +          o.scope.find name
    +    if @value instanceof Code and match = METHOD_DEF.exec name
    +      @value.klass = match[1] if match[1]
    +      @value.name  = match[2] ? match[3] ? match[4] ? match[5]
    +    val = @value.compileToFragments o, LEVEL_LIST
    +    return (compiledName.concat @makeCode(": "), val) if @context is 'object'
    +    answer = compiledName.concat @makeCode(" #{ @context or '=' } "), val
    +    if o.level <= LEVEL_LIST then answer else @wrapInBraces answer
    + + + + +
  • +
    + +
    + +
    +

    Brief implementation of recursive pattern matching, when assigning array or object literals to a value. Peeks at their properties to assign inner names. See the ECMAScript Harmony Wiki -for details.

  •   compilePatternMatch: (o) ->
    -    top       = o.level is LEVEL_TOP
    -    {value}   = this
    -    {objects} = @variable.base
    -    unless olen = objects.length
    -      code = value.compileToFragments o
    -      return if o.level >= LEVEL_OP then @wrapInBraces code else code
    -    isObject = @variable.isObject()
    -    if top and olen is 1 and (obj = objects[0]) not instanceof Splat

    Unroll simplest cases: {v} = x -> v = x.v

          if obj instanceof Assign
    -        {variable: {base: idx}, value: obj} = obj
    -      else
    -        idx = if isObject
    -          if obj.this then obj.properties[0].name else obj
    -        else
    -          new Literal 0
    -      acc   = IDENTIFIER.test idx.unwrap().value or 0
    -      value = new Value value
    -      value.properties.push new (if acc then Access else Index) idx
    -      if obj.unwrap().value in RESERVED
    -        throw new SyntaxError "assignment to a reserved word: #{obj.compile o} = #{value.compile o}"
    -      return new Assign(obj, value, null, param: @param).compileToFragments o, LEVEL_TOP
    -    vvar    = value.compileToFragments o, LEVEL_LIST
    -    vvarText = fragmentsToText vvar
    -    assigns = []
    -    splat   = false

    Make vvar into a simple variable if it isn't already.

        if not IDENTIFIER.test(vvarText) or @variable.assigns(vvarText)
    -      assigns.push [@makeCode("#{ ref = o.scope.freeVariable 'ref' } = "), vvar...]
    -      vvar = [@makeCode ref]
    -      vvarText = ref
    -    for obj, i in objects

    A regular array pattern-match.

          idx = i
    -      if isObject
    -        if obj instanceof Assign

    A regular object pattern-match.

              {variable: {base: idx}, value: obj} = obj
    -        else

    A shorthand {a, b, @c} = val pattern-match.

              if obj.base instanceof Parens
    -            [obj, idx] = new Value(obj.unwrapAll()).cacheReference o
    -          else
    -            idx = if obj.this then obj.properties[0].name else obj
    -      if not splat and obj instanceof Splat
    -        name = obj.name.unwrap().value
    -        obj = obj.unwrap()
    -        val = "#{olen} <= #{vvarText}.length ? #{ utility 'slice' }.call(#{vvarText}, #{i}"
    -        if rest = olen - i - 1
    -          ivar = o.scope.freeVariable 'i'
    -          val += ", #{ivar} = #{vvarText}.length - #{rest}) : (#{ivar} = #{i}, [])"
    -        else
    -          val += ") : []"
    -        val   = new Literal val
    -        splat = "#{ivar}++"
    -      else
    -        name = obj.unwrap().value
    -        if obj instanceof Splat
    -          obj = obj.name.compileToFragments o
    -          throw new SyntaxError \
    -            "multiple splats are disallowed in an assignment: #{obj}..."
    -        if typeof idx is 'number'
    -          idx = new Literal splat or idx
    -          acc = no
    -        else
    -          acc = isObject and IDENTIFIER.test idx.unwrap().value or 0
    -        val = new Value new Literal(vvarText), [new (if acc then Access else Index) idx]
    -      if name? and name in RESERVED
    -        throw new SyntaxError "assignment to a reserved word: #{obj.compile o} = #{val.compile o}"
    -      assigns.push new Assign(obj, val, null, param: @param, subpattern: yes).compileToFragments o, LEVEL_LIST
    -    assigns.push vvar unless top or @subpattern
    -    fragments = @joinFragmentArrays assigns, ', '
    -    if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments

    When compiling a conditional assignment, take care to ensure that the +for details. +

    + + + +
      compilePatternMatch: (o) ->
    +    top       = o.level is LEVEL_TOP
    +    {value}   = this
    +    {objects} = @variable.base
    +    unless olen = objects.length
    +      code = value.compileToFragments o
    +      return if o.level >= LEVEL_OP then @wrapInBraces code else code
    +    isObject = @variable.isObject()
    +    if top and olen is 1 and (obj = objects[0]) not instanceof Splat
    + + + + +
  • +
    + +
    + +
    +

    Unroll simplest cases: {v} = x -> v = x.v +

    + +
    + +
          if obj instanceof Assign
    +        {variable: {base: idx}, value: obj} = obj
    +      else
    +        idx = if isObject
    +          if obj.this then obj.properties[0].name else obj
    +        else
    +          new Literal 0
    +      acc   = IDENTIFIER.test idx.unwrap().value or 0
    +      value = new Value value
    +      value.properties.push new (if acc then Access else Index) idx
    +      if obj.unwrap().value in RESERVED
    +        obj.error "assignment to a reserved word: #{obj.compile o}"
    +      return new Assign(obj, value, null, param: @param).compileToFragments o, LEVEL_TOP
    +    vvar    = value.compileToFragments o, LEVEL_LIST
    +    vvarText = fragmentsToText vvar
    +    assigns = []
    +    splat   = false
    + +
  • + + +
  • +
    + +
    + +
    +

    Make vvar into a simple variable if it isn't already. +

    + +
    + +
        if not IDENTIFIER.test(vvarText) or @variable.assigns(vvarText)
    +      assigns.push [@makeCode("#{ ref = o.scope.freeVariable 'ref' } = "), vvar...]
    +      vvar = [@makeCode ref]
    +      vvarText = ref
    +    for obj, i in objects
    + +
  • + + +
  • +
    + +
    + +
    +

    A regular array pattern-match. +

    + +
    + +
          idx = i
    +      if isObject
    +        if obj instanceof Assign
    + +
  • + + +
  • +
    + +
    + +
    +

    A regular object pattern-match. +

    + +
    + +
              {variable: {base: idx}, value: obj} = obj
    +        else
    + +
  • + + +
  • +
    + +
    + +
    +

    A shorthand {a, b, @c} = val pattern-match. +

    + +
    + +
              if obj.base instanceof Parens
    +            [obj, idx] = new Value(obj.unwrapAll()).cacheReference o
    +          else
    +            idx = if obj.this then obj.properties[0].name else obj
    +      if not splat and obj instanceof Splat
    +        name = obj.name.unwrap().value
    +        obj = obj.unwrap()
    +        val = "#{olen} <= #{vvarText}.length ? #{ utility 'slice' }.call(#{vvarText}, #{i}"
    +        if rest = olen - i - 1
    +          ivar = o.scope.freeVariable 'i'
    +          val += ", #{ivar} = #{vvarText}.length - #{rest}) : (#{ivar} = #{i}, [])"
    +        else
    +          val += ") : []"
    +        val   = new Literal val
    +        splat = "#{ivar}++"
    +      else
    +        name = obj.unwrap().value
    +        if obj instanceof Splat
    +          obj.error "multiple splats are disallowed in an assignment"
    +        if typeof idx is 'number'
    +          idx = new Literal splat or idx
    +          acc = no
    +        else
    +          acc = isObject and IDENTIFIER.test idx.unwrap().value or 0
    +        val = new Value new Literal(vvarText), [new (if acc then Access else Index) idx]
    +      if name? and name in RESERVED
    +        obj.error "assignment to a reserved word: #{obj.compile o}"
    +      assigns.push new Assign(obj, val, null, param: @param, subpattern: yes).compileToFragments o, LEVEL_LIST
    +    assigns.push vvar unless top or @subpattern
    +    fragments = @joinFragmentArrays assigns, ', '
    +    if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments
    + +
  • + + +
  • +
    + +
    + +
    +

    When compiling a conditional assignment, take care to ensure that the operands are only evaluated once, even though we have to reference them -more than once.

  •   compileConditional: (o) ->
    -    [left, right] = @variable.cacheReference o

    Disallow conditional assignment of undefined variables.

        if not left.properties.length and left.base instanceof Literal and
    -           left.base.value != "this" and not o.scope.check left.base.value
    -      throw new Error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been defined."
    -    if "?" in @context then o.isExistentialEquals = true
    -    new Op(@context[...-1], left, new Assign(right, @value, '=') ).compileToFragments o

    Compile the assignment from an array splice literal, using JavaScript's -Array#splice method.

      compileSplice: (o) ->
    -    {range: {from, to, exclusive}} = @variable.properties.pop()
    -    name = @variable.compile o
    -    if from
    -      [fromDecl, fromRef] = @cacheToCodeFragments from.cache o, LEVEL_OP
    -    else
    -      fromDecl = fromRef = '0'
    -    if to
    -      if from?.isSimpleNumber() and to.isSimpleNumber()
    -        to = +to.compile(o) - +fromRef
    -        to += 1 unless exclusive
    -      else
    -        to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef
    -        to += ' + 1' unless exclusive
    -    else
    -      to = "9e9"
    -    [valDef, valRef] = @value.cache o, LEVEL_LIST
    -    answer = [].concat @makeCode("[].splice.apply(#{name}, [#{fromDecl}, #{to}].concat("), valDef, @makeCode(")), "), valRef
    -    if o.level > LEVEL_TOP then @wrapInBraces answer else answer

    Code

    A function definition. This is the only node that creates a new Scope. +more than once. +

    + + + +
      compileConditional: (o) ->
    +    [left, right] = @variable.cacheReference o
    + + + + +
  • +
    + +
    + +
    +

    Disallow conditional assignment of undefined variables. +

    + +
    + +
        if not left.properties.length and left.base instanceof Literal and
    +           left.base.value != "this" and not o.scope.check left.base.value
    +      @variable.error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been declared before"
    +    if "?" in @context then o.isExistentialEquals = true
    +    new Op(@context[...-1], left, new Assign(right, @value, '=')).compileToFragments o
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile the assignment from an array splice literal, using JavaScript's +Array#splice method. +

    + +
    + +
      compileSplice: (o) ->
    +    {range: {from, to, exclusive}} = @variable.properties.pop()
    +    name = @variable.compile o
    +    if from
    +      [fromDecl, fromRef] = @cacheToCodeFragments from.cache o, LEVEL_OP
    +    else
    +      fromDecl = fromRef = '0'
    +    if to
    +      if from?.isSimpleNumber() and to.isSimpleNumber()
    +        to = +to.compile(o) - +fromRef
    +        to += 1 unless exclusive
    +      else
    +        to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef
    +        to += ' + 1' unless exclusive
    +    else
    +      to = "9e9"
    +    [valDef, valRef] = @value.cache o, LEVEL_LIST
    +    answer = [].concat @makeCode("[].splice.apply(#{name}, [#{fromDecl}, #{to}].concat("), valDef, @makeCode(")), "), valRef
    +    if o.level > LEVEL_TOP then @wrapInBraces answer else answer
    + +
  • + + +
  • +
    + +
    + +
    +

    Code

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A function definition. This is the only node that creates a new Scope. When for the purposes of walking the contents of a function body, the Code -has no children -- they're within the inner scope.

  • exports.Code = class Code extends Base
    -  constructor: (params, body, tag) ->
    -    @params  = params or []
    -    @body    = body or new Block
    -    @bound   = tag is 'boundfunc'
    -    @context = '_this' if @bound
    -
    -  children: ['params', 'body']
    -
    -  isStatement: -> !!@ctor
    -
    -  jumps: NO

    Compilation creates a new scope unless explicitly asked to share with the +has no children -- they're within the inner scope. +

    + + + +
    exports.Code = class Code extends Base
    +  constructor: (params, body, tag) ->
    +    @params  = params or []
    +    @body    = body or new Block
    +    @bound   = tag is 'boundfunc'
    +    @context = '_this' if @bound
    +
    +  children: ['params', 'body']
    +
    +  isStatement: -> !!@ctor
    +
    +  jumps: NO
    + + + + +
  • +
    + +
    + +
    +

    Compilation creates a new scope unless explicitly asked to share with the outer scope. Handles splat parameters in the parameter list by peeking at the JavaScript arguments object. If the function is bound with the => arrow, generates a wrapper that saves the current value of this through -a closure.

  •   compileNode: (o) ->
    -    o.scope         = new Scope o.scope, @body, this
    -    o.scope.shared  = del(o, 'sharedScope')
    -    o.indent        += TAB
    -    delete o.bare
    -    delete o.isExistentialEquals
    -    params = []
    -    exprs  = []
    -    for name in @paramNames() # this step must be performed before the others
    -      unless o.scope.check name then o.scope.parameter name
    -    for param in @params when param.splat
    -      for {name: p} in @params
    -        if p.this then p = p.properties[0].name
    -        if p.value then o.scope.add p.value, 'var', yes
    -      splats = new Assign new Value(new Arr(p.asReference o for p in @params)),
    -                          new Value new Literal 'arguments'
    -      break
    -    for param in @params
    -      if param.isComplex()
    -        val = ref = param.asReference o
    -        val = new Op '?', ref, param.value if param.value
    -        exprs.push new Assign new Value(param.name), val, '=', param: yes
    -      else
    -        ref = param
    -        if param.value
    -          lit = new Literal ref.name.value + ' == null'
    -          val = new Assign new Value(param.name), param.value, '='
    -          exprs.push new If lit, val
    -      params.push ref unless splats
    -    wasEmpty = @body.isEmpty()
    -    exprs.unshift splats if splats
    -    @body.expressions.unshift exprs... if exprs.length
    -    for p, i in params
    -      params[i] = p.compileToFragments o
    -      o.scope.parameter fragmentsToText params[i]
    -    uniqs = []
    -    for name in @paramNames()
    -      throw SyntaxError "multiple parameters named '#{name}'" if name in uniqs
    -      uniqs.push name
    -    @body.makeReturn() unless wasEmpty or @noReturn
    -    if @bound
    -      if o.scope.parent.method?.bound
    -        @bound = @context = o.scope.parent.method.context
    -      else if not @static
    -        o.scope.parent.assign '_this', 'this'
    -    idt   = o.indent
    -    code  = 'function'
    -    code  += ' ' + @name if @ctor
    -    code  += '('
    -    answer = [@makeCode(code)]
    -    for p, i in params
    -      if i then answer.push @makeCode ", "
    -      answer.push p...
    -    answer.push @makeCode ') {'
    -    answer = answer.concat(@makeCode("\n"), @body.compileWithDeclarations(o), @makeCode("\n#{@tab}")) unless @body.isEmpty()
    -    answer.push @makeCode '}'
    -
    -    return [@makeCode(@tab), answer...] if @ctor
    -    if @front or (o.level >= LEVEL_ACCESS) then @wrapInBraces answer else answer

    A list of parameter names, excluding those generated by the compiler.

      paramNames: ->
    -    names = []
    -    names.push param.names()... for param in @params
    -    names

    Short-circuit traverseChildren method to prevent it from crossing scope boundaries -unless crossScope is true.

      traverseChildren: (crossScope, func) ->
    -    super(crossScope, func) if crossScope

    Param

    A parameter in a function definition. Beyond a typical Javascript parameter, +a closure. +

    + + + +
      compileNode: (o) ->
    +    o.scope         = new Scope o.scope, @body, this
    +    o.scope.shared  = del(o, 'sharedScope')
    +    o.indent        += TAB
    +    delete o.bare
    +    delete o.isExistentialEquals
    +    params = []
    +    exprs  = []
    +    @eachParamName (name) -> # this step must be performed before the others
    +      unless o.scope.check name then o.scope.parameter name
    +    for param in @params when param.splat
    +      for {name: p} in @params
    +        if p.this then p = p.properties[0].name
    +        if p.value then o.scope.add p.value, 'var', yes
    +      splats = new Assign new Value(new Arr(p.asReference o for p in @params)),
    +                          new Value new Literal 'arguments'
    +      break
    +    for param in @params
    +      if param.isComplex()
    +        val = ref = param.asReference o
    +        val = new Op '?', ref, param.value if param.value
    +        exprs.push new Assign new Value(param.name), val, '=', param: yes
    +      else
    +        ref = param
    +        if param.value
    +          lit = new Literal ref.name.value + ' == null'
    +          val = new Assign new Value(param.name), param.value, '='
    +          exprs.push new If lit, val
    +      params.push ref unless splats
    +    wasEmpty = @body.isEmpty()
    +    exprs.unshift splats if splats
    +    @body.expressions.unshift exprs... if exprs.length
    +    for p, i in params
    +      params[i] = p.compileToFragments o
    +      o.scope.parameter fragmentsToText params[i]
    +    uniqs = []
    +    @eachParamName (name, node) ->
    +      node.error "multiple parameters named '#{name}'" if name in uniqs
    +      uniqs.push name
    +    @body.makeReturn() unless wasEmpty or @noReturn
    +    if @bound
    +      if o.scope.parent.method?.bound
    +        @bound = @context = o.scope.parent.method.context
    +      else if not @static
    +        o.scope.parent.assign '_this', 'this'
    +    idt   = o.indent
    +    code  = 'function'
    +    code  += ' ' + @name if @ctor
    +    code  += '('
    +    answer = [@makeCode(code)]
    +    for p, i in params
    +      if i then answer.push @makeCode ", "
    +      answer.push p...
    +    answer.push @makeCode ') {'
    +    answer = answer.concat(@makeCode("\n"), @body.compileWithDeclarations(o), @makeCode("\n#{@tab}")) unless @body.isEmpty()
    +    answer.push @makeCode '}'
    +
    +    return [@makeCode(@tab), answer...] if @ctor
    +    if @front or (o.level >= LEVEL_ACCESS) then @wrapInBraces answer else answer
    +
    +  eachParamName: (iterator) ->
    +    param.eachName iterator for param in @params
    + + + + +
  • +
    + +
    + +
    +

    Short-circuit traverseChildren method to prevent it from crossing scope boundaries +unless crossScope is true. +

    + +
    + +
      traverseChildren: (crossScope, func) ->
    +    super(crossScope, func) if crossScope
    + +
  • + + +
  • +
    + +
    + +
    +

    Param

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A parameter in a function definition. Beyond a typical Javascript parameter, these parameters can also attach themselves to the context of the function, -as well as be a splat, gathering up a group of parameters into an array.

  • exports.Param = class Param extends Base
    -  constructor: (@name, @value, @splat) ->
    -    if (name = @name.unwrapAll().value) in STRICT_PROSCRIBED
    -      throw SyntaxError "parameter name \"#{name}\" is not allowed"
    -
    -  children: ['name', 'value']
    -
    -  compileToFragments: (o) ->
    -    @name.compileToFragments o, LEVEL_LIST
    -
    -  asReference: (o) ->
    -    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
    -    else if node.isComplex()
    -      node = new Literal o.scope.freeVariable 'arg'
    -    node = new Value node
    -    node = new Splat node if @splat
    -    @reference = node
    -
    -  isComplex: ->
    -    @name.isComplex()

    Finds the name or names of a Param; useful for detecting duplicates. -In a sense, a destructured parameter represents multiple JS parameters, -thus this method returns an Array of names. -Reserved words used as param names, as well as the Object and Array -literals used for destructured params, get a compiler generated name -during the Code compilation step, so this is necessarily an incomplete -list of a parameter's names.

      names: (name = @name)->
    -    atParam = (obj) ->
    -      {value} = obj.properties[0].name
    -      return if value.reserved then [] else [value]
      +as well as be a splat, gathering up a group of parameters into an array. +

      + + + +
      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"
      +
      +  children: ['name', 'value']
      +
      +  compileToFragments: (o) ->
      +    @name.compileToFragments o, LEVEL_LIST
      +
      +  asReference: (o) ->
      +    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
      +    else if node.isComplex()
      +      node = new Literal o.scope.freeVariable 'arg'
      +    node = new Value node
      +    node = new Splat node if @splat
      +    @reference = node
      +
      +  isComplex: ->
      +    @name.isComplex()
      + + + + +
    • +
      + +
      + +
      +

      Iterates the name or names of a Param. +In a sense, a destructured parameter represents multiple JS parameters. This +method allows to iterate them all. +The iterator function will be called as iterator(name, node) where +name is the name of the parameter and node is the AST node corresponding +to that name. +

      + +
      + +
        eachName: (iterator, name = @name)->
      +    atParam = (obj) ->
      +      node = obj.properties[0].name
      +      iterator node.value, node unless node.value.reserved
      + +
    • + + +
    • +
      + +
      + +
      +
      • simple literals foo
      • -
        return [name.value] if name instanceof Literal
      +
    + + + +
        return iterator name.value, name if name instanceof Literal
    + + + + +
  • +
    + +
    + +
    +
    • at-params @foo
    • -
  •     return atParam(name) if name instanceof Value
    -    names = []
    -    for obj in name.objects
      +
    + + + +
        return atParam name if name instanceof Value
    +    for obj in name.objects
    + + + + +
  • +
    + +
    + +
    +
    • assignments within destructured parameters {foo:bar}
    • -
  •       if obj instanceof Assign
    -        names.push @names(obj.value.unwrap())...
      +
    + + + +
          if obj instanceof Assign
    +        @eachName iterator, obj.value.unwrap()
    + + + + +
  • +
    + +
    + +
    +
    • splats within destructured parameters [xs...]
    • -
  •       else if obj instanceof Splat
    -        names.push obj.name.unwrap().value
    -      else if obj instanceof Value
      +
    + + + +
          else if obj instanceof Splat
    +        node = obj.name.unwrap()
    +        iterator node.value, node
    +      else if obj instanceof Value
    + + + + +
  • +
    + +
    + +
    +
    • destructured parameters within destructured parameters [{a}]
    • -
  •         if obj.isArray() or obj.isObject()
    -          names.push @names(obj.base)...
      +
    + + + +
            if obj.isArray() or obj.isObject()
    +          @eachName iterator, obj.base
    + + + + +
  • +
    + +
    + +
    +
    • at-params within destructured parameters {@foo}
    • -
  •         else if obj.this
    -          names.push atParam(obj)...
      +
    + + + +
            else if obj.this
    +          atParam obj
    + + + + +
  • +
    + +
    + +
    +
    • simple destructured parameters {foo}
    • -
  •         else names.push obj.base.value
    -      else
    -        throw SyntaxError "illegal parameter #{obj.compile()}"
    -    names

    Splat

    A splat, either as a parameter to a function, an argument to a call, -or as part of a destructuring assignment.

    exports.Splat = class Splat extends Base
    -
    -  children: ['name']
    -
    -  isAssignable: YES
    -
    -  constructor: (name) ->
    -    @name = if name.compile then name else new Literal name
    -
    -  assigns: (name) ->
    -    @name.assigns name
    -
    -  compileToFragments: (o) ->
    -    @name.compileToFragments o
    -
    -  unwrap: -> @name

    Utility function that converts an arbitrary number of elements, mixed with -splats, to a proper array.

      @compileSplattedArray: (o, list, apply) ->
    -    index = -1
    -    continue while (node = list[++index]) and node not instanceof Splat
    -    return [] if index >= list.length
    -    if list.length is 1
    -      node = list[0]
    -      fragments = node.compileToFragments o, LEVEL_LIST
    -      return fragments if apply
    -      return [].concat node.makeCode("#{ utility 'slice' }.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(")")
    -      else [].concat node.makeCode("["), compiledNode, node.makeCode("]")
    -    if index is 0
    -      node = list[0]
    -      concatPart = (node.joinFragmentArrays args[1..], ', ')
    -      return args[0].concat node.makeCode(".concat("), concatPart, node.makeCode(")")
    -    base = (node.compileToFragments o, LEVEL_LIST for node in list[...index])
    -    base = list[0].joinFragmentArrays base, ', '
    -    concatPart = list[index].joinFragmentArrays args, ', '
    -    [].concat list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last list).makeCode(")")

    While

    A while loop, the only sort of low-level loop exposed by CoffeeScript. From + + + + +

            else iterator obj.base.value, obj.base
    +      else
    +        obj.error "illegal parameter #{obj.compile()}"
    +    return
    + + + + +
  • +
    + +
    + +
    +

    Splat

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A splat, either as a parameter to a function, an argument to a call, +or as part of a destructuring assignment. +

    + +
    + +
    exports.Splat = class Splat extends Base
    +
    +  children: ['name']
    +
    +  isAssignable: YES
    +
    +  constructor: (name) ->
    +    @name = if name.compile then name else new Literal name
    +
    +  assigns: (name) ->
    +    @name.assigns name
    +
    +  compileToFragments: (o) ->
    +    @name.compileToFragments o
    +
    +  unwrap: -> @name
    + +
  • + + +
  • +
    + +
    + +
    +

    Utility function that converts an arbitrary number of elements, mixed with +splats, to a proper array. +

    + +
    + +
      @compileSplattedArray: (o, list, apply) ->
    +    index = -1
    +    continue while (node = list[++index]) and node not instanceof Splat
    +    return [] if index >= list.length
    +    if list.length is 1
    +      node = list[0]
    +      fragments = node.compileToFragments o, LEVEL_LIST
    +      return fragments if apply
    +      return [].concat node.makeCode("#{ utility 'slice' }.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(")")
    +      else [].concat node.makeCode("["), compiledNode, node.makeCode("]")
    +    if index is 0
    +      node = list[0]
    +      concatPart = (node.joinFragmentArrays args[1..], ', ')
    +      return args[0].concat node.makeCode(".concat("), concatPart, node.makeCode(")")
    +    base = (node.compileToFragments o, LEVEL_LIST for node in list[...index])
    +    base = list[0].joinFragmentArrays base, ', '
    +    concatPart = list[index].joinFragmentArrays args, ', '
    +    [].concat list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last list).makeCode(")")
    + +
  • + + +
  • +
    + +
    + +
    +

    While

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A while loop, the only sort of low-level loop exposed by CoffeeScript. From it, all other loops can be manufactured. Useful in cases where you need more -flexibility or more speed than a comprehension can provide.

  • exports.While = class While extends Base
    -  constructor: (condition, options) ->
    -    @condition = if options?.invert then condition.invert() else condition
    -    @guard     = options?.guard
    -
    -  children: ['condition', 'guard', 'body']
    -
    -  isStatement: YES
    -
    -  makeReturn: (res) ->
    -    if res
    -      super
    -    else
    -      @returns = not @jumps loop: yes
    -      this
    -
    -  addBody: (@body) ->
    -    this
    -
    -  jumps: ->
    -    {expressions} = @body
    -    return no unless expressions.length
    -    for node in expressions
    -      return node if node.jumps loop: yes
    -    no

    The main difference from a JavaScript while is that the CoffeeScript +flexibility or more speed than a comprehension can provide. +

    + + + +
    exports.While = class While extends Base
    +  constructor: (condition, options) ->
    +    @condition = if options?.invert then condition.invert() else condition
    +    @guard     = options?.guard
    +
    +  children: ['condition', 'guard', 'body']
    +
    +  isStatement: YES
    +
    +  makeReturn: (res) ->
    +    if res
    +      super
    +    else
    +      @returns = not @jumps loop: yes
    +      this
    +
    +  addBody: (@body) ->
    +    this
    +
    +  jumps: ->
    +    {expressions} = @body
    +    return no unless expressions.length
    +    for node in expressions
    +      return node if node.jumps loop: yes
    +    no
    + + + + +
  • +
    + +
    + +
    +

    The main difference from a JavaScript while is that the CoffeeScript while can be used as a part of a larger expression -- while loops may -return an array containing the computed result of each iteration.

  •   compileNode: (o) ->
    -    o.indent += TAB
    -    set      = ''
    -    {body}   = this
    -    if body.isEmpty()
    -      body = ''
    -    else
    -      if @returns
    -        body.makeReturn rvar = o.scope.freeVariable 'results'
    -        set  = "#{@tab}#{rvar} = [];\n"
    -      if @guard
    -        if body.expressions.length > 1
    -          body.expressions.unshift new If (new Parens @guard).invert(), new Literal "continue"
    -        else
    -          body = Block.wrap [new If @guard, body] if @guard
    -      body = [].concat @makeCode("\n"), (body.compileToFragments o, LEVEL_TOP), @makeCode("\n#{@tab}")
    -    answer = [].concat @makeCode(set + @tab + "while ("), @condition.compileToFragments(o, LEVEL_PAREN),
    -      @makeCode(") {"), body, @makeCode("}")
    -    if @returns
    -      answer.push @makeCode "\n#{@tab}return #{rvar};"
    -    answer

    Op

    Simple Arithmetic and logical operations. Performs some conversion from -CoffeeScript operations into their JavaScript equivalents.

    exports.Op = class Op extends Base
    -  constructor: (op, first, second, flip ) ->
    -    return new In first, second if op is 'in'
    -    if op is 'do'
    -      return @generateDo first
    -    if op is 'new'
    -      return first.newInstance() if first instanceof Call and not first.do and not first.isNew
    -      first = new Parens first   if first instanceof Code and first.bound or first.do
    -    @operator = CONVERSIONS[op] or op
    -    @first    = first
    -    @second   = second
    -    @flip     = !!flip
    -    return this

    The map of conversions from CoffeeScript to JavaScript symbols.

      CONVERSIONS =
    -    '==': '==='
    -    '!=': '!=='
    -    'of': 'in'

    The map of invertible operators.

      INVERSIONS =
    -    '!==': '==='
    -    '===': '!=='
    -
    -  children: ['first', 'second']
    -
    -  isSimpleNumber: NO
    -
    -  isUnary: ->
    -    not @second
    -
    -  isComplex: ->
    -    not (@isUnary() and (@operator in ['+', '-'])) or @first.isComplex()

    Am I capable of -Python-style comparison chaining?

      isChainable: ->
    -    @operator in ['<', '>', '>=', '<=', '===', '!==']
    -
    -  invert: ->
    -    if @isChainable() and @first.isChainable()
    -      allInvertable = yes
    -      curr = this
    -      while curr and curr.operator
    -        allInvertable and= (curr.operator of INVERSIONS)
    -        curr = curr.first
    -      return new Parens(this).invert() unless allInvertable
    -      curr = this
    -      while curr and curr.operator
    -        curr.invert = !curr.invert
    -        curr.operator = INVERSIONS[curr.operator]
    -        curr = curr.first
    -      this
    -    else if op = INVERSIONS[@operator]
    -      @operator = op
    -      if @first.unwrap() instanceof Op
    -        @first.invert()
    -      this
    -    else if @second
    -      new Parens(this).invert()
    -    else if @operator is '!' and (fst = @first.unwrap()) instanceof Op and
    -                                  fst.operator in ['!', 'in', 'instanceof']
    -      fst
    -    else
    -      new Op '!', this
    -
    -  unfoldSoak: (o) ->
    -    @operator in ['++', '--', 'delete'] and unfoldSoak o, this, 'first'
    -
    -  generateDo: (exp) ->
    -    passedParams = []
    -    func = if exp instanceof Assign and (ref = exp.value.unwrap()) instanceof Code
    -      ref
    -    else
    -      exp
    -    for param in func.params or []
    -      if param.value
    -        passedParams.push param.value
    -        delete param.value
    -      else
    -        passedParams.push param
    -    call = new Call exp, passedParams
    -    call.do = yes
    -    call
    -
    -  compileNode: (o) ->
    -    isChain = @isChainable() and @first.isChainable()

    In chains, there's no need to wrap bare obj literals in parens, -as the chained expression is wrapped.

        @first.front = @front unless isChain
    -    if @operator is 'delete' and o.scope.check(@first.unwrapAll().value)
    -      throw SyntaxError 'delete operand may not be argument or var'
    -    if @operator in ['--', '++'] and @first.unwrapAll().value in STRICT_PROSCRIBED
    -      throw SyntaxError 'prefix increment/decrement may not have eval or arguments operand'
    -    return @compileUnary     o if @isUnary()
    -    return @compileChain     o if isChain
    -    return @compileExistence o if @operator is '?'
    -    answer = [].concat @first.compileToFragments(o, LEVEL_OP), @makeCode(' ' + @operator + ' '),
    -            @second.compileToFragments(o, LEVEL_OP)
    -    if o.level <= LEVEL_OP then answer else @wrapInBraces answer

    Mimic Python's chained comparisons when multiple comparison operators are -used sequentially. For example:

    - -
    bin/coffee -e 'console.log 50 < 65 > 10'
    -true
    -
      compileChain: (o) ->
    -    [@first.second, shared] = @first.second.cache o
    -    fst = @first.compileToFragments o, LEVEL_OP
    -    fragments = fst.concat @makeCode(" #{if @invert then '&&' else '||'} "),
    -      (shared.compileToFragments o), @makeCode(" #{@operator} "), (@second.compileToFragments o, LEVEL_OP)
    -    @wrapInBraces fragments
    -
    -  compileExistence: (o) ->
    -    if @first.isComplex()
    -      ref = new Literal o.scope.freeVariable 'ref'
    -      fst = new Parens new Assign ref, @first
    -    else
    -      fst = @first
    -      ref = fst
    -    new If(new Existence(fst), ref, type: 'if').addElse(@second).compileToFragments o

    Compile a unary Op.

      compileUnary: (o) ->
    -    parts = []
    -    op = @operator
    -    parts.push [@makeCode op]
    -    if op is '!' and @first instanceof Existence
    -      @first.negated = not @first.negated
    -      return @first.compileToFragments o
    -    if o.level >= LEVEL_ACCESS
    -      return (new Parens this).compileToFragments o
    -    plusMinus = op in ['+', '-']
    -    parts.push [@makeCode(' ')] if op in ['new', 'typeof', 'delete'] or
    -                      plusMinus and @first instanceof Op and @first.operator is op
    -    if (plusMinus && @first instanceof Op) or (op is 'new' and @first.isStatement o)
    -      @first = new Parens @first
    -    parts.push @first.compileToFragments o, LEVEL_OP
    -    parts.reverse() if @flip
    -    @joinFragmentArrays parts, ''
    -
    -  toString: (idt) ->
    -    super idt, @constructor.name + ' ' + @operator

    In

    exports.In = class In extends Base
    -  constructor: (@object, @array) ->
    -
    -  children: ['object', 'array']
    -
    -  invert: NEGATE
    -
    -  compileNode: (o) ->
    -    if @array instanceof Value and @array.isArray()
    -      for obj in @array.base.objects when obj instanceof Splat
    -        hasSplat = yes
    -        break

    compileOrTest only if we have an array literal with no splats

          return @compileOrTest o unless hasSplat
    -    @compileLoopTest o
    -
    -  compileOrTest: (o) ->
    -    return [@makeCode("#{!!@negated}")] if @array.base.objects.length is 0
    -    [sub, ref] = @object.cache o, LEVEL_OP
    -    [cmp, cnj] = if @negated then [' !== ', ' && '] else [' === ', ' || ']
    -    tests = []
    -    for item, i in @array.base.objects
    -      if i then tests.push @makeCode cnj
    -      tests = tests.concat (if i then ref else sub), @makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)
    -    if o.level < LEVEL_OP then tests else @wrapInBraces tests
    -
    -  compileLoopTest: (o) ->
    -    [sub, ref] = @object.cache o, LEVEL_LIST
    -    fragments = [].concat @makeCode(utility('indexOf') + ".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
    -    if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments
    -
    -  toString: (idt) ->
    -    super idt, @constructor.name + if @negated then '!' else ''

    Try

    A classic try/catch/finally block.

    exports.Try = class Try extends Base
    -  constructor: (@attempt, @error, @recovery, @ensure) ->
    -
    -  children: ['attempt', 'recovery', 'ensure']
    -
    -  isStatement: YES
    -
    -  jumps: (o) -> @attempt.jumps(o) or @recovery?.jumps(o)
    -
    -  makeReturn: (res) ->
    -    @attempt  = @attempt .makeReturn res if @attempt
    -    @recovery = @recovery.makeReturn res if @recovery
    -    this

    Compilation is more or less as you would expect -- the finally clause -is optional, the catch is not.

      compileNode: (o) ->
    -    o.indent  += TAB
    -    tryPart   = @attempt.compileToFragments o, LEVEL_TOP
    -
    -    catchPart = if @recovery
    -      if @error.isObject?()
    -        placeholder = new Literal '_error'
    -        @recovery.unshift new Assign @error, placeholder
    -        @error = placeholder
    -      if @error.value in STRICT_PROSCRIBED
    -        throw SyntaxError "catch variable may not be \"#{@error.value}\""
    -      o.scope.add @error.value, 'param' unless o.scope.check @error.value
    -      [].concat @makeCode(" catch ("), @error.compileToFragments(o), @makeCode(") {\n"),
    -        @recovery.compileToFragments(o, LEVEL_TOP), @makeCode("\n#{@tab}}")
    -    else unless @ensure or @recovery
    -      [@makeCode(' catch (_error) {}')]
    -    else
    -      []
    -
    -    ensurePart = if @ensure then ([].concat @makeCode(" finally {\n"), (@ensure.compileToFragments o, LEVEL_TOP), @makeCode("\n#{@tab}}")) else []
    -
    -    [].concat @makeCode("#{@tab}try {\n"),
    -      tryPart,
    -      @makeCode("\n#{@tab}}"), catchPart, ensurePart

    Throw

    Simple node to throw an exception.

    exports.Throw = class Throw extends Base
    -  constructor: (@expression) ->
    -
    -  children: ['expression']
    -
    -  isStatement: YES
    -  jumps:       NO

    A Throw is already a return, of sorts...

      makeReturn: THIS
    -
    -  compileNode: (o) ->
    -    [].concat @makeCode(@tab + "throw "), (@expression.compileToFragments o), @makeCode(";")

    Existence

    Checks a variable for existence -- not null and not undefined. This is +return an array containing the computed result of each iteration. +

    + + + +
      compileNode: (o) ->
    +    o.indent += TAB
    +    set      = ''
    +    {body}   = this
    +    if body.isEmpty()
    +      body = @makeCode ''
    +    else
    +      if @returns
    +        body.makeReturn rvar = o.scope.freeVariable 'results'
    +        set  = "#{@tab}#{rvar} = [];\n"
    +      if @guard
    +        if body.expressions.length > 1
    +          body.expressions.unshift new If (new Parens @guard).invert(), new Literal "continue"
    +        else
    +          body = Block.wrap [new If @guard, body] if @guard
    +      body = [].concat @makeCode("\n"), (body.compileToFragments o, LEVEL_TOP), @makeCode("\n#{@tab}")
    +    answer = [].concat @makeCode(set + @tab + "while ("), @condition.compileToFragments(o, LEVEL_PAREN),
    +      @makeCode(") {"), body, @makeCode("}")
    +    if @returns
    +      answer.push @makeCode "\n#{@tab}return #{rvar};"
    +    answer
    + + + + +
  • +
    + +
    + +
    +

    Op

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Simple Arithmetic and logical operations. Performs some conversion from +CoffeeScript operations into their JavaScript equivalents. +

    + +
    + +
    exports.Op = class Op extends Base
    +  constructor: (op, first, second, flip ) ->
    +    return new In first, second if op is 'in'
    +    if op is 'do'
    +      return @generateDo first
    +    if op is 'new'
    +      return first.newInstance() if first instanceof Call and not first.do and not first.isNew
    +      first = new Parens first   if first instanceof Code and first.bound or first.do
    +    @operator = CONVERSIONS[op] or op
    +    @first    = first
    +    @second   = second
    +    @flip     = !!flip
    +    return this
    + +
  • + + +
  • +
    + +
    + +
    +

    The map of conversions from CoffeeScript to JavaScript symbols. +

    + +
    + +
      CONVERSIONS =
    +    '==': '==='
    +    '!=': '!=='
    +    'of': 'in'
    + +
  • + + +
  • +
    + +
    + +
    +

    The map of invertible operators. +

    + +
    + +
      INVERSIONS =
    +    '!==': '==='
    +    '===': '!=='
    +
    +  children: ['first', 'second']
    +
    +  isSimpleNumber: NO
    +
    +  isUnary: ->
    +    not @second
    +
    +  isComplex: ->
    +    not (@isUnary() and @operator in ['+', '-']) or @first.isComplex()
    + +
  • + + +
  • +
    + +
    + +
    +

    Am I capable of +Python-style comparison chaining? +

    + +
    + +
      isChainable: ->
    +    @operator in ['<', '>', '>=', '<=', '===', '!==']
    +
    +  invert: ->
    +    if @isChainable() and @first.isChainable()
    +      allInvertable = yes
    +      curr = this
    +      while curr and curr.operator
    +        allInvertable and= (curr.operator of INVERSIONS)
    +        curr = curr.first
    +      return new Parens(this).invert() unless allInvertable
    +      curr = this
    +      while curr and curr.operator
    +        curr.invert = !curr.invert
    +        curr.operator = INVERSIONS[curr.operator]
    +        curr = curr.first
    +      this
    +    else if op = INVERSIONS[@operator]
    +      @operator = op
    +      if @first.unwrap() instanceof Op
    +        @first.invert()
    +      this
    +    else if @second
    +      new Parens(this).invert()
    +    else if @operator is '!' and (fst = @first.unwrap()) instanceof Op and
    +                                  fst.operator in ['!', 'in', 'instanceof']
    +      fst
    +    else
    +      new Op '!', this
    +
    +  unfoldSoak: (o) ->
    +    @operator in ['++', '--', 'delete'] and unfoldSoak o, this, 'first'
    +
    +  generateDo: (exp) ->
    +    passedParams = []
    +    func = if exp instanceof Assign and (ref = exp.value.unwrap()) instanceof Code
    +      ref
    +    else
    +      exp
    +    for param in func.params or []
    +      if param.value
    +        passedParams.push param.value
    +        delete param.value
    +      else
    +        passedParams.push param
    +    call = new Call exp, passedParams
    +    call.do = yes
    +    call
    +
    +  compileNode: (o) ->
    +    isChain = @isChainable() and @first.isChainable()
    + +
  • + + +
  • +
    + +
    + +
    +

    In chains, there's no need to wrap bare obj literals in parens, +as the chained expression is wrapped. +

    + +
    + +
        @first.front = @front unless isChain
    +    if @operator is 'delete' and o.scope.check(@first.unwrapAll().value)
    +      @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 @compileUnary     o if @isUnary()
    +    return @compileChain     o if isChain
    +    return @compileExistence o if @operator is '?'
    +    answer = [].concat @first.compileToFragments(o, LEVEL_OP), @makeCode(' ' + @operator + ' '),
    +            @second.compileToFragments(o, LEVEL_OP)
    +    if o.level <= LEVEL_OP then answer else @wrapInBraces answer
    + +
  • + + +
  • +
    + +
    + +
    +

    Mimic Python's chained comparisons when multiple comparison operators are +used sequentially. For example: + +

    +
    bin/coffee -e 'console.log 50 < 65 > 10'
    +true
    + +
    + +
      compileChain: (o) ->
    +    [@first.second, shared] = @first.second.cache o
    +    fst = @first.compileToFragments o, LEVEL_OP
    +    fragments = fst.concat @makeCode(" #{if @invert then '&&' else '||'} "),
    +      (shared.compileToFragments o), @makeCode(" #{@operator} "), (@second.compileToFragments o, LEVEL_OP)
    +    @wrapInBraces fragments
    + +
  • + + +
  • +
    + +
    + +
    +

    Keep reference to the left expression, unless this an existential assignment +

    + +
    + +
      compileExistence: (o) ->
    +    if !o.isExistentialEquals and @first.isComplex()
    +      ref = new Literal o.scope.freeVariable 'ref'
    +      fst = new Parens new Assign ref, @first
    +    else
    +      fst = @first
    +      ref = fst
    +    new If(new Existence(fst), ref, type: 'if').addElse(@second).compileToFragments o
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile a unary Op. +

    + +
    + +
      compileUnary: (o) ->
    +    parts = []
    +    op = @operator
    +    parts.push [@makeCode op]
    +    if op is '!' and @first instanceof Existence
    +      @first.negated = not @first.negated
    +      return @first.compileToFragments o
    +    if o.level >= LEVEL_ACCESS
    +      return (new Parens this).compileToFragments o
    +    plusMinus = op in ['+', '-']
    +    parts.push [@makeCode(' ')] if op in ['new', 'typeof', 'delete'] or
    +                      plusMinus and @first instanceof Op and @first.operator is op
    +    if (plusMinus and @first instanceof Op) or (op is 'new' and @first.isStatement o)
    +      @first = new Parens @first
    +    parts.push @first.compileToFragments o, LEVEL_OP
    +    parts.reverse() if @flip
    +    @joinFragmentArrays parts, ''
    +
    +  toString: (idt) ->
    +    super idt, @constructor.name + ' ' + @operator
    + +
  • + + +
  • +
    + +
    + +
    +

    In

    + +
    + +
    exports.In = class In extends Base
    +  constructor: (@object, @array) ->
    +
    +  children: ['object', 'array']
    +
    +  invert: NEGATE
    +
    +  compileNode: (o) ->
    +    if @array instanceof Value and @array.isArray()
    +      for obj in @array.base.objects when obj instanceof Splat
    +        hasSplat = yes
    +        break
    + +
  • + + +
  • +
    + +
    + +
    +

    compileOrTest only if we have an array literal with no splats +

    + +
    + +
          return @compileOrTest o unless hasSplat
    +    @compileLoopTest o
    +
    +  compileOrTest: (o) ->
    +    return [@makeCode("#{!!@negated}")] if @array.base.objects.length is 0
    +    [sub, ref] = @object.cache o, LEVEL_OP
    +    [cmp, cnj] = if @negated then [' !== ', ' && '] else [' === ', ' || ']
    +    tests = []
    +    for item, i in @array.base.objects
    +      if i then tests.push @makeCode cnj
    +      tests = tests.concat (if i then ref else sub), @makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)
    +    if o.level < LEVEL_OP then tests else @wrapInBraces tests
    +
    +  compileLoopTest: (o) ->
    +    [sub, ref] = @object.cache o, LEVEL_LIST
    +    fragments = [].concat @makeCode(utility('indexOf') + ".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
    +    if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments
    +
    +  toString: (idt) ->
    +    super idt, @constructor.name + if @negated then '!' else ''
    + +
  • + + +
  • +
    + +
    + +
    +

    Try

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A classic try/catch/finally block. +

    + +
    + +
    exports.Try = class Try extends Base
    +  constructor: (@attempt, @errorVariable, @recovery, @ensure) ->
    +
    +  children: ['attempt', 'recovery', 'ensure']
    +
    +  isStatement: YES
    +
    +  jumps: (o) -> @attempt.jumps(o) or @recovery?.jumps(o)
    +
    +  makeReturn: (res) ->
    +    @attempt  = @attempt .makeReturn res if @attempt
    +    @recovery = @recovery.makeReturn res if @recovery
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    Compilation is more or less as you would expect -- the finally clause +is optional, the catch is not. +

    + +
    + +
      compileNode: (o) ->
    +    o.indent  += TAB
    +    tryPart   = @attempt.compileToFragments o, LEVEL_TOP
    +
    +    catchPart = if @recovery
    +      placeholder = new Literal '_error'
    +      @recovery.unshift new Assign @errorVariable, placeholder if @errorVariable
    +      [].concat @makeCode(" catch ("), placeholder.compileToFragments(o), @makeCode(") {\n"),
    +        @recovery.compileToFragments(o, LEVEL_TOP), @makeCode("\n#{@tab}}")
    +    else unless @ensure or @recovery
    +      [@makeCode(' catch (_error) {}')]
    +    else
    +      []
    +
    +    ensurePart = if @ensure then ([].concat @makeCode(" finally {\n"), @ensure.compileToFragments(o, LEVEL_TOP),
    +      @makeCode("\n#{@tab}}")) else []
    +
    +    [].concat @makeCode("#{@tab}try {\n"),
    +      tryPart,
    +      @makeCode("\n#{@tab}}"), catchPart, ensurePart
    + +
  • + + +
  • +
    + +
    + +
    +

    Throw

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Simple node to throw an exception. +

    + +
    + +
    exports.Throw = class Throw extends Base
    +  constructor: (@expression) ->
    +
    +  children: ['expression']
    +
    +  isStatement: YES
    +  jumps:       NO
    + +
  • + + +
  • +
    + +
    + +
    +

    A Throw is already a return, of sorts... +

    + +
    + +
      makeReturn: THIS
    +
    +  compileNode: (o) ->
    +    [].concat @makeCode(@tab + "throw "), @expression.compileToFragments(o), @makeCode(";")
    + +
  • + + +
  • +
    + +
    + +
    +

    Existence

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Checks a variable for existence -- not null and not undefined. This is similar to .nil? in Ruby, and avoids having to consult a JavaScript truth -table.

  • exports.Existence = class Existence extends Base
    -  constructor: (@expression) ->
    -
    -  children: ['expression']
    -
    -  invert: NEGATE
    -
    -  compileNode: (o) ->
    -    @expression.front = @front
    -    code = @expression.compile o, LEVEL_OP
    -    if IDENTIFIER.test(code) and not o.scope.check code
    -      [cmp, cnj] = if @negated then ['===', '||'] else ['!==', '&&']
    -      code = "typeof #{code} #{cmp} \"undefined\" #{cnj} #{code} #{cmp} null"
    -    else

    do not use strict equality here; it will break existing code

          code = "#{code} #{if @negated then '==' else '!='} null"
    -    [@makeCode(if o.level <= LEVEL_COND then code else "(#{code})")]

    Parens

    An extra set of parentheses, specified explicitly in the source. At one time +table. +

    + + + +
    exports.Existence = class Existence extends Base
    +  constructor: (@expression) ->
    +
    +  children: ['expression']
    +
    +  invert: NEGATE
    +
    +  compileNode: (o) ->
    +    @expression.front = @front
    +    code = @expression.compile o, LEVEL_OP
    +    if IDENTIFIER.test(code) and not o.scope.check code
    +      [cmp, cnj] = if @negated then ['===', '||'] else ['!==', '&&']
    +      code = "typeof #{code} #{cmp} \"undefined\" #{cnj} #{code} #{cmp} null"
    +    else
    + + + + +
  • +
    + +
    + +
    +

    do not use strict equality here; it will break existing code +

    + +
    + +
          code = "#{code} #{if @negated then '==' else '!='} null"
    +    [@makeCode(if o.level <= LEVEL_COND then code else "(#{code})")]
    + +
  • + + +
  • +
    + +
    + +
    +

    Parens

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    An extra set of parentheses, specified explicitly in the source. At one time we tried to clean up the results by detecting and removing redundant -parentheses, but no longer -- you can put in as many as you please.

    - -

    Parentheses are a good way to force any statement to become an expression.

  • exports.Parens = class Parens extends Base
    -  constructor: (@body) ->
    -
    -  children: ['body']
    -
    -  unwrap    : -> @body
    -  isComplex : -> @body.isComplex()
    -
    -  compileNode: (o) ->
    -    expr = @body.unwrap()
    -    if expr instanceof Value and expr.isAtomic()
    -      expr.front = @front
    -      return expr.compileToFragments o
    -    fragments = expr.compileToFragments o, LEVEL_PAREN
    -    bare = o.level < LEVEL_OP and (expr instanceof Op or expr instanceof Call or
    -      (expr instanceof For and expr.returns))
    -    if bare then fragments else @wrapInBraces fragments

    For

    CoffeeScript's replacement for the for loop is our array and object +parentheses, but no longer -- you can put in as many as you please. + +

    +

    Parentheses are a good way to force any statement to become an expression. +

    + + + +
    exports.Parens = class Parens extends Base
    +  constructor: (@body) ->
    +
    +  children: ['body']
    +
    +  unwrap    : -> @body
    +  isComplex : -> @body.isComplex()
    +
    +  compileNode: (o) ->
    +    expr = @body.unwrap()
    +    if expr instanceof Value and expr.isAtomic()
    +      expr.front = @front
    +      return expr.compileToFragments o
    +    fragments = expr.compileToFragments o, LEVEL_PAREN
    +    bare = o.level < LEVEL_OP and (expr instanceof Op or expr instanceof Call or
    +      (expr instanceof For and expr.returns))
    +    if bare then fragments else @wrapInBraces fragments
    + + + + +
  • +
    + +
    + +
    +

    For

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    CoffeeScript's replacement for the for loop is our array and object comprehensions, that compile into for loops here. They also act as an -expression, able to return the result of each filtered iteration.

    +expression, able to return the result of each filtered iteration. +

    Unlike Python array comprehensions, they can be multi-line, and you can pass the current index of the loop as a second parameter. Unlike Ruby blocks, -you can map and filter in a single pass.

  • exports.For = class For extends While
    -  constructor: (body, source) ->
    -    {@source, @guard, @step, @name, @index} = source
    -    @body    = Block.wrap [body]
    -    @own     = !!source.own
    -    @object  = !!source.object
    -    [@name, @index] = [@index, @name] if @object
    -    throw SyntaxError 'index cannot be a pattern matching expression' if @index instanceof Value
    -    @range   = @source instanceof Value and @source.base instanceof Range and not @source.properties.length
    -    @pattern = @name instanceof Value
    -    throw SyntaxError 'indexes do not apply to range loops' if @range and @index
    -    throw SyntaxError 'cannot pattern match over range loops' if @range and @pattern
    -    @returns = false
    -
    -  children: ['body', 'source', 'guard', 'step']

    Welcome to the hairiest method in all of CoffeeScript. Handles the inner +you can map and filter in a single pass. +

    + + + +
    exports.For = class For extends While
    +  constructor: (body, source) ->
    +    {@source, @guard, @step, @name, @index} = source
    +    @body    = Block.wrap [body]
    +    @own     = !!source.own
    +    @object  = !!source.object
    +    [@name, @index] = [@index, @name] if @object
    +    @index.error 'index cannot be a pattern matching expression' if @index instanceof Value
    +    @range   = @source instanceof Value and @source.base instanceof Range and not @source.properties.length
    +    @pattern = @name instanceof Value
    +    @index.error 'indexes do not apply to range loops' if @range and @index
    +    @name.error 'cannot pattern match over range loops' if @range and @pattern
    +    @index.error 'cannot use own with for-in' if @own and not @object
    +    @returns = false
    +
    +  children: ['body', 'source', 'guard', 'step']
    + + + + +
  • +
    + +
    + +
    +

    Welcome to the hairiest method in all of CoffeeScript. Handles the inner loop, filtering, stepping, and result saving for array, object, and range comprehensions. Some of the generated code can be shared in common, and -some cannot.

  •   compileNode: (o) ->
    -    body      = Block.wrap [@body]
    -    lastJumps = last(body.expressions)?.jumps()
    -    @returns  = no if lastJumps and lastJumps instanceof Return
    -    source    = if @range then @source.base else @source
    -    scope     = o.scope
    -    name      = @name  and (@name.compile o, LEVEL_LIST)
    -    index     = @index and (@index.compile o, LEVEL_LIST)
    -    scope.find(name)  if name and not @pattern
    -    scope.find(index) if index
    -    rvar      = scope.freeVariable 'results' if @returns
    -    ivar      = (@object and index) or scope.freeVariable 'i'
    -    kvar      = (@range and name) or index or ivar
    -    kvarAssign = if kvar isnt ivar then "#{kvar} = " else ""
    -    if @step and not @range
    -      [step, stepVar] = @cacheToCodeFragments @step.cache o, LEVEL_LIST
    -      stepNum = stepVar.match SIMPLENUM
    -    name      = ivar if @pattern
    -    varPart   = ''
    -    guardPart = ''
    -    defPart   = ''
    -    idt1      = @tab + TAB
    -    if @range
    -      forPartFragments = source.compileToFragments merge(o, {index: ivar, name, @step})
    -    else
    -      svar    = @source.compile o, LEVEL_LIST
    -      if (name or @own) and not IDENTIFIER.test svar
    -        defPart    += "#{@tab}#{ref = scope.freeVariable 'ref'} = #{svar};\n"
    -        svar       = ref
    -      if name and not @pattern
    -        namePart   = "#{name} = #{svar}[#{kvar}]"
    -      if not @object
    -        defPart += "#{@tab}#{step};\n" if step isnt stepVar
    -        lvar = scope.freeVariable 'len' unless @step and stepNum and down = (+stepNum < 0)
    -        declare = "#{kvarAssign}#{ivar} = 0, #{lvar} = #{svar}.length"
    -        declareDown = "#{kvarAssign}#{ivar} = #{svar}.length - 1"
    -        compare = "#{ivar} < #{lvar}"
    -        compareDown = "#{ivar} >= 0"
    -        if @step
    -          if stepNum
    -            if down
    -              compare = compareDown
    -              declare = declareDown
    -          else
    -            compare = "#{stepVar} > 0 ? #{compare} : #{compareDown}"
    -            declare = "(#{stepVar} > 0 ? (#{declare}) : #{declareDown})"
    -          increment = "#{ivar} += #{stepVar}"
    -        else
    -          increment = "#{if kvar isnt ivar then "++#{ivar}" else "#{ivar}++"}"
    -        forPartFragments  = [@makeCode("#{declare}; #{compare}; #{kvarAssign}#{increment}")]
    -    if @returns
    -      resultPart   = "#{@tab}#{rvar} = [];\n"
    -      returnResult = "\n#{@tab}return #{rvar};"
    -      body.makeReturn rvar
    -    if @guard
    -      if body.expressions.length > 1
    -        body.expressions.unshift new If (new Parens @guard).invert(), new Literal "continue"
    -      else
    -        body = Block.wrap [new If @guard, body] if @guard
    -    if @pattern
    -      body.expressions.unshift new Assign @name, new Literal "#{svar}[#{kvar}]"
    -    defPartFragments = [].concat @makeCode(defPart), @pluckDirectCall(o, body)
    -    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
    -    bodyFragments = body.compileToFragments merge(o, indent: idt1), LEVEL_TOP
    -    if bodyFragments and (bodyFragments.length > 0)
    -      bodyFragments = [].concat @makeCode("\n"), bodyFragments, @makeCode("\n")
    -    [].concat defPartFragments, @makeCode("#{resultPart or ''}#{@tab}for ("),
    -      forPartFragments, @makeCode(") {#{guardPart}#{varPart}"), bodyFragments,
    -      @makeCode("#{@tab}}#{returnResult or ''}")
    -
    -  pluckDirectCall: (o, body) ->
    -    defs = []
    -    for expr, idx in body.expressions
    -      expr = expr.unwrapAll()
    -      continue unless expr instanceof Call
    -      val = expr.variable.unwrapAll()
    -      continue unless (val instanceof Code) or
    -                      (val instanceof Value and
    -                      val.base?.unwrapAll() instanceof Code and
    -                      val.properties.length is 1 and
    -                      val.properties[0].name?.value in ['call', 'apply'])
    -      fn    = val.base?.unwrapAll() or val
    -      ref   = new Literal o.scope.freeVariable 'fn'
    -      base  = new Value ref
    -      if val.base
    -        [val.base, base] = [base, val]
    -      body.expressions[idx] = new Call base, expr.args
    -      defs = defs.concat @makeCode(@tab), (new Assign(ref, fn).compileToFragments(o, LEVEL_TOP)), @makeCode(';\n')
    -    defs

    Switch

    A JavaScript switch statement. Converts into a returnable expression on-demand.

    exports.Switch = class Switch extends Base
    -  constructor: (@subject, @cases, @otherwise) ->
    -
    -  children: ['subject', 'cases', 'otherwise']
    -
    -  isStatement: YES
    -
    -  jumps: (o = {block: yes}) ->
    -    for [conds, block] in @cases
    -      return block if block.jumps o
    -    @otherwise?.jumps o
    -
    -  makeReturn: (res) ->
    -    pair[1].makeReturn res for pair in @cases
    -    @otherwise or= new Block [new Literal 'void 0'] if res
    -    @otherwise?.makeReturn res
    -    this
    -
    -  compileNode: (o) ->
    -    idt1 = o.indent + TAB
    -    idt2 = o.indent = idt1 + TAB
    -    fragments = [].concat @makeCode(@tab + "switch ("),
    -      (if @subject then @subject.compileToFragments(o, LEVEL_PAREN) else @makeCode("false")),
    -      @makeCode(") {\n")
    -    for [conditions, block], i in @cases
    -      for cond in flatten [conditions]
    -        cond  = cond.invert() unless @subject
    -        fragments = fragments.concat @makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), @makeCode(":\n")
    -      fragments = fragments.concat body, @makeCode('\n') if (body = block.compileToFragments o, LEVEL_TOP).length > 0
    -      break if i is @cases.length - 1 and not @otherwise
    -      expr = @lastNonComment block.expressions
    -      continue if expr instanceof Return or (expr instanceof Literal and expr.jumps() and expr.value isnt 'debugger')
    -      fragments.push cond.makeCode(idt2 + 'break;\n')
    -    if @otherwise and @otherwise.expressions.length
    -      fragments.push @makeCode(idt1 + "default:\n"), (@otherwise.compileToFragments o, LEVEL_TOP)..., @makeCode("\n")
    -    fragments.push @makeCode @tab + '}'
    -    fragments

    If

    If/else statements. Acts as an expression by pushing down requested returns -to the last line of each clause.

    - +some cannot. +

    + + + +
      compileNode: (o) ->
    +    body      = Block.wrap [@body]
    +    lastJumps = last(body.expressions)?.jumps()
    +    @returns  = no if lastJumps and lastJumps instanceof Return
    +    source    = if @range then @source.base else @source
    +    scope     = o.scope
    +    name      = @name  and (@name.compile o, LEVEL_LIST)
    +    index     = @index and (@index.compile o, LEVEL_LIST)
    +    scope.find(name)  if name and not @pattern
    +    scope.find(index) if index
    +    rvar      = scope.freeVariable 'results' if @returns
    +    ivar      = (@object and index) or scope.freeVariable 'i'
    +    kvar      = (@range and name) or index or ivar
    +    kvarAssign = if kvar isnt ivar then "#{kvar} = " else ""
    +    if @step and not @range
    +      [step, stepVar] = @cacheToCodeFragments @step.cache o, LEVEL_LIST
    +      stepNum = stepVar.match SIMPLENUM
    +    name      = ivar if @pattern
    +    varPart   = ''
    +    guardPart = ''
    +    defPart   = ''
    +    idt1      = @tab + TAB
    +    if @range
    +      forPartFragments = source.compileToFragments merge(o, {index: ivar, name, @step})
    +    else
    +      svar    = @source.compile o, LEVEL_LIST
    +      if (name or @own) and not IDENTIFIER.test svar
    +        defPart    += "#{@tab}#{ref = scope.freeVariable 'ref'} = #{svar};\n"
    +        svar       = ref
    +      if name and not @pattern
    +        namePart   = "#{name} = #{svar}[#{kvar}]"
    +      if not @object
    +        defPart += "#{@tab}#{step};\n" if step isnt stepVar
    +        lvar = scope.freeVariable 'len' unless @step and stepNum and down = (+stepNum < 0)
    +        declare = "#{kvarAssign}#{ivar} = 0, #{lvar} = #{svar}.length"
    +        declareDown = "#{kvarAssign}#{ivar} = #{svar}.length - 1"
    +        compare = "#{ivar} < #{lvar}"
    +        compareDown = "#{ivar} >= 0"
    +        if @step
    +          if stepNum
    +            if down
    +              compare = compareDown
    +              declare = declareDown
    +          else
    +            compare = "#{stepVar} > 0 ? #{compare} : #{compareDown}"
    +            declare = "(#{stepVar} > 0 ? (#{declare}) : #{declareDown})"
    +          increment = "#{ivar} += #{stepVar}"
    +        else
    +          increment = "#{if kvar isnt ivar then "++#{ivar}" else "#{ivar}++"}"
    +        forPartFragments  = [@makeCode("#{declare}; #{compare}; #{kvarAssign}#{increment}")]
    +    if @returns
    +      resultPart   = "#{@tab}#{rvar} = [];\n"
    +      returnResult = "\n#{@tab}return #{rvar};"
    +      body.makeReturn rvar
    +    if @guard
    +      if body.expressions.length > 1
    +        body.expressions.unshift new If (new Parens @guard).invert(), new Literal "continue"
    +      else
    +        body = Block.wrap [new If @guard, body] if @guard
    +    if @pattern
    +      body.expressions.unshift new Assign @name, new Literal "#{svar}[#{kvar}]"
    +    defPartFragments = [].concat @makeCode(defPart), @pluckDirectCall(o, body)
    +    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
    +    bodyFragments = body.compileToFragments merge(o, indent: idt1), LEVEL_TOP
    +    if bodyFragments and (bodyFragments.length > 0)
    +      bodyFragments = [].concat @makeCode("\n"), bodyFragments, @makeCode("\n")
    +    [].concat defPartFragments, @makeCode("#{resultPart or ''}#{@tab}for ("),
    +      forPartFragments, @makeCode(") {#{guardPart}#{varPart}"), bodyFragments,
    +      @makeCode("#{@tab}}#{returnResult or ''}")
    +
    +  pluckDirectCall: (o, body) ->
    +    defs = []
    +    for expr, idx in body.expressions
    +      expr = expr.unwrapAll()
    +      continue unless expr instanceof Call
    +      val = expr.variable.unwrapAll()
    +      continue unless (val instanceof Code) or
    +                      (val instanceof Value and
    +                      val.base?.unwrapAll() instanceof Code and
    +                      val.properties.length is 1 and
    +                      val.properties[0].name?.value in ['call', 'apply'])
    +      fn    = val.base?.unwrapAll() or val
    +      ref   = new Literal o.scope.freeVariable 'fn'
    +      base  = new Value ref
    +      if val.base
    +        [val.base, base] = [base, val]
    +      body.expressions[idx] = new Call base, expr.args
    +      defs = defs.concat @makeCode(@tab), (new Assign(ref, fn).compileToFragments(o, LEVEL_TOP)), @makeCode(';\n')
    +    defs
    + + + + +
  • +
    + +
    + +
    +

    Switch

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A JavaScript switch statement. Converts into a returnable expression on-demand. +

    + +
    + +
    exports.Switch = class Switch extends Base
    +  constructor: (@subject, @cases, @otherwise) ->
    +
    +  children: ['subject', 'cases', 'otherwise']
    +
    +  isStatement: YES
    +
    +  jumps: (o = {block: yes}) ->
    +    for [conds, block] in @cases
    +      return block if block.jumps o
    +    @otherwise?.jumps o
    +
    +  makeReturn: (res) ->
    +    pair[1].makeReturn res for pair in @cases
    +    @otherwise or= new Block [new Literal 'void 0'] if res
    +    @otherwise?.makeReturn res
    +    this
    +
    +  compileNode: (o) ->
    +    idt1 = o.indent + TAB
    +    idt2 = o.indent = idt1 + TAB
    +    fragments = [].concat @makeCode(@tab + "switch ("),
    +      (if @subject then @subject.compileToFragments(o, LEVEL_PAREN) else @makeCode "false"),
    +      @makeCode(") {\n")
    +    for [conditions, block], i in @cases
    +      for cond in flatten [conditions]
    +        cond  = cond.invert() unless @subject
    +        fragments = fragments.concat @makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), @makeCode(":\n")
    +      fragments = fragments.concat body, @makeCode('\n') if (body = block.compileToFragments o, LEVEL_TOP).length > 0
    +      break if i is @cases.length - 1 and not @otherwise
    +      expr = @lastNonComment block.expressions
    +      continue if expr instanceof Return or (expr instanceof Literal and expr.jumps() and expr.value isnt 'debugger')
    +      fragments.push cond.makeCode(idt2 + 'break;\n')
    +    if @otherwise and @otherwise.expressions.length
    +      fragments.push @makeCode(idt1 + "default:\n"), (@otherwise.compileToFragments o, LEVEL_TOP)..., @makeCode("\n")
    +    fragments.push @makeCode @tab + '}'
    +    fragments
    + +
  • + + +
  • +
    + +
    + +
    +

    If

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    If/else statements. Acts as an expression by pushing down requested returns +to the last line of each clause. + +

    Single-expression Ifs are compiled into conditional operators if possible, -because ternaries are already proper expressions, and don't need conversion.

  • exports.If = class If extends Base
    -  constructor: (condition, @body, options = {}) ->
    -    @condition = if options.type is 'unless' then condition.invert() else condition
    -    @elseBody  = null
    -    @isChain   = false
    -    {@soak}    = options
    -
    -  children: ['condition', 'body', 'elseBody']
    -
    -  bodyNode:     -> @body?.unwrap()
    -  elseBodyNode: -> @elseBody?.unwrap()

    Rewrite a chain of Ifs to add a default case as the final else.

      addElse: (elseBody) ->
    -    if @isChain
    -      @elseBodyNode().addElse elseBody
    -    else
    -      @isChain  = elseBody instanceof If
    -      @elseBody = @ensureBlock elseBody
    -    this

    The If only compiles into a statement if either of its bodies needs -to be a statement. Otherwise a conditional operator is safe.

      isStatement: (o) ->
    -    o?.level is LEVEL_TOP or
    -      @bodyNode().isStatement(o) or @elseBodyNode()?.isStatement(o)
    -
    -  jumps: (o) -> @body.jumps(o) or @elseBody?.jumps(o)
    -
    -  compileNode: (o) ->
    -    if @isStatement o then @compileStatement o else @compileExpression o
    -
    -  makeReturn: (res) ->
    -    @elseBody  or= new Block [new Literal 'void 0'] if res
    -    @body     and= new Block [@body.makeReturn res]
    -    @elseBody and= new Block [@elseBody.makeReturn res]
    -    this
    -
    -  ensureBlock: (node) ->
    -    if node instanceof Block then node else new Block [node]

    Compile the If as a regular if-else statement. Flattened chains -force inner else bodies into statement form.

      compileStatement: (o) ->
    -    child    = del o, 'chainChild'
    -    exeq     = del o, 'isExistentialEquals'
    -
    -    if exeq
    -      return new If(@condition.invert(), @elseBodyNode(), type: 'if').compileToFragments o
    -
    -    indent   = o.indent + TAB
    -    cond     = @condition.compileToFragments o, LEVEL_PAREN
    -    body     = @ensureBlock(@body).compileToFragments merge o, {indent}
    -    ifPart   = [].concat @makeCode("if ("), cond, @makeCode(") {\n"), body, @makeCode("\n#{@tab}}")
    -    ifPart.unshift @makeCode @tab unless child
    -    return ifPart unless @elseBody
    -    answer = ifPart.concat @makeCode(' else ')
    -    if @isChain
    -      o.chainChild = yes
    -      answer = answer.concat @elseBody.unwrap().compileToFragments o, LEVEL_TOP
    -    else
    -      answer = answer.concat @makeCode("{\n"), @elseBody.compileToFragments(merge(o, {indent}), LEVEL_TOP), @makeCode("\n#{@tab}}")
    -    answer

    Compile the If as a conditional operator.

      compileExpression: (o) ->
    -    cond = @condition.compileToFragments o, LEVEL_COND
    -    body = @bodyNode().compileToFragments o, LEVEL_LIST
    -    alt  = if @elseBodyNode() then @elseBodyNode().compileToFragments(o, LEVEL_LIST) else [@makeCode('void 0')]
    -    fragments = cond.concat @makeCode(" ? "), body, @makeCode(" : "), alt
    -    if o.level >= LEVEL_COND then @wrapInBraces fragments else fragments
    -
    -  unfoldSoak: ->
    -    @soak and this

    Faux-Nodes

    - -

    Faux-nodes are never created by the grammar, but are used during code -generation to generate other combinations of nodes.

    Closure

    A faux-node used to wrap an expressions body in a closure.

    Closure =

    Wrap the expressions body, unless it contains a pure statement, +because ternaries are already proper expressions, and don't need conversion. +

    + + + +
    exports.If = class If extends Base
    +  constructor: (condition, @body, options = {}) ->
    +    @condition = if options.type is 'unless' then condition.invert() else condition
    +    @elseBody  = null
    +    @isChain   = false
    +    {@soak}    = options
    +
    +  children: ['condition', 'body', 'elseBody']
    +
    +  bodyNode:     -> @body?.unwrap()
    +  elseBodyNode: -> @elseBody?.unwrap()
    + + + + +
  • +
    + +
    + +
    +

    Rewrite a chain of Ifs to add a default case as the final else. +

    + +
    + +
      addElse: (elseBody) ->
    +    if @isChain
    +      @elseBodyNode().addElse elseBody
    +    else
    +      @isChain  = elseBody instanceof If
    +      @elseBody = @ensureBlock elseBody
    +    this
    + +
  • + + +
  • +
    + +
    + +
    +

    The If only compiles into a statement if either of its bodies needs +to be a statement. Otherwise a conditional operator is safe. +

    + +
    + +
      isStatement: (o) ->
    +    o?.level is LEVEL_TOP or
    +      @bodyNode().isStatement(o) or @elseBodyNode()?.isStatement(o)
    +
    +  jumps: (o) -> @body.jumps(o) or @elseBody?.jumps(o)
    +
    +  compileNode: (o) ->
    +    if @isStatement o then @compileStatement o else @compileExpression o
    +
    +  makeReturn: (res) ->
    +    @elseBody  or= new Block [new Literal 'void 0'] if res
    +    @body     and= new Block [@body.makeReturn res]
    +    @elseBody and= new Block [@elseBody.makeReturn res]
    +    this
    +
    +  ensureBlock: (node) ->
    +    if node instanceof Block then node else new Block [node]
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile the If as a regular if-else statement. Flattened chains +force inner else bodies into statement form. +

    + +
    + +
      compileStatement: (o) ->
    +    child    = del o, 'chainChild'
    +    exeq     = del o, 'isExistentialEquals'
    +
    +    if exeq
    +      return new If(@condition.invert(), @elseBodyNode(), type: 'if').compileToFragments o
    +
    +    indent   = o.indent + TAB
    +    cond     = @condition.compileToFragments o, LEVEL_PAREN
    +    body     = @ensureBlock(@body).compileToFragments merge o, {indent}
    +    ifPart   = [].concat @makeCode("if ("), cond, @makeCode(") {\n"), body, @makeCode("\n#{@tab}}")
    +    ifPart.unshift @makeCode @tab unless child
    +    return ifPart unless @elseBody
    +    answer = ifPart.concat @makeCode(' else ')
    +    if @isChain
    +      o.chainChild = yes
    +      answer = answer.concat @elseBody.unwrap().compileToFragments o, LEVEL_TOP
    +    else
    +      answer = answer.concat @makeCode("{\n"), @elseBody.compileToFragments(merge(o, {indent}), LEVEL_TOP), @makeCode("\n#{@tab}}")
    +    answer
    + +
  • + + +
  • +
    + +
    + +
    +

    Compile the If as a conditional operator. +

    + +
    + +
      compileExpression: (o) ->
    +    cond = @condition.compileToFragments o, LEVEL_COND
    +    body = @bodyNode().compileToFragments o, LEVEL_LIST
    +    alt  = if @elseBodyNode() then @elseBodyNode().compileToFragments(o, LEVEL_LIST) else [@makeCode('void 0')]
    +    fragments = cond.concat @makeCode(" ? "), body, @makeCode(" : "), alt
    +    if o.level >= LEVEL_COND then @wrapInBraces fragments else fragments
    +
    +  unfoldSoak: ->
    +    @soak and this
    + +
  • + + +
  • +
    + +
    + +
    +

    Faux-Nodes

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Faux-nodes are never created by the grammar, but are used during code +generation to generate other combinations of nodes. +

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Closure

    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    A faux-node used to wrap an expressions body in a closure. +

    + +
    + +
    Closure =
    + +
  • + + +
  • +
    + +
    + +
    +

    Wrap the expressions body, unless it contains a pure statement, in which case, no dice. If the body mentions this or arguments, -then make sure that the closure wrapper preserves the original values.

  •   wrap: (expressions, statement, noReturn) ->
    -    return expressions if expressions.jumps()
    -    func = new Code [], Block.wrap [expressions]
    -    args = []
    -    if (mentionsArgs = expressions.contains @literalArgs) or expressions.contains @literalThis
    -      if mentionsArgs and expressions.classBody
    -        throw SyntaxError "Class bodies shouldn't reference arguments"
    -      meth = new Literal if mentionsArgs then 'apply' else 'call'
    -      args = [new Literal 'this']
    -      args.push new Literal 'arguments' if mentionsArgs
    -      func = new Value func, [new Access meth]
    -    func.noReturn = noReturn
    -    call = new Call func, args
    -    if statement then Block.wrap [call] else call
    -
    -  literalArgs: (node) ->
    -    node instanceof Literal and node.value is 'arguments' and not node.asKey
    -
    -  literalThis: (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)

    Unfold a node's child if soak, then tuck the node under created If

    unfoldSoak = (o, parent, name) ->
    -  return unless ifn = parent[name].unfoldSoak o
    -  parent[name] = ifn.body
    -  ifn.body = new Value parent
    -  ifn

    Constants

    UTILITIES =

    Correctly set up a prototype chain for inheritance, including a reference -to the superclass for super() calls, and copies of any static properties.

      extends: -> """
    -    function(child, parent) { for (var key in parent) { if (#{utility '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; }
    -  """

    Discover if an item is in an array.

      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; }
    -  """

    Shortcuts to speed up the lookup time for native functions.

      hasProp: -> '{}.hasOwnProperty'
    -  slice  : -> '[].slice'

    Levels indicate a node's position in the AST. Useful for knowing if -parens are necessary or superfluous.

    LEVEL_TOP    = 1  # ...;
    -LEVEL_PAREN  = 2  # (...)
    -LEVEL_LIST   = 3  # [...]
    -LEVEL_COND   = 4  # ... ? x : y
    -LEVEL_OP     = 5  # !...
    -LEVEL_ACCESS = 6  # ...[0]

    Tabs are two spaces for pretty printing.

    TAB = '  '
    -
    -IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"
    -IDENTIFIER = /// ^ #{IDENTIFIER_STR} $ ///
    -SIMPLENUM  = /^[+-]?\d+$/
    -METHOD_DEF = ///
    -  ^
    -    (?:
    -      (#{IDENTIFIER_STR})
    -      \.prototype
    -      (?:
    -        \.(#{IDENTIFIER_STR})
    -      | \[("(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*')\]
    -      | \[(0x[\da-fA-F]+ | \d*\.?\d+ (?:[eE][+-]?\d+)?)\]
    -      )
    -    )
    -  |
    -    (#{IDENTIFIER_STR})
    -  $
    -///

    Is a literal value a string?

    IS_STRING = /^['"]/

    Utility Functions

    Helper for ensuring that utility functions are assigned at the top level.

    utility = (name) ->
    -  ref = "__#{name}"
    -  Scope.root.assign ref, UTILITIES[name]()
    -  ref
    -
    -multident = (code, tab) ->
    -  code = code.replace /\n/g, '$&' + tab
    -  code.replace /\s+$/, ''
    -
    -
    \ No newline at end of file +then make sure that the closure wrapper preserves the original values. +

    + + + +
      wrap: (expressions, statement, noReturn) ->
    +    return expressions if expressions.jumps()
    +    func = new Code [], Block.wrap [expressions]
    +    args = []
    +    argumentsNode = expressions.contains @isLiteralArguments
    +    if argumentsNode and expressions.classBody
    +      argumentsNode.error "Class bodies shouldn't reference arguments"
    +    if argumentsNode or expressions.contains @isLiteralThis
    +      meth = new Literal if argumentsNode then 'apply' else 'call'
    +      args = [new Literal 'this']
    +      args.push new Literal 'arguments' if argumentsNode
    +      func = new Value func, [new Access meth]
    +    func.noReturn = noReturn
    +    call = new Call func, args
    +    if statement then Block.wrap [call] else call
    +
    +  isLiteralArguments: (node) ->
    +    node instanceof Literal and node.value is 'arguments' and not node.asKey
    +
    +  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)
    + + + + +
  • +
    + +
    + +
    +

    Unfold a node's child if soak, then tuck the node under created If +

    + +
    + +
    unfoldSoak = (o, parent, name) ->
    +  return unless ifn = parent[name].unfoldSoak o
    +  parent[name] = ifn.body
    +  ifn.body = new Value parent
    +  ifn
    + +
  • + + +
  • +
    + +
    + +
    +

    Constants

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
    +UTILITIES =
    + +
  • + + +
  • +
    + +
    + +
    +

    Correctly set up a prototype chain for inheritance, including a reference +to the superclass for super() calls, and copies of any static properties. +

    + +
    + +
      extends: -> """
    +    function(child, parent) { for (var key in parent) { if (#{utility '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; }
    +  """
    + +
  • + + +
  • +
    + +
    + +
    +

    Create a function bound to the current value of "this". +

    + +
    + +
      bind: -> '''
    +    function(fn, me){ return function(){ return fn.apply(me, arguments); }; }
    +  '''
    + +
  • + + +
  • +
    + +
    + +
    +

    Discover if an item is in an array. +

    + +
    + +
      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; }
    +  """
    + +
  • + + +
  • +
    + +
    + +
    +

    Shortcuts to speed up the lookup time for native functions. +

    + +
    + +
      hasProp: -> '{}.hasOwnProperty'
    +  slice  : -> '[].slice'
    + +
  • + + +
  • +
    + +
    + +
    +

    Levels indicate a node's position in the AST. Useful for knowing if +parens are necessary or superfluous. +

    + +
    + +
    LEVEL_TOP    = 1  # ...;
    +LEVEL_PAREN  = 2  # (...)
    +LEVEL_LIST   = 3  # [...]
    +LEVEL_COND   = 4  # ... ? x : y
    +LEVEL_OP     = 5  # !...
    +LEVEL_ACCESS = 6  # ...[0]
    + +
  • + + +
  • +
    + +
    + +
    +

    Tabs are two spaces for pretty printing. +

    + +
    + +
    TAB = '  '
    +
    +IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"
    +IDENTIFIER = /// ^ #{IDENTIFIER_STR} $ ///
    +SIMPLENUM  = /^[+-]?\d+$/
    +METHOD_DEF = ///
    +  ^
    +    (?:
    +      (#{IDENTIFIER_STR})
    +      \.prototype
    +      (?:
    +        \.(#{IDENTIFIER_STR})
    +      | \[("(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*')\]
    +      | \[(0x[\da-fA-F]+ | \d*\.?\d+ (?:[eE][+-]?\d+)?)\]
    +      )
    +    )
    +  |
    +    (#{IDENTIFIER_STR})
    +  $
    +///
    + +
  • + + +
  • +
    + +
    + +
    +

    Is a literal value a string? +

    + +
    + +
    IS_STRING = /^['"]/
    + +
  • + + +
  • +
    + +
    + +
    +

    Utility Functions

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Helper for ensuring that utility functions are assigned at the top level. +

    + +
    + +
    utility = (name) ->
    +  ref = "__#{name}"
    +  Scope.root.assign ref, UTILITIES[name]()
    +  ref
    +
    +multident = (code, tab) ->
    +  code = code.replace /\n/g, '$&' + tab
    +  code.replace /\s+$/, ''
    + +
  • + + + + + diff --git a/documentation/docs/optparse.html b/documentation/docs/optparse.html index d7158f6ad8..e96bb4de59 100644 --- a/documentation/docs/optparse.html +++ b/documentation/docs/optparse.html @@ -1,87 +1,372 @@ - optparse.coffee

    optparse.coffee

    A simple OptionParser class to parse option flags from the command-line. -Use it like so:

    + -
    parser  = new OptionParser switches, helpBanner
    -options = parser.parse process.argv
    -
    + + + optparse.coffee + + + + + +
    +
    + + + +
      + +
    • +
      +

      optparse.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      + +
      + +
      {repeat} = require './helpers'
      + +
    • + + +
    • +
      + +
      + +
      +

      A simple OptionParser class to parse option flags from the command-line. +Use it like so: +

      +
      parser  = new OptionParser switches, helpBanner
      +options = parser.parse process.argv

      The first non-option is considered to be the start of the file (and file -option) list, and all subsequent arguments are left unparsed.

    exports.OptionParser = class OptionParser

    Initialize with a list of valid options, in the form:

    +option) list, and all subsequent arguments are left unparsed. +

    + + + +
    exports.OptionParser = class OptionParser
    + + + + +
  • +
    + +
    + +
    +

    Initialize with a list of valid options, in the form: -

    [short-flag, long-flag, description]
    -
    +

    +
    [short-flag, long-flag, description]
    +

    Along with an an optional banner for the usage help. +

    -

    Along with an an optional banner for the usage help.

  •   constructor: (rules, @banner) ->
    -    @rules = buildRules rules

    Parse the list of arguments, populating an options object with all of the + + +

      constructor: (rules, @banner) ->
    +    @rules = buildRules rules
    + + + + +
  • +
    + +
    + +
    +

    Parse the list of arguments, populating an options object with all of the specified options, and return it. Options after the first non-option argument are treated as arguments. options.arguments will be an array containing the remaining arguments. This is a simpler API than many option parsers that allow you to attach callback actions for every flag. Instead, -you're responsible for interpreting the options object.

  •   parse: (args) ->
    -    options = arguments: []
    -    skippingArgument = no
    -    originalArgs = args
    -    args = normalizeArguments args
    -    for arg, i in args
    -      if skippingArgument
    -        skippingArgument = no
    -        continue
    -      if arg is '--'
    -        pos = originalArgs.indexOf '--'
    -        options.arguments = options.arguments.concat originalArgs[(pos + 1)..]
    -        break
    -      isOption = !!(arg.match(LONG_FLAG) or arg.match(SHORT_FLAG))

    the CS option parser is a little odd; options after the first -non-option argument are treated as non-option arguments themselves

          seenNonOptionArg = options.arguments.length > 0
    -      unless seenNonOptionArg
    -        matchedRule = no
    -        for rule in @rules
    -          if rule.shortFlag is arg or rule.longFlag is arg
    -            value = true
    -            if rule.hasArgument
    -              skippingArgument = yes
    -              value = args[i + 1]
    -            options[rule.name] = if rule.isList then (options[rule.name] or []).concat value else value
    -            matchedRule = yes
    -            break
    -        throw new Error "unrecognized option: #{arg}" if isOption and not matchedRule
    -      if seenNonOptionArg or not isOption
    -        options.arguments.push arg
    -    options

    Return the help text for this OptionParser, listing and describing all -of the valid options, for --help and such.

      help: ->
    -    lines = []
    -    lines.unshift "#{@banner}\n" if @banner
    -    for rule in @rules
    -      spaces  = 15 - rule.longFlag.length
    -      spaces  = if spaces > 0 then Array(spaces + 1).join(' ') else ''
    -      letPart = if rule.shortFlag then rule.shortFlag + ', ' else '    '
    -      lines.push '  ' + letPart + rule.longFlag + spaces + rule.description
    -    "\n#{ lines.join('\n') }\n"

    Helpers

    Regex matchers for option flags.

    LONG_FLAG  = /^(--\w[\w\-]*)/
    -SHORT_FLAG = /^(-\w)$/
    -MULTI_FLAG = /^-(\w{2,})/
    -OPTIONAL   = /\[(\w+(\*?))\]/

    Build and return the list of option rules. If the optional short-flag is -unspecified, leave it out by padding with null.

    buildRules = (rules) ->
    -  for tuple in rules
    -    tuple.unshift null if tuple.length < 3
    -    buildRule tuple...

    Build a rule from a -o short flag, a --output [DIR] long flag, and the -description of what the option does.

    buildRule = (shortFlag, longFlag, description, options = {}) ->
    -  match     = longFlag.match(OPTIONAL)
    -  longFlag  = longFlag.match(LONG_FLAG)[1]
    -  {
    -    name:         longFlag.substr 2
    -    shortFlag:    shortFlag
    -    longFlag:     longFlag
    -    description:  description
    -    hasArgument:  !!(match and match[1])
    -    isList:       !!(match and match[2])
    -  }

    Normalize arguments by expanding merged flags into multiple flags. This allows -you to have -wl be the same as --watch --lint.

    normalizeArguments = (args) ->
    -  args = args[..]
    -  result = []
    -  for arg in args
    -    if match = arg.match MULTI_FLAG
    -      result.push '-' + l for l in match[1].split ''
    -    else
    -      result.push arg
    -  result
    +you're responsible for interpreting the options object.
    +

    + +
    + +
      parse: (args) ->
    +    options = arguments: []
    +    skippingArgument = no
    +    originalArgs = args
    +    args = normalizeArguments args
    +    for arg, i in args
    +      if skippingArgument
    +        skippingArgument = no
    +        continue
    +      if arg is '--'
    +        pos = originalArgs.indexOf '--'
    +        options.arguments = options.arguments.concat originalArgs[(pos + 1)..]
    +        break
    +      isOption = !!(arg.match(LONG_FLAG) or arg.match(SHORT_FLAG))
    + + + + +
  • +
    + +
    + +
    +

    the CS option parser is a little odd; options after the first +non-option argument are treated as non-option arguments themselves +

    + +
    + +
          seenNonOptionArg = options.arguments.length > 0
    +      unless seenNonOptionArg
    +        matchedRule = no
    +        for rule in @rules
    +          if rule.shortFlag is arg or rule.longFlag is arg
    +            value = true
    +            if rule.hasArgument
    +              skippingArgument = yes
    +              value = args[i + 1]
    +            options[rule.name] = if rule.isList then (options[rule.name] or []).concat value else value
    +            matchedRule = yes
    +            break
    +        throw new Error "unrecognized option: #{arg}" if isOption and not matchedRule
    +      if seenNonOptionArg or not isOption
    +        options.arguments.push arg
    +    options
    + +
  • + + +
  • +
    + +
    + +
    +

    Return the help text for this OptionParser, listing and describing all +of the valid options, for --help and such. +

    + +
    + +
      help: ->
    +    lines = []
    +    lines.unshift "#{@banner}\n" if @banner
    +    for rule in @rules
    +      spaces  = 15 - rule.longFlag.length
    +      spaces  = if spaces > 0 then repeat ' ', spaces else ''
    +      letPart = if rule.shortFlag then rule.shortFlag + ', ' else '    '
    +      lines.push '  ' + letPart + rule.longFlag + spaces + rule.description
    +    "\n#{ lines.join('\n') }\n"
    + +
  • + + +
  • +
    + +
    + +
    +

    Helpers

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Regex matchers for option flags. +

    + +
    + +
    LONG_FLAG  = /^(--\w[\w\-]*)/
    +SHORT_FLAG = /^(-\w)$/
    +MULTI_FLAG = /^-(\w{2,})/
    +OPTIONAL   = /\[(\w+(\*?))\]/
    + +
  • + + +
  • +
    + +
    + +
    +

    Build and return the list of option rules. If the optional short-flag is +unspecified, leave it out by padding with null. +

    + +
    + +
    buildRules = (rules) ->
    +  for tuple in rules
    +    tuple.unshift null if tuple.length < 3
    +    buildRule tuple...
    + +
  • + + +
  • +
    + +
    + +
    +

    Build a rule from a -o short flag, a --output [DIR] long flag, and the +description of what the option does. +

    + +
    + +
    buildRule = (shortFlag, longFlag, description, options = {}) ->
    +  match     = longFlag.match(OPTIONAL)
    +  longFlag  = longFlag.match(LONG_FLAG)[1]
    +  {
    +    name:         longFlag.substr 2
    +    shortFlag:    shortFlag
    +    longFlag:     longFlag
    +    description:  description
    +    hasArgument:  !!(match and match[1])
    +    isList:       !!(match and match[2])
    +  }
    + +
  • + + +
  • +
    + +
    + +
    +

    Normalize arguments by expanding merged flags into multiple flags. This allows +you to have -wl be the same as --watch --lint. +

    -
  • \ No newline at end of file + + +
    normalizeArguments = (args) ->
    +  args = args[..]
    +  result = []
    +  for arg in args
    +    if match = arg.match MULTI_FLAG
    +      result.push '-' + l for l in match[1].split ''
    +    else
    +      result.push arg
    +  result
    + + + + + + + diff --git a/documentation/docs/public/fonts/aller-bold.eot b/documentation/docs/public/fonts/aller-bold.eot new file mode 100755 index 0000000000..1b32532a8e Binary files /dev/null and b/documentation/docs/public/fonts/aller-bold.eot differ diff --git a/documentation/docs/public/fonts/aller-bold.ttf b/documentation/docs/public/fonts/aller-bold.ttf new file mode 100755 index 0000000000..dc4cc9c27a Binary files /dev/null and b/documentation/docs/public/fonts/aller-bold.ttf differ diff --git a/documentation/docs/public/fonts/aller-bold.woff b/documentation/docs/public/fonts/aller-bold.woff new file mode 100755 index 0000000000..fa16fd0aba Binary files /dev/null and b/documentation/docs/public/fonts/aller-bold.woff differ diff --git a/documentation/docs/public/fonts/aller-light.eot b/documentation/docs/public/fonts/aller-light.eot new file mode 100755 index 0000000000..40bd654b5f Binary files /dev/null and b/documentation/docs/public/fonts/aller-light.eot differ diff --git a/documentation/docs/public/fonts/aller-light.ttf b/documentation/docs/public/fonts/aller-light.ttf new file mode 100755 index 0000000000..c2c72902a1 Binary files /dev/null and b/documentation/docs/public/fonts/aller-light.ttf differ diff --git a/documentation/docs/public/fonts/aller-light.woff b/documentation/docs/public/fonts/aller-light.woff new file mode 100755 index 0000000000..81a09d18ec Binary files /dev/null and b/documentation/docs/public/fonts/aller-light.woff differ diff --git a/documentation/docs/public/fonts/novecento-bold.eot b/documentation/docs/public/fonts/novecento-bold.eot new file mode 100755 index 0000000000..98a9a7fbab Binary files /dev/null and b/documentation/docs/public/fonts/novecento-bold.eot differ diff --git a/documentation/docs/public/fonts/novecento-bold.ttf b/documentation/docs/public/fonts/novecento-bold.ttf new file mode 100755 index 0000000000..2af39b08b0 Binary files /dev/null and b/documentation/docs/public/fonts/novecento-bold.ttf differ diff --git a/documentation/docs/public/fonts/novecento-bold.woff b/documentation/docs/public/fonts/novecento-bold.woff new file mode 100755 index 0000000000..de558b5a29 Binary files /dev/null and b/documentation/docs/public/fonts/novecento-bold.woff differ diff --git a/documentation/docs/public/stylesheets/normalize.css b/documentation/docs/public/stylesheets/normalize.css new file mode 100644 index 0000000000..73abb76fa4 --- /dev/null +++ b/documentation/docs/public/stylesheets/normalize.css @@ -0,0 +1,375 @@ +/*! normalize.css v2.0.1 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE 8/9. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Sets default font family to sans-serif. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Removes default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses `h1` font sizes within `section` and `article` in Firefox 4+, + * Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; +} + +/* + * Addresses styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/* + * Addresses styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + + +/* + * Corrects font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Sets consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/* + * Addresses inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * Removes border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/* + * Corrects overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/* + * 1. Corrects font family not being inherited in all browsers. + * 2. Corrects font size not being inherited in all browsers. + * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/* + * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to `content-box` in IE 8/9. + * 2. Removes excess padding in IE 8/9. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE 8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/documentation/docs/repl.html b/documentation/docs/repl.html index ddc70716ce..b3f227b17d 100644 --- a/documentation/docs/repl.html +++ b/documentation/docs/repl.html @@ -1,57 +1,514 @@ - repl.coffee

    repl.coffee

    vm = require 'vm'
    -nodeREPL = require 'repl'
    -CoffeeScript = require './coffee-script'
    -{merge} = require './helpers'
    -
    -replDefaults =
    -  prompt: 'coffee> ',
    -  eval: (input, context, filename, cb) ->

    XXX: multiline hack

        input = input.replace /\uFF00/g, '\n'

    strip single-line comments

        input = input.replace /(^|[\r\n]+)(\s*)##?(?:[^#\r\n][^\r\n]*|)($|[\r\n])/, '$1$2$3'

    empty command

        return cb null if /^(\s*|\(\s*\))$/.test input

    TODO: fix #1829: pass in-scope vars and avoid accidentally shadowing them by omitting those declarations

        try
    -      js = CoffeeScript.compile "_=(#{input}\n)", {filename, bare: yes}
    -      cb null, vm.runInContext(js, context, filename)
    -    catch err
    -      cb err
    -
    -addMultilineHandler = (repl) ->
    -  {rli, inputStream, outputStream} = repl
    -
    -  multiline =
    -    enabled: off
    -    initialPrompt: repl.prompt.replace(/^[^> ]*/, (x) -> x.replace /./g, '-')
    -    prompt: repl.prompt.replace(/^[^> ]*>?/, (x) -> x.replace /./g, '.')
    -    buffer: ''

    Proxy node's line listener

      nodeLineListener = rli.listeners('line')[0]
    -  rli.removeListener 'line', nodeLineListener
    -  rli.on 'line', (cmd) ->
    -    if multiline.enabled
    -      multiline.buffer += "#{cmd}\n"
    -      rli.setPrompt multiline.prompt
    -      rli.prompt true
    -    else
    -      nodeLineListener cmd
    -    return

    Handle Ctrl-v

      inputStream.on 'keypress', (char, key) ->
    -    return unless key and key.ctrl and not key.meta and not key.shift and key.name is 'v'
    -    if multiline.enabled

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

          unless multiline.buffer.match /\n/
    -        multiline.enabled = not multiline.enabled
    -        rli.setPrompt repl.prompt
    -        rli.prompt true
    -        return

    no-op unless the current line is empty

          return if rli.line? and not rli.line.match /^\s*$/

    eval, print, loop

          multiline.enabled = not multiline.enabled
    -      rli.line = ''
    -      rli.cursor = 0
    -      rli.output.cursorTo 0
    -      rli.output.clearLine 1

    XXX: multiline hack

          multiline.buffer = multiline.buffer.replace /\n/g, '\uFF00'
    -      rli.emit 'line', multiline.buffer
    -      multiline.buffer = ''
    -    else
    -      multiline.enabled = not multiline.enabled
    -      rli.setPrompt multiline.initialPrompt
    -      rli.prompt true
    -    return
    -
    -module.exports =
    -  start: (opts = {}) ->
    -    opts = merge replDefaults, opts
    -    repl = nodeREPL.start opts
    -    repl.on 'exit', -> repl.outputStream.write '\n'
    -    addMultilineHandler repl
    -    repl
    -
    -
    \ No newline at end of file + + + + + repl.coffee + + + + + +
    +
    + + + + +
    + + diff --git a/documentation/docs/rewriter.html b/documentation/docs/rewriter.html index e35e63e968..79ad3e214c 100644 --- a/documentation/docs/rewriter.html +++ b/documentation/docs/rewriter.html @@ -1,325 +1,1227 @@ - rewriter.coffee

    rewriter.coffee

    The CoffeeScript language has a good deal of optional syntax, implicit syntax, + + + + + rewriter.coffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      rewriter.coffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      The CoffeeScript language has a good deal of optional syntax, implicit syntax, and shorthand syntax. This can greatly complicate a grammar and bloat the resulting parse table. Instead of making the parser handle it all, we take a series of passes over the token stream, using this Rewriter to convert shorthand into the unambiguous long form, add implicit indentation and -parentheses, and generally clean things up.

    Create a generated token: one that exists due to a use of implicit syntax.

    generate = (tag, value) ->
    -    tok = [tag, value]
    -    tok.generated = yes
    -    tok

    The Rewriter class is used by the Lexer, directly against -its internal array of tokens.

    class exports.Rewriter

    Helpful snippet for debugging: - console.log (t[0] + '/' + t[1] for t in @tokens).join ' '

    Rewrite the token stream in multiple passes, one logical filter at +parentheses, and generally clean things up. +

    + + + + + + +
  • +
    + +
    + +
    +

    Create a generated token: one that exists due to a use of implicit syntax. +

    + +
    + +
    generate = (tag, value) ->
    +    tok = [tag, value]
    +    tok.generated = yes
    +    tok
    + +
  • + + +
  • +
    + +
    + +
    +

    The Rewriter class is used by the Lexer, directly against +its internal array of tokens. +

    + +
    + +
    class exports.Rewriter
    + +
  • + + +
  • +
    + +
    + +
    +

    Helpful snippet for debugging: + +

    +
    console.log (t[0] + '/' + t[1] for t in @tokens).join ' '
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    Rewrite the token stream in multiple passes, one logical filter at a time. This could certainly be changed into a single pass through the -stream, with a big ol' efficient switch, but it's much nicer to work with +stream, with a big ol' efficient switch, but it's much nicer to work with like this. The order of these passes matters -- indentation must be -corrected before implicit parentheses can be wrapped around blocks of code.

  •   rewrite: (@tokens) ->
    -    @removeLeadingNewlines()
    -    @removeMidExpressionNewlines()
    -    @closeOpenCalls()
    -    @closeOpenIndexes()
    -    @addImplicitIndentation()
    -    @tagPostfixConditionals()
    -    @addImplicitBracesAndParens()
    -    @addLocationDataToGeneratedTokens()
    -    @tokens

    Rewrite the token stream, looking one token ahead and behind. +corrected before implicit parentheses can be wrapped around blocks of code. +

    + + + +
      rewrite: (@tokens) ->
    +    @removeLeadingNewlines()
    +    @removeMidExpressionNewlines()
    +    @closeOpenCalls()
    +    @closeOpenIndexes()
    +    @addImplicitIndentation()
    +    @tagPostfixConditionals()
    +    @addImplicitBracesAndParens()
    +    @addLocationDataToGeneratedTokens()
    +    @tokens
    + + + + +
  • +
    + +
    + +
    +

    Rewrite the token stream, looking one token ahead and behind. Allow the return value of the block to tell us how many tokens to move -forwards (or backwards) in the stream, to make sure we don't miss anything +forwards (or backwards) in the stream, to make sure we don't miss anything as tokens are inserted and removed, and the stream changes length under -our feet.

  •   scanTokens: (block) ->
    -    {tokens} = this
    -    i = 0
    -    i += block.call this, token, i, tokens while token = tokens[i]
    -    true
    -
    -  detectEnd: (i, condition, action) ->
    -    {tokens} = this
    -    levels = 0
    -    while token = tokens[i]
    -      return action.call this, token, i     if levels is 0 and condition.call this, token, i
    -      return action.call this, token, i - 1 if not token or levels < 0
    -      if token[0] in EXPRESSION_START
    -        levels += 1
    -      else if token[0] in EXPRESSION_END
    -        levels -= 1
    -      i += 1
    -    i - 1

    Leading newlines would introduce an ambiguity in the grammar, so we -dispatch them here.

      removeLeadingNewlines: ->
    -    break for [tag], i in @tokens when tag isnt 'TERMINATOR'
    -    @tokens.splice 0, i if i

    Some blocks occur in the middle of expressions -- when we're expecting -this, remove their trailing newlines.

      removeMidExpressionNewlines: ->
    -    @scanTokens (token, i, tokens) ->
    -      return 1 unless token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE
    -      tokens.splice i, 1
    -      0

    The lexer has tagged the opening parenthesis of a method call. Match it with +our feet. +

    + + + +
      scanTokens: (block) ->
    +    {tokens} = this
    +    i = 0
    +    i += block.call this, token, i, tokens while token = tokens[i]
    +    true
    +
    +  detectEnd: (i, condition, action) ->
    +    {tokens} = this
    +    levels = 0
    +    while token = tokens[i]
    +      return action.call this, token, i     if levels is 0 and condition.call this, token, i
    +      return action.call this, token, i - 1 if not token or levels < 0
    +      if token[0] in EXPRESSION_START
    +        levels += 1
    +      else if token[0] in EXPRESSION_END
    +        levels -= 1
    +      i += 1
    +    i - 1
    + + + + +
  • +
    + +
    + +
    +

    Leading newlines would introduce an ambiguity in the grammar, so we +dispatch them here. +

    + +
    + +
      removeLeadingNewlines: ->
    +    break for [tag], i in @tokens when tag isnt 'TERMINATOR'
    +    @tokens.splice 0, i if i
    + +
  • + + +
  • +
    + +
    + +
    +

    Some blocks occur in the middle of expressions -- when we're expecting +this, remove their trailing newlines. +

    + +
    + +
      removeMidExpressionNewlines: ->
    +    @scanTokens (token, i, tokens) ->
    +      return 1 unless token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE
    +      tokens.splice i, 1
    +      0
    + +
  • + + +
  • +
    + +
    + +
    +

    The lexer has tagged the opening parenthesis of a method call. Match it with its paired close. We have the mis-nested outdent case included here for -calls that close on the same line, just before their outdent.

  •   closeOpenCalls: ->
    -    condition = (token, i) ->
    -      token[0] in [')', 'CALL_END'] or
    -      token[0] is 'OUTDENT' and @tag(i - 1) is ')'
    -
    -    action = (token, i) ->
    -      @tokens[if token[0] is 'OUTDENT' then i - 1 else i][0] = 'CALL_END'
    -
    -    @scanTokens (token, i) ->
    -      @detectEnd i + 1, condition, action if token[0] is 'CALL_START'
    -      1

    The lexer has tagged the opening parenthesis of an indexing operation call. -Match it with its paired close.

      closeOpenIndexes: ->
    -    condition = (token, i) ->
    -      token[0] in [']', 'INDEX_END']
    -
    -    action = (token, i) ->
    -      token[0] = 'INDEX_END'
    -
    -    @scanTokens (token, i) ->
    -      @detectEnd i + 1, condition, action if token[0] is 'INDEX_START'
    -      1

    Match tags in token stream starting at i with pattern, skipping HERECOMMENTs +calls that close on the same line, just before their outdent. +

    + + + +
      closeOpenCalls: ->
    +    condition = (token, i) ->
    +      token[0] in [')', 'CALL_END'] or
    +      token[0] is 'OUTDENT' and @tag(i - 1) is ')'
    +
    +    action = (token, i) ->
    +      @tokens[if token[0] is 'OUTDENT' then i - 1 else i][0] = 'CALL_END'
    +
    +    @scanTokens (token, i) ->
    +      @detectEnd i + 1, condition, action if token[0] is 'CALL_START'
    +      1
    + + + + +
  • +
    + +
    + +
    +

    The lexer has tagged the opening parenthesis of an indexing operation call. +Match it with its paired close. +

    + +
    + +
      closeOpenIndexes: ->
    +    condition = (token, i) ->
    +      token[0] in [']', 'INDEX_END']
    +
    +    action = (token, i) ->
    +      token[0] = 'INDEX_END'
    +
    +    @scanTokens (token, i) ->
    +      @detectEnd i + 1, condition, action if token[0] is 'INDEX_START'
    +      1
    + +
  • + + +
  • +
    + +
    + +
    +

    Match tags in token stream starting at i with pattern, skipping HERECOMMENTs Pattern may consist of strings (equality), an array of strings (one of) -or null (wildcard)

  •   matchTags: (i, pattern...) ->
    -    fuzz = 0
    -    for j in [0 ... pattern.length]
    -      fuzz += 2 while @tag(i + j + fuzz) is 'HERECOMMENT'
    -      continue if not pattern[j]?
    -      pattern[j] = [pattern[j]] if typeof pattern[j] is 'string'
    -      return no if @tag(i + j + fuzz) not in pattern[j]
    -    yes

    yes iff standing in front of something looking like -@: or :, skipping over 'HERECOMMENT's

      looksObjectish: (j) ->
    -    @matchTags(j, '@', null, ':') or @matchTags(j, null, ':')

    yes iff current line of tokens contain an element of tags on same +or null (wildcard) +

    + + + +
      matchTags: (i, pattern...) ->
    +    fuzz = 0
    +    for j in [0 ... pattern.length]
    +      fuzz += 2 while @tag(i + j + fuzz) is 'HERECOMMENT'
    +      continue if not pattern[j]?
    +      pattern[j] = [pattern[j]] if typeof pattern[j] is 'string'
    +      return no if @tag(i + j + fuzz) not in pattern[j]
    +    yes
    + + + + +
  • +
    + +
    + +
    +

    yes iff standing in front of something looking like +@: or :, skipping over 'HERECOMMENT's +

    + +
    + +
      looksObjectish: (j) ->
    +    @matchTags(j, '@', null, ':') or @matchTags(j, null, ':')
    + +
  • + + +
  • +
    + +
    + +
    +

    yes iff current line of tokens contain an element of tags on same expression level. Stop searching at LINEBREAKS or explicit start of -containing balanced expression.

  •   findTagsBackwards: (i, tags) ->
    -    backStack = []
    -    while i >= 0 and (backStack.length or
    -          @tag(i) not in tags and
    -          (@tag(i) not in EXPRESSION_START or @tokens[i].generated) and
    -          @tag(i) not in LINEBREAKS)
    -      backStack.push @tag(i) if @tag(i) in EXPRESSION_END
    -      backStack.pop() if @tag(i) in EXPRESSION_START and backStack.length
    -      i -= 1
    -    @tag(i) in tags

    Look for signs of implicit calls and objects in the token stream and -add them.

      addImplicitBracesAndParens: ->

    Track current balancing depth (both implicit and explicit) on stack.

        stack = []
    -
    -    @scanTokens (token, i, tokens) ->
    -      [tag]     = token
    -      [prevTag] = if i > 0 then tokens[i - 1] else []
    -      [nextTag] = if i < tokens.length - 1 then tokens[i + 1] else []
    -      stackTop  = -> stack[stack.length - 1]
    -      startIdx  = i

    Helper function, used for keeping track of the number of tokens consumed -and spliced, when returning for getting a new token.

          forward   = (n) -> i - startIdx + n

    Helper functions

          inImplicit        = -> stackTop()?[2]?.ours
    -      inImplicitCall    = -> inImplicit() and stackTop()?[0] is '('
    -      inImplicitObject  = -> inImplicit() and stackTop()?[0] is '{'

    Unclosed control statement inside implicit parens (like -class declaration or if-conditionals)

          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 = ->
    -        stack.pop()
    -        tokens.splice i, 0, generate 'CALL_END', ')'
    -        i += 1
    -
    -      startImplicitObject = (j, startsLine = yes) ->
    -        idx = j ? i
    -        stack.push ['{', idx, sameLine: yes, startsLine: startsLine, ours: yes]
    -        tokens.splice idx, 0, generate '{', generate(new String('{'))
    -        i += 1 if not j?
    -
    -      endImplicitObject = (j) ->
    -        j = j ? i
    -        stack.pop()
    -        tokens.splice j, 0, generate '}', '}'
    -        i += 1

    Don't end an implicit call on next indent if any of these are in an argument

          if inImplicitCall() and tag in ['IF', 'TRY', 'FINALLY', 'CATCH',
    -        'CLASS', 'SWITCH']
    -        stack.push ['CONTROL', i, ours: true]
    -        return forward(1)
    -
    -      if tag is 'INDENT' and inImplicit()

    An INDENT closes an implicit call unless -1. We have seen a CONTROL argument on the line. -2. The last token before the indent is part of the list below

            if prevTag not in ['=>', '->', '[', '(', ',', '{', 'TRY', 'ELSE', '=']
    -          endImplicitCall() while inImplicitCall()
    -        stack.pop() if inImplicitControl()
    -        stack.push [tag, i]
    -        return forward(1)

    Straightforward start of explicit expression

          if tag in EXPRESSION_START
    -        stack.push [tag, i]
    -        return forward(1)

    Close all implicit expressions inside of explicitly closed expressions.

          if tag in EXPRESSION_END
    -        while inImplicit()
    -          if inImplicitCall()
    -            endImplicitCall()
    -          else if inImplicitObject()
    -            endImplicitObject()
    -          else
    -            stack.pop()
    -        stack.pop()

    Recognize standard implicit calls like -f a, f() b, f? c, h[0] d etc.

          if (tag in IMPLICIT_FUNC and token.spaced or
    -          tag is '?' and i > 0 and not tokens[i - 1].spaced) and
    -         (nextTag in IMPLICIT_CALL or
    -          nextTag in IMPLICIT_UNSPACED_CALL and
    -          not tokens[i + 1]?.spaced and not tokens[i + 1]?.newLine)
    -        tag = token[0] = 'FUNC_EXIST' if tag is '?'
    -        startImplicitCall i + 1
    -        return forward(2)

    Implicit call taking an implicit indented object as first argument. -f +containing balanced expression. +

    + + + +
      findTagsBackwards: (i, tags) ->
    +    backStack = []
    +    while i >= 0 and (backStack.length or
    +          @tag(i) not in tags and
    +          (@tag(i) not in EXPRESSION_START or @tokens[i].generated) and
    +          @tag(i) not in LINEBREAKS)
    +      backStack.push @tag(i) if @tag(i) in EXPRESSION_END
    +      backStack.pop() if @tag(i) in EXPRESSION_START and backStack.length
    +      i -= 1
    +    @tag(i) in tags
    + + + + +
  • +
    + +
    + +
    +

    Look for signs of implicit calls and objects in the token stream and +add them. +

    + +
    + +
      addImplicitBracesAndParens: ->
    + +
  • + + +
  • +
    + +
    + +
    +

    Track current balancing depth (both implicit and explicit) on stack. +

    + +
    + +
        stack = []
    +
    +    @scanTokens (token, i, tokens) ->
    +      [tag]     = token
    +      [prevTag] = if i > 0 then tokens[i - 1] else []
    +      [nextTag] = if i < tokens.length - 1 then tokens[i + 1] else []
    +      stackTop  = -> stack[stack.length - 1]
    +      startIdx  = i
    + +
  • + + +
  • +
    + +
    + +
    +

    Helper function, used for keeping track of the number of tokens consumed +and spliced, when returning for getting a new token. +

    + +
    + +
          forward   = (n) -> i - startIdx + n
    + +
  • + + +
  • +
    + +
    + +
    +

    Helper functions +

    + +
    + +
          inImplicit        = -> stackTop()?[2]?.ours
    +      inImplicitCall    = -> inImplicit() and stackTop()?[0] is '('
    +      inImplicitObject  = -> inImplicit() and stackTop()?[0] is '{'
    + +
  • + + +
  • +
    + +
    + +
    +

    Unclosed control statement inside implicit parens (like +class declaration or if-conditionals) +

    + +
    + +
          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 = ->
    +        stack.pop()
    +        tokens.splice i, 0, generate 'CALL_END', ')'
    +        i += 1
    +
    +      startImplicitObject = (j, startsLine = yes) ->
    +        idx = j ? i
    +        stack.push ['{', idx, sameLine: yes, startsLine: startsLine, ours: yes]
    +        tokens.splice idx, 0, generate '{', generate(new String('{'))
    +        i += 1 if not j?
    +
    +      endImplicitObject = (j) ->
    +        j = j ? i
    +        stack.pop()
    +        tokens.splice j, 0, generate '}', '}'
    +        i += 1
    + +
  • + + +
  • +
    + +
    + +
    +

    Don't end an implicit call on next indent if any of these are in an argument +

    + +
    + +
          if inImplicitCall() and tag in ['IF', 'TRY', 'FINALLY', 'CATCH',
    +        'CLASS', 'SWITCH']
    +        stack.push ['CONTROL', i, ours: true]
    +        return forward(1)
    +
    +      if tag is 'INDENT' and inImplicit()
    + +
  • + + +
  • +
    + +
    + +
    +

    An INDENT closes an implicit call unless + +

    +
      +
    1. We have seen a CONTROL argument on the line.
    2. +
    3. The last token before the indent is part of the list below
    4. +
    + +
    + +
            if prevTag not in ['=>', '->', '[', '(', ',', '{', 'TRY', 'ELSE', '=']
    +          endImplicitCall() while inImplicitCall()
    +        stack.pop() if inImplicitControl()
    +        stack.push [tag, i]
    +        return forward(1)
    + +
  • + + +
  • +
    + +
    + +
    +

    Straightforward start of explicit expression +

    + +
    + +
          if tag in EXPRESSION_START
    +        stack.push [tag, i]
    +        return forward(1)
    + +
  • + + +
  • +
    + +
    + +
    +

    Close all implicit expressions inside of explicitly closed expressions. +

    + +
    + +
          if tag in EXPRESSION_END
    +        while inImplicit()
    +          if inImplicitCall()
    +            endImplicitCall()
    +          else if inImplicitObject()
    +            endImplicitObject()
    +          else
    +            stack.pop()
    +        stack.pop()
    + +
  • + + +
  • +
    + +
    + +
    +

    Recognize standard implicit calls like +f a, f() b, f? c, h[0] d etc. +

    + +
    + +
          if (tag in IMPLICIT_FUNC and token.spaced and not token.stringEnd or
    +          tag is '?' and i > 0 and not tokens[i - 1].spaced) and
    +         (nextTag in IMPLICIT_CALL or
    +          nextTag in IMPLICIT_UNSPACED_CALL and
    +          not tokens[i + 1]?.spaced and not tokens[i + 1]?.newLine)
    +        tag = token[0] = 'FUNC_EXIST' if tag is '?'
    +        startImplicitCall i + 1
    +        return forward(2)
    + +
  • + + +
  • +
    + +
    + +
    +

    Implicit call taking an implicit indented object as first argument. + +

    +
    f
       a: b
    -  c: d
    -and
    -f
    +  c: d
    +

    and + +

    +
    f
       1
       a: b
    -  b: c
    -Don't accept implicit calls of this type, when on the same line
    +  b: c
    +

    Don't accept implicit calls of this type, when on the same line as the control strucutures below as that may misinterpret constructs like: -if f - a: 1 -as -if f(a: 1) -which is probably always unintended. -Furthermore don't allow this in literal arrays, as -that creates grammatical ambiguities.

  •       if @matchTags(i, IMPLICIT_FUNC, 'INDENT', null, ':') and
    -         not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH',
    -          'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])
    -        startImplicitCall i + 1
    -        stack.push ['INDENT', i + 2]
    -        return forward(3)

    Implicit objects start here

          if tag is ':'

    Go back to the (implicit) start of the object

            if @tag(i - 2) is '@' then s = i - 2 else s = i - 1
    -        s -= 2 while @tag(s - 2) is 'HERECOMMENT'
    -
    -        startsLine = s is 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine

    Are we just continuing an already declared object?

            if stackTop()
    -          [stackTag, stackIdx] = stackTop()
    -          if (stackTag is '{' or stackTag is 'INDENT' and @tag(stackIdx - 1) is '{') and
    -             (startsLine or @tag(s - 1) is ',' or @tag(s - 1) is '{')
    -            return forward(1)
    -
    -        startImplicitObject(s, !!startsLine)
    -        return forward(2)

    End implicit calls when chaining method calls + +

    +
    if f
    +   a: 1
    +

    as + +

    +
    if f(a: 1)
    +

    which is probably always unintended. +Furthermore don't allow this in literal arrays, as +that creates grammatical ambiguities. +

    + + + +
          if tag in IMPLICIT_FUNC and @matchTags(i + 1, 'INDENT', null, ':') and
    +         not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH',
    +          'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])
    +        startImplicitCall i + 1
    +        stack.push ['INDENT', i + 2]
    +        return forward(3)
    + + + + +
  • +
    + +
    + +
    +

    Implicit objects start here +

    + +
    + +
          if tag is ':'
    + +
  • + + +
  • +
    + +
    + +
    +

    Go back to the (implicit) start of the object +

    + +
    + +
            if @tag(i - 2) is '@' then s = i - 2 else s = i - 1
    +        s -= 2 while @tag(s - 2) is 'HERECOMMENT'
    +
    +        startsLine = s is 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine
    + +
  • + + +
  • +
    + +
    + +
    +

    Are we just continuing an already declared object? +

    + +
    + +
            if stackTop()
    +          [stackTag, stackIdx] = stackTop()
    +          if (stackTag is '{' or stackTag is 'INDENT' and @tag(stackIdx - 1) is '{') and
    +             (startsLine or @tag(s - 1) is ',' or @tag(s - 1) is '{')
    +            return forward(1)
    +
    +        startImplicitObject(s, !!startsLine)
    +        return forward(2)
    + +
  • + + +
  • +
    + +
    + +
    +

    End implicit calls when chaining method calls like e.g.: -f -> + +

    +
    f ->
       a
    -.g b, ->
    +.g b, ->
       c
    -.h a

  •       if prevTag is 'OUTDENT' and inImplicitCall() and tag in ['.', '?.', '::', '?::']
    -        endImplicitCall()
    -        return forward(1)
    -
    -      stackTop()[2].sameLine = no if inImplicitObject() and tag in LINEBREAKS
    -
    -      if tag in IMPLICIT_END
    -        while inImplicit()
    -          [stackTag, stackIdx, {sameLine, startsLine}] = stackTop()

    Close implicit calls when reached end of argument list

              if inImplicitCall() and prevTag isnt ','
    -            endImplicitCall()

    Close implicit objects such as: -return a: 1, b: 2 unless true

              else if inImplicitObject() and sameLine and not startsLine
    -            endImplicitObject()

    Close implicit objects when at end of line, line didn't end with a comma -and the implicit object didn't start the line or the next line doesn't look like -the continuation of an object.

              else if inImplicitObject() and tag is 'TERMINATOR' and prevTag isnt ',' and
    -                  not (startsLine and @looksObjectish(i + 1))
    -            endImplicitObject()
    -          else
    -            break

    Close implicit object if comma is the last character -and what comes after doesn't look like it belongs. +.h a + + + +

          if prevTag is 'OUTDENT' and inImplicitCall() and tag in ['.', '?.', '::', '?::']
    +        endImplicitCall()
    +        return forward(1)
    +
    +      stackTop()[2].sameLine = no if inImplicitObject() and tag in LINEBREAKS
    +
    +      if tag in IMPLICIT_END
    +        while inImplicit()
    +          [stackTag, stackIdx, {sameLine, startsLine}] = stackTop()
    + + + + +
  • +
    + +
    + +
    +

    Close implicit calls when reached end of argument list +

    + +
    + +
              if inImplicitCall() and prevTag isnt ','
    +            endImplicitCall()
    + +
  • + + +
  • +
    + +
    + +
    +

    Close implicit objects such as: +return a: 1, b: 2 unless true +

    + +
    + +
              else if inImplicitObject() and sameLine and not startsLine
    +            endImplicitObject()
    + +
  • + + +
  • +
    + +
    + +
    +

    Close implicit objects when at end of line, line didn't end with a comma +and the implicit object didn't start the line or the next line doesn't look like +the continuation of an object. +

    + +
    + +
              else if inImplicitObject() and tag is 'TERMINATOR' and prevTag isnt ',' and
    +                  not (startsLine and @looksObjectish(i + 1))
    +            endImplicitObject()
    +          else
    +            break
    + +
  • + + +
  • +
    + +
    + +
    +

    Close implicit object if comma is the last character +and what comes after doesn't look like it belongs. This is used for trailing commas and calls, like: -x = + +

    +
    x =
         a: b,
         c: d,
    -e = 2

    - -

    and

    - -

    f a, b: c, d: e, f, g: h: i, j

  •       if tag is ',' and not @looksObjectish(i + 1) and inImplicitObject() and
    -         (nextTag isnt 'TERMINATOR' or not @looksObjectish(i + 2))

    When nextTag is OUTDENT the comma is insignificant and -should just be ignored so embed it in the implicit object.

    - -

    When it isn't the comma go on to play a role in a call or -array further up the stack, so give it a chance.

            offset = if nextTag is 'OUTDENT' then 1 else 0
    -        while inImplicitObject()
    -          endImplicitObject i + offset
    -      return forward(1)

    Add location data to all tokens generated by the rewriter.

      addLocationDataToGeneratedTokens: ->
    -    @scanTokens (token, i, tokens) ->
    -      return 1 if     token[2]
    -      return 1 unless token.generated or token.explicit
    -      {last_line, last_column} = tokens[i - 1]?[2] ? last_line: 0, last_column: 0
    -      token[2] =
    -        first_line:   last_line
    -        first_column: last_column
    -        last_line:    last_line
    -        last_column:  last_column
    -      1

    Because our grammar is LALR(1), it can't handle some single-line +e = 2 +

    and + +

    +
    f a, b: c, d: e, f, g: h: i, j
    + + + +
          if tag is ',' and not @looksObjectish(i + 1) and inImplicitObject() and
    +         (nextTag isnt 'TERMINATOR' or not @looksObjectish(i + 2))
    + + + + +
  • +
    + +
    + +
    +

    When nextTag is OUTDENT the comma is insignificant and +should just be ignored so embed it in the implicit object. + +

    +

    When it isn't the comma go on to play a role in a call or +array further up the stack, so give it a chance. +

    + +
    + +
    +        offset = if nextTag is 'OUTDENT' then 1 else 0
    +        while inImplicitObject()
    +          endImplicitObject i + offset
    +      return forward(1)
    + +
  • + + +
  • +
    + +
    + +
    +

    Add location data to all tokens generated by the rewriter. +

    + +
    + +
      addLocationDataToGeneratedTokens: ->
    +    @scanTokens (token, i, tokens) ->
    +      return 1 if     token[2]
    +      return 1 unless token.generated or token.explicit
    +      if token[0] is '{' and nextLocation=tokens[i + 1]?[2]
    +          {first_line: line, first_column: column} = nextLocation
    +      else if prevLocation = tokens[i - 1]?[2]
    +          {last_line: line, last_column: column} = prevLocation
    +      else
    +          line = column = 0
    +      token[2] =
    +        first_line:   line
    +        first_column: column
    +        last_line:    line
    +        last_column:  column
    +      return 1
    + +
  • + + +
  • +
    + +
    + +
    +

    Because our grammar is LALR(1), it can't handle some single-line expressions that lack ending delimiters. The Rewriter adds the implicit -blocks, so it doesn't need to. ')' can close a single-line block, -but we need to make sure it's balanced.

  •   addImplicitIndentation: ->
    -    starter = indent = outdent = null
    -
    -    condition = (token, i) ->
    -      token[1] isnt ';' and token[0] in SINGLE_CLOSERS and
    -      not (token[0] is 'ELSE' and starter not in ['IF', 'THEN'])
    -
    -    action = (token, i) ->
    -      @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
    -
    -    @scanTokens (token, i, tokens) ->
    -      [tag] = token
    -      if tag is 'TERMINATOR' and @tag(i + 1) is 'THEN'
    -        tokens.splice i, 1
    -        return 0
    -      if tag is 'ELSE' and @tag(i - 1) isnt 'OUTDENT'
    -        tokens.splice i, 0, @indentation(token)...
    -        return 2
    -      if tag is 'CATCH' and @tag(i + 2) in ['OUTDENT', 'TERMINATOR', 'FINALLY']
    -        tokens.splice i + 2, 0, @indentation(token)...
    -        return 4
    -      if tag in SINGLE_LINERS and @tag(i + 1) isnt 'INDENT' and
    -         not (tag is 'ELSE' and @tag(i + 1) is 'IF')
    -        starter = tag
    -        [indent, outdent] = @indentation token, yes
    -        indent.fromThen   = true if starter is 'THEN'
    -        tokens.splice i + 1, 0, indent
    -        @detectEnd i + 2, condition, action
    -        tokens.splice i, 1 if tag is 'THEN'
    -        return 1
    -      return 1

    Tag postfix conditionals as such, so that we can parse them with a -different precedence.

      tagPostfixConditionals: ->
    -
    -    original = null
    -
    -    condition = (token, i) ->
    -      token[0] in ['TERMINATOR', 'INDENT']
    -
    -    action = (token, i) ->
    -      if token[0] isnt 'INDENT' or (token.generated and not token.fromThen)
    -        original[0] = 'POST_' + original[0]
    -
    -    @scanTokens (token, i) ->
    -      return 1 unless token[0] is 'IF'
    -      original = token
    -      @detectEnd i + 1, condition, action
    -      1

    Generate the indentation tokens, based on another token on the same line.

      indentation: (token, implicit = no) ->
    -    indent  = ['INDENT', 2]
    -    outdent = ['OUTDENT', 2]
    -    indent.generated = outdent.generated = yes if implicit
    -    indent.explicit = outdent.explicit = yes if not implicit
    -    [indent, outdent]
    -
    -  generate: generate

    Look up a tag by token index.

      tag: (i) -> @tokens[i]?[0]

    Constants

    List of the token pairs that must be balanced.

    BALANCED_PAIRS = [
    -  ['(', ')']
    -  ['[', ']']
    -  ['{', '}']
    -  ['INDENT', 'OUTDENT'],
    -  ['CALL_START', 'CALL_END']
    -  ['PARAM_START', 'PARAM_END']
    -  ['INDEX_START', 'INDEX_END']
    -]

    The inverse mappings of BALANCED_PAIRS we're trying to fix up, so we can -look things up from either end.

    exports.INVERSES = INVERSES = {}

    The tokens that signal the start/end of a balanced pair.

    EXPRESSION_START = []
    -EXPRESSION_END   = []
    -
    -for [left, rite] in BALANCED_PAIRS
    -  EXPRESSION_START.push INVERSES[rite] = left
    -  EXPRESSION_END  .push INVERSES[left] = rite

    Tokens that indicate the close of a clause of an expression.

    EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat EXPRESSION_END

    Tokens that, if followed by an IMPLICIT_CALL, indicate a function invocation.

    IMPLICIT_FUNC    = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']

    If preceded by an IMPLICIT_FUNC, indicates a function invocation.

    IMPLICIT_CALL    = [
    -  'IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS'
    -  'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER'
    -  '@', '->', '=>', '[', '(', '{', '--', '++'
    -]
    -
    -IMPLICIT_UNSPACED_CALL = ['+', '-']

    Tokens indicating that the implicit call must enclose a block of expressions.

    IMPLICIT_BLOCK   = ['->', '=>', '{', '[', ',']

    Tokens that always mark the end of an implicit call for single-liners.

    IMPLICIT_END     = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY',
    -  'LOOP', 'TERMINATOR']

    Single-line flavors of block expressions that have unclosed endings. -The grammar can't disambiguate them, so we insert the implicit indentation.

    SINGLE_LINERS    = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']
    -SINGLE_CLOSERS   = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']

    Tokens that end a line.

    LINEBREAKS       = ['TERMINATOR', 'INDENT', 'OUTDENT']
    -
    -
    \ No newline at end of file +blocks, so it doesn't need to. ')' can close a single-line block, +but we need to make sure it's balanced. +

    + + + +
      addImplicitIndentation: ->
    +    starter = indent = outdent = null
    +
    +    condition = (token, i) ->
    +      token[1] isnt ';' and token[0] in SINGLE_CLOSERS and
    +      not (token[0] is 'ELSE' and starter isnt 'THEN') and
    +      not (token[0] in ['CATCH', 'FINALLY'] and starter in ['->', '=>'])
    +
    +    action = (token, i) ->
    +      @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
    +
    +    @scanTokens (token, i, tokens) ->
    +      [tag] = token
    +      if tag is 'TERMINATOR' and @tag(i + 1) is 'THEN'
    +        tokens.splice i, 1
    +        return 0
    +      if tag is 'ELSE' and @tag(i - 1) isnt 'OUTDENT'
    +        tokens.splice i, 0, @indentation()...
    +        return 2
    +      if tag is 'CATCH'
    +        for j in [1..2] when @tag(i + j) in ['OUTDENT', 'TERMINATOR', 'FINALLY']
    +          tokens.splice i + j, 0, @indentation()...
    +          return 2 + j
    +      if tag in SINGLE_LINERS and @tag(i + 1) isnt 'INDENT' and
    +         not (tag is 'ELSE' and @tag(i + 1) is 'IF')
    +        starter = tag
    +        [indent, outdent] = @indentation yes
    +        indent.fromThen   = true if starter is 'THEN'
    +        tokens.splice i + 1, 0, indent
    +        @detectEnd i + 2, condition, action
    +        tokens.splice i, 1 if tag is 'THEN'
    +        return 1
    +      return 1
    + + + + +
  • +
    + +
    + +
    +

    Tag postfix conditionals as such, so that we can parse them with a +different precedence. +

    + +
    + +
      tagPostfixConditionals: ->
    +
    +    original = null
    +
    +    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) ->
    +      if token[0] isnt 'INDENT' or (token.generated and not token.fromThen)
    +        original[0] = 'POST_' + original[0]
    +
    +    @scanTokens (token, i) ->
    +      return 1 unless token[0] is 'IF'
    +      original = token
    +      @detectEnd i + 1, condition, action
    +      return 1
    + +
  • + + +
  • +
    + +
    + +
    +

    Generate the indentation tokens, based on another token on the same line. +

    + +
    + +
      indentation: (implicit = no) ->
    +    indent  = ['INDENT', 2]
    +    outdent = ['OUTDENT', 2]
    +    indent.generated = outdent.generated = yes if implicit
    +    indent.explicit = outdent.explicit = yes if not implicit
    +    [indent, outdent]
    +
    +  generate: generate
    + +
  • + + +
  • +
    + +
    + +
    +

    Look up a tag by token index. +

    + +
    + +
      tag: (i) -> @tokens[i]?[0]
    + +
  • + + +
  • +
    + +
    + +
    +

    Constants

    + +
    + +
  • + + +
  • +
    + +
    + +
    + +
    + +
  • + + +
  • +
    + +
    + +
    +

    List of the token pairs that must be balanced. +

    + +
    + +
    BALANCED_PAIRS = [
    +  ['(', ')']
    +  ['[', ']']
    +  ['{', '}']
    +  ['INDENT', 'OUTDENT'],
    +  ['CALL_START', 'CALL_END']
    +  ['PARAM_START', 'PARAM_END']
    +  ['INDEX_START', 'INDEX_END']
    +]
    + +
  • + + +
  • +
    + +
    + +
    +

    The inverse mappings of BALANCED_PAIRS we're trying to fix up, so we can +look things up from either end. +

    + +
    + +
    exports.INVERSES = INVERSES = {}
    + +
  • + + +
  • +
    + +
    + +
    +

    The tokens that signal the start/end of a balanced pair. +

    + +
    + +
    EXPRESSION_START = []
    +EXPRESSION_END   = []
    +
    +for [left, rite] in BALANCED_PAIRS
    +  EXPRESSION_START.push INVERSES[rite] = left
    +  EXPRESSION_END  .push INVERSES[left] = rite
    + +
  • + + +
  • +
    + +
    + +
    +

    Tokens that indicate the close of a clause of an expression. +

    + +
    + +
    EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat EXPRESSION_END
    + +
  • + + +
  • +
    + +
    + +
    +

    Tokens that, if followed by an IMPLICIT_CALL, indicate a function invocation. +

    + +
    + +
    IMPLICIT_FUNC    = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']
    + +
  • + + +
  • +
    + +
    + +
    +

    If preceded by an IMPLICIT_FUNC, indicates a function invocation. +

    + +
    + +
    IMPLICIT_CALL    = [
    +  'IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS'
    +  'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER'
    +  'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'
    +]
    +
    +IMPLICIT_UNSPACED_CALL = ['+', '-']
    + +
  • + + +
  • +
    + +
    + +
    +

    Tokens that always mark the end of an implicit call for single-liners. +

    + +
    + +
    IMPLICIT_END     = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY',
    +  'LOOP', 'TERMINATOR']
    + +
  • + + +
  • +
    + +
    + +
    +

    Single-line flavors of block expressions that have unclosed endings. +The grammar can't disambiguate them, so we insert the implicit indentation. +

    + +
    + +
    SINGLE_LINERS    = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']
    +SINGLE_CLOSERS   = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']
    + +
  • + + +
  • +
    + +
    + +
    +

    Tokens that end a line. +

    + +
    + +
    LINEBREAKS       = ['TERMINATOR', 'INDENT', 'OUTDENT']
    + +
  • + + + + + diff --git a/documentation/docs/scope.html b/documentation/docs/scope.html index 703f8fa3ff..83030a42ff 100644 --- a/documentation/docs/scope.html +++ b/documentation/docs/scope.html @@ -1,58 +1,431 @@ - scope.coffee

    scope.coffee

    The Scope class regulates lexical scoping within CoffeeScript. As you + + + + + scope.litcoffee + + + + + +

    +
    + + + +
      + +
    • +
      +

      scope.litcoffee

      +
      +
    • + + + +
    • +
      + +
      + +
      +

      The Scope class regulates lexical scoping within CoffeeScript. As you generate code, you create a tree of scopes in the same shape as the nested function bodies. Each scope knows about the variables declared within it, and has a reference to its parent enclosing scope. In this way, we know which variables are new and need to be declared with var, and which are shared -with the outside.

    Import the helpers we plan to use.

    {extend, last} = require './helpers'
    +with external scopes.
    +

    + +
    + + + + +
  • +
    + +
    + +
    +

    Import the helpers we plan to use. +

    + +
    + +
    +{extend, last} = require './helpers'
     
    -exports.Scope = class Scope
  • The top-level Scope object.

      @root: null

    Initialize a scope with its parent, for lookups up the chain, +exports.Scope = class Scope + + + + +

  • +
    + +
    + +
    +

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

    + +
    + +
    +  @root: null
    + +
  • + + +
  • +
    + +
    + +
    +

    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 wraps.

  •   constructor: (@parent, @expressions, @method) ->
    -    @variables = [{name: 'arguments', type: 'arguments'}]
    -    @positions = {}
    -    Scope.root = this unless @parent

    Adds a new variable or overrides an existing one.

      add: (name, type, immediate) ->
    -    return @parent.add name, type, immediate if @shared and not immediate
    -    if Object::hasOwnProperty.call @positions, name
    -      @variables[@positions[name]].type = type
    -    else
    -      @positions[name] = @variables.push({name, type}) - 1

    When super is called, we need to find the name of the current method we're -in, so that we know how to invoke the same method of the parent class. This -can get complicated if super is being called from an inner function. -namedMethod will walk up the scope tree until it either finds the first -function object that has a name filled in, or bottoms out.

      namedMethod: ->
    -    return @method if @method.name or !@parent
    -    @parent.namedMethod()

    Look up a variable name in lexical scope, and declare it if it does not -already exist.

      find: (name) ->
    -    return yes if @check name
    -    @add name, 'var'
    -    no

    Reserve a variable name as originating from a function parameter for this -scope. No var required for internal references.

      parameter: (name) ->
    -    return if @shared and @parent.check name, yes
    -    @add name, 'param'

    Just check to see if a variable has already been declared, without reserving, -walks up to the root scope.

      check: (name) ->
    -    !!(@type(name) or @parent?.check(name))

    Generate a temporary variable name at the given index.

      temporary: (name, index) ->
    -    if name.length > 1
    -      '_' + name + if index > 1 then index - 1 else ''
    -    else
    -      '_' + (index + parseInt name, 36).toString(36).replace /\d/g, 'a'

    Gets the type of a variable.

      type: (name) ->
    -    return v.type for v in @variables when v.name is name
    -    null

    If we need to store an intermediate result, find an available name for a -compiler-generated variable. _var, _var2, and so on...

      freeVariable: (name, reserve=true) ->
    -    index = 0
    -    index++ while @check((temp = @temporary name, index))
    -    @add temp, 'var', yes if reserve
    -    temp

    Ensure that an assignment is made at the top of this scope -(or at the top-level scope, if requested).

      assign: (name, value) ->
    -    @add name, {value, assigned: yes}, yes
    -    @hasAssignments = yes

    Does this scope have any declared variables?

      hasDeclarations: ->
    -    !!@declaredVariables().length

    Return the list of variables first declared in this scope.

      declaredVariables: ->
    -    realVars = []
    -    tempVars = []
    -    for v in @variables when v.type is 'var'
    -      (if v.name.charAt(0) is '_' then tempVars else realVars).push v.name
    -    realVars.sort().concat tempVars.sort()

    Return the list of assignments that are supposed to be made at the top -of this scope.

      assignedVariables: ->
    -    "#{v.name} = #{v.type.value}" for v in @variables when v.type.assigned
    -
    -
    \ No newline at end of file +it belongs to. +

    + + + +
    +  constructor: (@parent, @expressions, @method) ->
    +    @variables = [{name: 'arguments', type: 'arguments'}]
    +    @positions = {}
    +    Scope.root = this unless @parent
    + + + + +
  • +
    + +
    + +
    +

    Adds a new variable or overrides an existing one. +

    + +
    + +
    +  add: (name, type, immediate) ->
    +    return @parent.add name, type, immediate if @shared and not immediate
    +    if Object::hasOwnProperty.call @positions, name
    +      @variables[@positions[name]].type = type
    +    else
    +      @positions[name] = @variables.push({name, type}) - 1
    + +
  • + + +
  • +
    + +
    + +
    +

    When super is called, we need to find the name of the current method we're +in, so that we know how to invoke the same method of the parent class. This +can get complicated if super is being called from an inner function. +namedMethod will walk up the scope tree until it either finds the first +function object that has a name filled in, or bottoms out. +

    + +
    + +
    +  namedMethod: ->
    +    return @method if @method?.name or !@parent
    +    @parent.namedMethod()
    + +
  • + + +
  • +
    + +
    + +
    +

    Look up a variable name in lexical scope, and declare it if it does not +already exist. +

    + +
    + +
    +  find: (name) ->
    +    return yes if @check name
    +    @add name, 'var'
    +    no
    + +
  • + + +
  • +
    + +
    + +
    +

    Reserve a variable name as originating from a function parameter for this +scope. No var required for internal references. +

    + +
    + +
    +  parameter: (name) ->
    +    return if @shared and @parent.check name, yes
    +    @add name, 'param'
    + +
  • + + +
  • +
    + +
    + +
    +

    Just check to see if a variable has already been declared, without reserving, +walks up to the root scope. +

    + +
    + +
    +  check: (name) ->
    +    !!(@type(name) or @parent?.check(name))
    + +
  • + + +
  • +
    + +
    + +
    +

    Generate a temporary variable name at the given index. +

    + +
    + +
    +  temporary: (name, index) ->
    +    if name.length > 1
    +      '_' + name + if index > 1 then index - 1 else ''
    +    else
    +      '_' + (index + parseInt name, 36).toString(36).replace /\d/g, 'a'
    + +
  • + + +
  • +
    + +
    + +
    +

    Gets the type of a variable. +

    + +
    + +
    +  type: (name) ->
    +    return v.type for v in @variables when v.name is name
    +    null
    + +
  • + + +
  • +
    + +
    + +
    +

    If we need to store an intermediate result, find an available name for a +compiler-generated variable. _var, _var2, and so on... +

    + +
    + +
    +  freeVariable: (name, reserve=true) ->
    +    index = 0
    +    index++ while @check((temp = @temporary name, index))
    +    @add temp, 'var', yes if reserve
    +    temp
    + +
  • + + +
  • +
    + +
    + +
    +

    Ensure that an assignment is made at the top of this scope +(or at the top-level scope, if requested). +

    + +
    + +
    +  assign: (name, value) ->
    +    @add name, {value, assigned: yes}, yes
    +    @hasAssignments = yes
    + +
  • + + +
  • +
    + +
    + +
    +

    Does this scope have any declared variables? +

    + +
    + +
    +  hasDeclarations: ->
    +    !!@declaredVariables().length
    + +
  • + + +
  • +
    + +
    + +
    +

    Return the list of variables first declared in this scope. +

    + +
    + +
    +  declaredVariables: ->
    +    realVars = []
    +    tempVars = []
    +    for v in @variables when v.type is 'var'
    +      (if v.name.charAt(0) is '_' then tempVars else realVars).push v.name
    +    realVars.sort().concat tempVars.sort()
    + +
  • + + +
  • +
    + +
    + +
    +

    Return the list of assignments that are supposed to be made at the top +of this scope. +

    + +
    + +
    +  assignedVariables: ->
    +    "#{v.name} = #{v.type.value}" for v in @variables when v.type.assigned
    + +
  • + + + + + diff --git a/documentation/docs/sourcemap.html b/documentation/docs/sourcemap.html index 0d1bca45ef..d47c527f9b 100644 --- a/documentation/docs/sourcemap.html +++ b/documentation/docs/sourcemap.html @@ -1,155 +1,646 @@ - sourcemap.coffee

    sourcemap.coffee

    LineMapping

    Hold data about mappings for one line of generated source code.

    class LineMapping
    -  constructor: (@generatedLine) ->

    columnMap keeps track of which columns we've already mapped.

        @columnMap = {}

    columnMappings is an array of all column mappings, sorted by generated-column.

        @columnMappings = []
    -
    -  addMapping: (generatedColumn, [sourceLine, sourceColumn], options={}) ->
    -    if @columnMap[generatedColumn] and options.noReplace

    We already have a mapping for this column.

          return
    -
    -    @columnMap[generatedColumn] = {
    -      generatedLine: @generatedLine
    -      generatedColumn
    -      sourceLine
    -      sourceColumn
    -    }
    -
    -    @columnMappings.push @columnMap[generatedColumn]
    -    @columnMappings.sort (a,b) -> a.generatedColumn - b.generatedColumn
    -
    -  getSourcePosition: (generatedColumn) ->
    -    answer = null
    -    lastColumnMapping = null
    -    for columnMapping in @columnMappings
    -      if columnMapping.generatedColumn > generatedColumn
    -        break
    -      else
    -        lastColumnMapping = columnMapping
    -    if lastColumnMapping
    -      answer = [lastColumnMapping.sourceLine, lastColumnMapping.sourceColumn]

    SourceMap

    Maps locations in a generated source file back to locations in the original source file.

    - -

    This is intentionally agnostic towards how a source map might be represented on disk. A -SourceMap can be converted to a "v3" style sourcemap with #generateV3SourceMap(), for example -but the SourceMap class itself knows nothing about v3 source maps.

    class exports.SourceMap
    -  constructor: () ->

    generatedLines is an array of LineMappings, one per generated line.

        @generatedLines = []

    Adds a mapping to this SourceMap.

    - -

    sourceLocation and generatedLocation are both [line, column] arrays.

    - -

    If options.noReplace is true, then if there is already a mapping for -the specified generatedLine and generatedColumn, this will have no effect.

      addMapping: (sourceLocation, generatedLocation, options={}) ->
    -    [generatedLine, generatedColumn] = generatedLocation
    -
    -    lineMapping = @generatedLines[generatedLine]
    -    if not lineMapping
    -      lineMapping = @generatedLines[generatedLine] = new LineMapping(generatedLine)
    -
    -    lineMapping.addMapping generatedColumn, sourceLocation, options

    Returns [sourceLine, sourceColumn], or null if no mapping could be found.

      getSourcePosition: ([generatedLine, generatedColumn]) ->
    -    answer = null
    -    lineMapping = @generatedLines[generatedLine]
    -    if not lineMapping

    TODO: Search backwards for the line?

        else
    -      answer = lineMapping.getSourcePosition generatedColumn
    -
    -    answer

    fn will be called once for every recorded mapping, in the order in -which they occur in the generated source. fn will be passed an object -with four properties: sourceLine, sourceColumn, generatedLine, and -generatedColumn.

      forEachMapping: (fn) ->
    -    for lineMapping, generatedLineNumber in @generatedLines
    -      if lineMapping
    -        for columnMapping in lineMapping.columnMappings
    -          fn(columnMapping)

    generateV3SourceMap

    Builds a V3 source map from a SourceMap object. -Returns the generated JSON as a string.

    exports.generateV3SourceMap = (sourceMap, sourceFile=null, generatedFile=null) ->
    -  writingGeneratedLine = 0
    -  lastGeneratedColumnWritten = 0
    -  lastSourceLineWritten = 0
    -  lastSourceColumnWritten = 0
    -  needComma = no
    -
    -  mappings = ""
    -
    -  sourceMap.forEachMapping (mapping) ->
    -    while writingGeneratedLine < mapping.generatedLine
    -      lastGeneratedColumnWritten = 0
    -      needComma = no
    -      mappings += ";"
    -      writingGeneratedLine++

    Write a comma if we've already written a segment on this line.

        if needComma
    -      mappings += ","
    -      needComma = no

    Write the next segment. -Segments can be 1, 4, or 5 values. If just one, then it is a generated column which -doesn't match anything in the source code.

    - -

    Fields are all zero-based, and relative to the previous occurence unless otherwise noted: - * starting-column in generated source, relative to previous occurence for the current line. - * index into the "sources" list - * starting line in the original source - * starting column in the original source - * index into the "names" list associated with this segment.

    Add the generated start-column

        mappings += exports.vlqEncodeValue(mapping.generatedColumn - lastGeneratedColumnWritten)
    -    lastGeneratedColumnWritten = mapping.generatedColumn

    Add the index into the sources list

        mappings += exports.vlqEncodeValue(0)

    Add the source start-line

        mappings += exports.vlqEncodeValue(mapping.sourceLine - lastSourceLineWritten)
    -    lastSourceLineWritten = mapping.sourceLine

    Add the source start-column

        mappings += exports.vlqEncodeValue(mapping.sourceColumn - lastSourceColumnWritten)
    -    lastSourceColumnWritten = mapping.sourceColumn

    TODO: Do we care about symbol names for CoffeeScript? Probably not.

        needComma = yes
    -
    -  answer = {
    -    version: 3
    -    file: generatedFile
    -    sourceRoot: ""
    -    sources: if sourceFile then [sourceFile] else []
    -    names: []
    -    mappings
    -  }
    -
    -  return JSON.stringify answer, null, 2

    Load a SourceMap from a JSON string. Returns the SourceMap object.

    exports.loadV3SourceMap = (sourceMap) ->
    -  todo()

    Base64 encoding helpers

    BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
    -MAX_BASE64_VALUE = BASE64_CHARS.length - 1
    -
    -encodeBase64Char = (value) ->
    -  if value > MAX_BASE64_VALUE
    -    throw new Error "Cannot encode value #{value} > #{MAX_BASE64_VALUE}"
    -  else if value < 0
    -    throw new Error "Cannot encode value #{value} < 0"
    -  BASE64_CHARS[value]
    -
    -decodeBase64Char = (char) ->
    -  value = BASE64_CHARS.indexOf char
    -  if value == -1
    -    throw new Error "Invalid Base 64 character: #{char}"
    -  value

    Base 64 VLQ encoding/decoding helpers

    Note that SourceMap VLQ encoding is "backwards". MIDI style VLQ encoding puts the -most-significant-bit (MSB) from the original value into the MSB of the VLQ encoded value -(see http://en.wikipedia.org/wiki/File:Uintvar_coding.svg). SourceMap VLQ does things -the other way around, with the least significat four bits of the original value encoded -into the first byte of the VLQ encoded value.

    VLQ_SHIFT      = 5
    -VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT # 0010 0000
    -VLQ_VALUE_MASK       = VLQ_CONTINUATION_BIT - 1 # 0001 1111

    Encode a value as Base 64 VLQ.

    exports.vlqEncodeValue = (value) ->

    Least significant bit represents the sign.

      signBit = if value < 0 then 1 else 0

    Next bits are the actual value

      valueToEncode = (Math.abs(value) << 1) + signBit
    -
    -  answer = ""

    Make sure we encode at least one character, even if valueToEncode is 0.

      while valueToEncode || !answer
    -    nextVlqChunk = valueToEncode & VLQ_VALUE_MASK
    -    valueToEncode = valueToEncode >> VLQ_SHIFT
    -
    -    if valueToEncode
    -      nextVlqChunk |= VLQ_CONTINUATION_BIT
    -
    -    answer += encodeBase64Char(nextVlqChunk)
    -
    -  return answer

    Decode a Base 64 VLQ value.

    - -

    Returns [value, consumed] where value is the decoded value, and consumed is the number -of characters consumed from str.

    exports.vlqDecodeValue = (str, offset=0) ->
    -  position = offset
    -  done = false
    -
    -  value = 0
    -  continuationShift = 0
    -
    -  while !done
    -    nextVlqChunk = decodeBase64Char(str[position])
    -    position += 1
    -
    -    nextChunkValue = nextVlqChunk & VLQ_VALUE_MASK
    -    value += (nextChunkValue << continuationShift)
    -
    -    if !(nextVlqChunk & VLQ_CONTINUATION_BIT)

    We'll be done after this character.

          done = true

    Bits are encoded least-significant first (opposite of MIDI VLQ). Increase the -continuationShift, so the next byte will end up where it should in the value.

        continuationShift += VLQ_SHIFT
    -
    -  consumed = position - offset

    Least significant bit represents the sign.

      signBit = value & 1
    -  value = value >> 1
    -
    -  if signBit then value = -value
    -
    -  return [value, consumed]
    -
    -
    \ No newline at end of file + + + + + sourcemap.litcoffee + + + + + +
    +
    + + + + +
    + + diff --git a/documentation/index.html.erb b/documentation/index.html.erb index c908337738..c6d9fb9f12 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -131,15 +131,13 @@ compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is - readable and pretty-printed, passes through - JavaScript Lint - without warnings, will work in every JavaScript runtime, and tends + readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.

    Latest Version: - 1.6.1 + 1.6.3

    @@ -266,16 +264,6 @@ sudo bin/cake install
    directly to stdout. - - -l, --lint - - If the jsl - (JavaScript Lint) - command is installed, use it - to check the compilation of a CoffeeScript file. (Handy in - conjunction with
    --watch) - - -s, --stdio @@ -285,17 +273,18 @@ sudo bin/cake install - -e, --eval + -l, --literate - Compile and print a little snippet of CoffeeScript directly from the - command line. For example:
    coffee -e "console.log num for num in [10..1]" + Parses the code as Literate CoffeeScript. You only need to specify + this when passing in code directly over stdio, or using some sort + of extension-less file name. - -r, --require + -e, --eval - Load a library before compiling or executing your script. Can be used - to hook in to the compiler (to add Growl notifications, for example). + Compile and print a little snippet of CoffeeScript directly from the + command line. For example:
    coffee -e "console.log num for num in [10..1]" @@ -812,6 +801,11 @@ Expressions Destructuring assignment can even be combined with splats.

    <%= code_for('patterns_and_splats', 'contents.join("")') %> +

    + Destructuring assignment is also useful when combined with class constructors + to assign properties to your instance from an options object passed to the constructor. +

    + <%= code_for('constructor_destructuring', 'contents.join("")') %>

    @@ -869,6 +863,11 @@ Expressions

    <%= code_for('switch') %> +

    + Switch statements can also be used without a control expression, turning them in to a cleaner alternative to if/else chains. +

    + <%= code_for('switch_with_no_expression') %> +

    Try/Catch/Finally @@ -922,7 +921,7 @@ Expressions Block Regular Expressions Similar to block strings and comments, CoffeeScript supports block regexes — extended regular expressions that ignore internal whitespace and can contain - comments and interpolation. Modeled after Perl's /x modifier, CoffeeSctipt's + comments and interpolation. Modeled after Perl's /x modifier, CoffeeScript's block regexes are delimited by /// and go a long way towards making complex regular expressions readable. To quote from the CoffeeScript source:

    @@ -1165,6 +1164,13 @@ Expressions The FAQ
    Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first. +
  • + JS2Coffee
    + Is a very well done reverse JavaScript-to-CoffeeScript compiler. It's + not going to be perfect (infer what your JavaScript classes are, when + you need bound functions, and so on...) — but it's a great starting + point for converting simple scripts. +
  • High-Rez Logo
    The CoffeeScript logo is available in Illustrator, EPS and PSD formats, for use @@ -1192,6 +1198,64 @@ Expressions Change Log +

    + + 1.6.3 + June 2, 2013 + +

    +

    + +

    + + 1.6.2 + March 18, 2013 + +

    +

    +

    1.6.1 @@ -1939,8 +2003,10 @@ Expressions else $(el).text window.compiledJS $('#error').hide() - catch error - $('#error').text(error.message).show() + catch {location, message} + if location? + message = "Error on line #{location.first_line + 1}: #{message}" + $('#error').text(message).show() # Update permalink $('#repl_permalink').attr 'href', "##{sourceFragment}#{encodeURIComponent source}" diff --git a/documentation/js/aliases.js b/documentation/js/aliases.js index ee5e636f88..0cbef1c4d9 100644 --- a/documentation/js/aliases.js +++ b/documentation/js/aliases.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var volume, winner; if (ignition === true) { diff --git a/documentation/js/array_comprehensions.js b/documentation/js/array_comprehensions.js index 94d16539fa..88dbfcc955 100644 --- a/documentation/js/array_comprehensions.js +++ b/documentation/js/array_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 186c70c3d9..5f8d9decd5 100644 --- a/documentation/js/block_comment.js +++ b/documentation/js/block_comment.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 /* -CoffeeScript Compiler v1.6.1 +SkinnyMochaHalfCaffScript Compiler v1.0 Released under the MIT License */ diff --git a/documentation/js/cake_tasks.js b/documentation/js/cake_tasks.js index d5c56652d6..43a0f699c9 100644 --- a/documentation/js/cake_tasks.js +++ b/documentation/js/cake_tasks.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var fs; fs = require('fs'); diff --git a/documentation/js/classes.js b/documentation/js/classes.js index 64cd05a9cb..5ee7effe93 100644 --- a/documentation/js/classes.js +++ b/documentation/js/classes.js @@ -1,10 +1,9 @@ -// Generated by CoffeeScript 1.6.1 -var Animal, Horse, Snake, sam, tom, +// Generated by CoffeeScript 1.6.3 +var Animal, Horse, Snake, sam, tom, _ref, _ref1, __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; }; Animal = (function() { - function Animal(name) { this.name = name; } @@ -18,11 +17,11 @@ Animal = (function() { })(); Snake = (function(_super) { - __extends(Snake, _super); function Snake() { - return Snake.__super__.constructor.apply(this, arguments); + _ref = Snake.__super__.constructor.apply(this, arguments); + return _ref; } Snake.prototype.move = function() { @@ -35,11 +34,11 @@ Snake = (function(_super) { })(Animal); Horse = (function(_super) { - __extends(Horse, _super); function Horse() { - return Horse.__super__.constructor.apply(this, arguments); + _ref1 = Horse.__super__.constructor.apply(this, arguments); + return _ref1; } Horse.prototype.move = function() { diff --git a/documentation/js/comparisons.js b/documentation/js/comparisons.js index 6b4a776523..c24b4c564d 100644 --- a/documentation/js/comparisons.js +++ b/documentation/js/comparisons.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var cholesterol, healthy; cholesterol = 127; diff --git a/documentation/js/conditionals.js b/documentation/js/conditionals.js index c192f2d81b..0c45c43afb 100644 --- a/documentation/js/conditionals.js +++ b/documentation/js/conditionals.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var date, mood; if (singing) { diff --git a/documentation/js/constructor_destructuring.js b/documentation/js/constructor_destructuring.js new file mode 100644 index 0000000000..13b81030b9 --- /dev/null +++ b/documentation/js/constructor_destructuring.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 1.6.3 +var Person; + +Person = (function() { + function Person(options) { + this.name = options.name, this.age = options.age, this.height = options.height; + } + + return Person; + +})(); diff --git a/documentation/js/default_args.js b/documentation/js/default_args.js index 4228ffdbb8..aab7993b31 100644 --- a/documentation/js/default_args.js +++ b/documentation/js/default_args.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var fill; fill = function(container, liquid) { diff --git a/documentation/js/do.js b/documentation/js/do.js index 501164cbdb..aa09cc0b17 100644 --- a/documentation/js/do.js +++ b/documentation/js/do.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var filename, _fn, _i, _len; _fn = function(filename) { diff --git a/documentation/js/embedded.js b/documentation/js/embedded.js index cba575d16b..f914070dbe 100644 --- a/documentation/js/embedded.js +++ b/documentation/js/embedded.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var hi; hi = function() { diff --git a/documentation/js/existence.js b/documentation/js/existence.js index 34c68bf228..31e2d11ca9 100644 --- a/documentation/js/existence.js +++ b/documentation/js/existence.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var footprints, solipsism, speed; if ((typeof mind !== "undefined" && mind !== null) && (typeof world === "undefined" || world === null)) { diff --git a/documentation/js/expressions.js b/documentation/js/expressions.js index ed34a10c59..23eedf1217 100644 --- a/documentation/js/expressions.js +++ b/documentation/js/expressions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var eldest, grade; grade = function(student) { diff --git a/documentation/js/expressions_assignment.js b/documentation/js/expressions_assignment.js index fea6e30686..fe50ae687b 100644 --- a/documentation/js/expressions_assignment.js +++ b/documentation/js/expressions_assignment.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 2ffbbcf7e7..0e17a431c9 100644 --- a/documentation/js/expressions_comprehension.js +++ b/documentation/js/expressions_comprehension.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var globals, name; globals = ((function() { diff --git a/documentation/js/expressions_try.js b/documentation/js/expressions_try.js index 42f4476c52..f0f8534ea5 100644 --- a/documentation/js/expressions_try.js +++ b/documentation/js/expressions_try.js @@ -1,9 +1,11 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 +var error; alert((function() { try { return nonexistent / void 0; - } catch (error) { + } catch (_error) { + error = _error; return "And the error is ... " + error; } })()); diff --git a/documentation/js/fat_arrow.js b/documentation/js/fat_arrow.js index 0b0fe2586d..dfa3e1b852 100644 --- a/documentation/js/fat_arrow.js +++ b/documentation/js/fat_arrow.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var Account; Account = function(customer, cart) { diff --git a/documentation/js/functions.js b/documentation/js/functions.js index a422b1f9ff..00a4db0aa9 100644 --- a/documentation/js/functions.js +++ b/documentation/js/functions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var cube, square; square = function(x) { diff --git a/documentation/js/heredocs.js b/documentation/js/heredocs.js index 7877e9edb4..4032044b1e 100644 --- a/documentation/js/heredocs.js +++ b/documentation/js/heredocs.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var html; html = "\n cup of coffeescript\n"; diff --git a/documentation/js/heregexes.js b/documentation/js/heregexes.js index 2d7ff0ab22..dff3cb994b 100644 --- a/documentation/js/heregexes.js +++ b/documentation/js/heregexes.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var OPERATOR; OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/; diff --git a/documentation/js/interpolation.js b/documentation/js/interpolation.js index 4a0ca18cee..41377c166d 100644 --- a/documentation/js/interpolation.js +++ b/documentation/js/interpolation.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var author, quote, sentence; author = "Wittgenstein"; diff --git a/documentation/js/multiple_return_values.js b/documentation/js/multiple_return_values.js index 5cdcf954a6..28d51e8a95 100644 --- a/documentation/js/multiple_return_values.js +++ b/documentation/js/multiple_return_values.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var city, forecast, temp, weatherReport, _ref; weatherReport = function(location) { diff --git a/documentation/js/object_comprehensions.js b/documentation/js/object_comprehensions.js index 010a295277..45ab45cf6d 100644 --- a/documentation/js/object_comprehensions.js +++ b/documentation/js/object_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var age, ages, child, yearsOld; yearsOld = { diff --git a/documentation/js/object_extraction.js b/documentation/js/object_extraction.js index 619de364ad..27c9be44ee 100644 --- a/documentation/js/object_extraction.js +++ b/documentation/js/object_extraction.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 f7f0e89a2f..242bb6bfcd 100644 --- a/documentation/js/objects_and_arrays.js +++ b/documentation/js/objects_and_arrays.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 e4ef251b47..5f80edc5cc 100644 --- a/documentation/js/objects_reserved.js +++ b/documentation/js/objects_reserved.js @@ -1,5 +1,4 @@ -// Generated by CoffeeScript 1.6.1 - +// Generated by CoffeeScript 1.6.3 $('.account').attr({ "class": 'active' }); diff --git a/documentation/js/overview.js b/documentation/js/overview.js index cfc977b249..f8b6d494a9 100644 --- a/documentation/js/overview.js +++ b/documentation/js/overview.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 62e3d94a51..a33a28e8db 100644 --- a/documentation/js/parallel_assignment.js +++ b/documentation/js/parallel_assignment.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var theBait, theSwitch, _ref; theBait = 1000; diff --git a/documentation/js/patterns_and_splats.js b/documentation/js/patterns_and_splats.js index f471ae4139..f4922ab9ba 100644 --- a/documentation/js/patterns_and_splats.js +++ b/documentation/js/patterns_and_splats.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var close, contents, open, tag, _i, _ref, __slice = [].slice; diff --git a/documentation/js/prototypes.js b/documentation/js/prototypes.js index 3e60d0c78c..28b9a2fbce 100644 --- a/documentation/js/prototypes.js +++ b/documentation/js/prototypes.js @@ -1,5 +1,4 @@ -// Generated by CoffeeScript 1.6.1 - +// Generated by CoffeeScript 1.6.3 String.prototype.dasherize = function() { return this.replace(/_/g, "-"); }; diff --git a/documentation/js/range_comprehensions.js b/documentation/js/range_comprehensions.js index 684c4d1623..8c8796844e 100644 --- a/documentation/js/range_comprehensions.js +++ b/documentation/js/range_comprehensions.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var countdown, num; countdown = (function() { diff --git a/documentation/js/scope.js b/documentation/js/scope.js index ae0194e15b..5404dc8fc7 100644 --- a/documentation/js/scope.js +++ b/documentation/js/scope.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var changeNumbers, inner, outer; outer = 1; diff --git a/documentation/js/slices.js b/documentation/js/slices.js index 32d26880b9..c7e4498536 100644 --- a/documentation/js/slices.js +++ b/documentation/js/slices.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 1c0415a72b..81317881e5 100644 --- a/documentation/js/soaks.js +++ b/documentation/js/soaks.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 0f72d97923..1cded35024 100644 --- a/documentation/js/splats.js +++ b/documentation/js/splats.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var awardMedals, contenders, gold, rest, silver, __slice = [].slice; diff --git a/documentation/js/splices.js b/documentation/js/splices.js index 0d4d0cdf8f..a53ba7704e 100644 --- a/documentation/js/splices.js +++ b/documentation/js/splices.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 7ba6f2ae26..61de561a10 100644 --- a/documentation/js/strings.js +++ b/documentation/js/strings.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 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 4f9f0baa3c..83500b224b 100644 --- a/documentation/js/switch.js +++ b/documentation/js/switch.js @@ -1,5 +1,4 @@ -// Generated by CoffeeScript 1.6.1 - +// Generated by CoffeeScript 1.6.3 switch (day) { case "Mon": go(work); diff --git a/documentation/js/switch_with_no_expression.js b/documentation/js/switch_with_no_expression.js new file mode 100644 index 0000000000..f92c7af5ba --- /dev/null +++ b/documentation/js/switch_with_no_expression.js @@ -0,0 +1,19 @@ +// Generated by CoffeeScript 1.6.3 +var grade, score; + +score = 76; + +grade = (function() { + switch (false) { + case !(score < 60): + return 'F'; + case !(score < 70): + return 'D'; + case !(score < 80): + return 'C'; + case !(score < 90): + return 'B'; + default: + return 'A'; + } +})(); diff --git a/documentation/js/try.js b/documentation/js/try.js index 33c56667d2..caf3ae56a7 100644 --- a/documentation/js/try.js +++ b/documentation/js/try.js @@ -1,9 +1,11 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 +var error; try { allHellBreaksLoose(); catsAndDogsLivingTogether(); -} catch (error) { +} catch (_error) { + error = _error; print(error); } finally { cleanUp(); diff --git a/documentation/js/while.js b/documentation/js/while.js index bcf82cb76a..a5238abd5c 100644 --- a/documentation/js/while.js +++ b/documentation/js/while.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 var lyrics, num; if (this.studyingEconomics) { diff --git a/extras/coffee-script.js b/extras/coffee-script.js index 1e124b343c..f8263a7f96 100644 --- a/extras/coffee-script.js +++ b/extras/coffee-script.js @@ -1,11 +1,12 @@ /** - * CoffeeScript Compiler v1.6.1 + * CoffeeScript Compiler v1.6.3 * http://coffeescript.org * * Copyright 2011, Jeremy Ashkenas * Released under the MIT License */ -(function(root){var CoffeeScript=function(){function require(e){return require[e]}return require["./helpers"]=new function(){var e=this;(function(){var t,n,i,s;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.compact=function(e){var t,n,i,s;for(s=[],n=0,i=e.length;i>n;n++)t=e[n],t&&s.push(t);return s},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,s,r;for(n=[],s=0,r=e.length;r>s;s++)t=e[s],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=function(e,t){return e[e.length-(t||0)-1]},e.some=null!=(s=Array.prototype.some)?s: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},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){var n;return null==t&&(t=!1),n=e.split("/"),e=n[n.length-1],t?(n=e.split("."),n.pop(),"coffee"===n[n.length-1]&&n.pop(),n.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)}}).call(this)},require["./rewriter"]=new function(){var e=this;(function(){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,m,g,b,k,y,v=[].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){var n;return n=[e,t],n.generated=!0,n},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.removeMidExpressionNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.addImplicitIndentation(),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 r,a,o,c,h;for(o=this.tokens,r=0;a=o[e];){if(0===r&&t.call(this,a,e))return n.call(this,a,e);if(!a||0>r)return n.call(this,a,e-1);c=a[0],v.call(s,c)>=0?r+=1:(h=a[0],v.call(i,h)>=0&&(r-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,s;for(s=this.tokens,e=n=0,i=s.length;i>n&&(t=s[e][0],"TERMINATOR"===t);e=++n);return e?this.tokens.splice(0,e):void 0},e.prototype.removeMidExpressionNewlines=function(){return this.scanTokens(function(e,t,i){var s;return"TERMINATOR"===e[0]&&(s=this.tag(t+1),v.call(n,s)>=0)?(i.splice(t,1),0):1})},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,s,r,a;for(t=arguments[0],i=arguments.length>=2?w.call(arguments,1):[],e=0,n=s=0,r=i.length;r>=0?r>s:s>r;n=r>=0?++s:--s){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=i[n]&&("string"==typeof i[n]&&(i[n]=[i[n]]),a=this.tag(t+n+e),0>v.call(i[n],a)))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,r,a,o,c,h,l;for(n=[];e>=0&&(n.length||(o=this.tag(e),0>v.call(t,o)&&(c=this.tag(e),0>v.call(s,c)||this.tokens[e].generated)&&(h=this.tag(e),0>v.call(u,h))));)r=this.tag(e),v.call(i,r)>=0&&n.push(this.tag(e)),a=this.tag(e),v.call(s,a)>=0&&n.length&&n.pop(),e-=1;return l=this.tag(e),v.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e;return e=[],this.scanTokens(function(t,n,r){var l,p,d,m,g,b,k,y,w,T,C,F,L,E,N,x,D,S,A,R,I,_,$,O,M,j;if(R=t[0],T=(n>0?r[n-1]:[])[0],y=(r.length-1>n?r[n+1]:[])[0],N=function(){return e[e.length-1]},x=n,d=function(e){return n-x+e},m=function(){var e,t;return null!=(e=N())?null!=(t=e[2])?t.ours:void 0:void 0},g=function(){var e;return m()&&"("===(null!=(e=N())?e[0]:void 0)},k=function(){var e;return m()&&"{"===(null!=(e=N())?e[0]:void 0)},b=function(){var e;return m&&"CONTROL"===(null!=(e=N())?e[0]:void 0)},D=function(t){var i;return i=null!=t?t:n,e.push(["(",i,{ours:!0}]),r.splice(i,0,f("CALL_START","(")),null==t?n+=1:void 0},l=function(){return e.pop(),r.splice(n,0,f("CALL_END",")")),n+=1},S=function(t,i){var s;return null==i&&(i=!0),s=null!=t?t:n,e.push(["{",s,{sameLine:!0,startsLine:i,ours:!0}]),r.splice(s,0,f("{",f(new String("{")))),null==t?n+=1:void 0},p=function(t){return t=null!=t?t:n,e.pop(),r.splice(t,0,f("}","}")),n+=1},g()&&("IF"===R||"TRY"===R||"FINALLY"===R||"CATCH"===R||"CLASS"===R||"SWITCH"===R))return e.push(["CONTROL",n,{ours:!0}]),d(1);if("INDENT"===R&&m()){if("=>"!==T&&"->"!==T&&"["!==T&&"("!==T&&","!==T&&"{"!==T&&"TRY"!==T&&"ELSE"!==T&&"="!==T)for(;g();)l();return b()&&e.pop(),e.push([R,n]),d(1)}if(v.call(s,R)>=0)return e.push([R,n]),d(1);if(v.call(i,R)>=0){for(;m();)g()?l():k()?p():e.pop();e.pop()}if((v.call(c,R)>=0&&t.spaced||"?"===R&&n>0&&!r[n-1].spaced)&&(v.call(a,y)>=0||v.call(h,y)>=0&&!(null!=(I=r[n+1])?I.spaced:void 0)&&!(null!=(_=r[n+1])?_.newLine:void 0)))return"?"===R&&(R=t[0]="FUNC_EXIST"),D(n+1),d(2);if(this.matchTags(n,c,"INDENT",null,":")&&!this.findTagsBackwards(n,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return D(n+1),e.push(["INDENT",n+2]),d(3);if(":"===R){for(C="@"===this.tag(n-2)?n-2:n-1;"HERECOMMENT"===this.tag(C-2);)C-=2;return A=0===C||($=this.tag(C-1),v.call(u,$)>=0)||r[C-1].newLine,N()&&(O=N(),E=O[0],L=O[1],("{"===E||"INDENT"===E&&"{"===this.tag(L-1))&&(A||","===this.tag(C-1)||"{"===this.tag(C-1)))?d(1):(S(C,!!A),d(2))}if("OUTDENT"===T&&g()&&("."===R||"?."===R||"::"===R||"?::"===R))return l(),d(1);if(k()&&v.call(u,R)>=0&&(N()[2].sameLine=!1),v.call(o,R)>=0)for(;m();)if(M=N(),E=M[0],L=M[1],j=M[2],F=j.sameLine,A=j.startsLine,g()&&","!==T)l();else if(k()&&F&&!A)p();else{if(!k()||"TERMINATOR"!==R||","===T||A&&this.looksObjectish(n+1))break;p()}if(","===R&&!this.looksObjectish(n+1)&&k()&&("TERMINATOR"!==y||!this.looksObjectish(n+2)))for(w="OUTDENT"===y?1:0;k();)p(n+w);return d(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,s,r,a,o;return e[2]?1:e.generated||e.explicit?(o=null!=(r=null!=(a=n[t-1])?a[2]:void 0)?r:{last_line:0,last_column:0},s=o.last_line,i=o.last_column,e[2]={first_line:s,first_column:i,last_line:s,last_column:i},1):1})},e.prototype.addImplicitIndentation=function(){var e,t,n,i,s;return s=n=i=null,t=function(e){var t;return";"!==e[1]&&(t=e[0],v.call(p,t)>=0)&&!("ELSE"===e[0]&&"IF"!==s&&"THEN"!==s)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,i)},this.scanTokens(function(r,a,o){var c,h,l;return c=r[0],"TERMINATOR"===c&&"THEN"===this.tag(a+1)?(o.splice(a,1),0):"ELSE"===c&&"OUTDENT"!==this.tag(a-1)?(o.splice.apply(o,[a,0].concat(w.call(this.indentation(r)))),2):"CATCH"!==c||"OUTDENT"!==(h=this.tag(a+2))&&"TERMINATOR"!==h&&"FINALLY"!==h?v.call(d,c)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==c||"IF"!==this.tag(a+1))?(s=c,l=this.indentation(r,!0),n=l[0],i=l[1],"THEN"===s&&(n.fromThen=!0),o.splice(a+1,0,n),this.detectEnd(a+2,t,e),"THEN"===c&&o.splice(a,1),1):1:(o.splice.apply(o,[a+2,0].concat(w.call(this.indentation(r)))),4)})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e){var t;return"TERMINATOR"===(t=e[0])||"INDENT"===t},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,s){return"IF"!==i[0]?1:(n=i,this.detectEnd(s+1,t,e),1)})},e.prototype.indentation=function(e,t){var n,i;return null==t&&(t=!1),n=["INDENT",2],i=["OUTDENT",2],t&&(n.generated=i.generated=!0),t||(n.explicit=i.explicit=!0),[n,i]},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=[],i=[],b=0,k=t.length;k>b;b++)y=t[b],m=y[0],g=y[1],s.push(l[g]=m),i.push(l[m]=g);n=["CATCH","WHEN","ELSE","FINALLY"].concat(i),c=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],a=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","SUPER","@","->","=>","[","(","{","--","++"],h=["+","-"],r=["->","=>","{","[",","],o=["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"]}).call(this)},require["./lexer"]=new function(){var e=this;(function(){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,m,g,b,k,y,v,w,T,C,F,L,E,N,x,D,S,A,R,I,_,$,O,M,j,B,V,P,U,q,H,G,W,X,Y,K,z,J,Z=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};z=require("./rewriter"),M=z.Rewriter,k=z.INVERSES,J=require("./helpers"),G=J.count,K=J.starts,H=J.compact,X=J.last,Y=J.locationDataToString,e.Lexer=E=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,s,r;for(null==t&&(t={}),this.literate=t.literate,this.indent=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),i=0;this.chunk=e.slice(i);)n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.heredocToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),r=this.getLineAndColumnFromChunk(n),this.chunkLine=r[0],this.chunkColumn=r[1],i+=n;return this.closeIndentation(),(s=this.ends.pop())&&this.error("missing "+s),t.rewrite===!1?this.tokens:(new M).rewrite(this.tokens)},e.prototype.clean=function(e){var n,i,s;return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(P,""),q.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(i=function(){var t,i,r,a;for(r=e.split("\n"),a=[],t=0,i=r.length;i>t;t++)n=r[t],(s=F.exec(n))?a.push(n.slice(s[0].length)):a.push("# "+n);return a}(),e=i.join("\n")),e},e.prototype.identifierToken=function(){var e,t,n,i,s,c,h,l,u,p,d,f,m,b;return(h=g.exec(this.chunk))?(c=h[0],i=h[1],e=h[2],s=i.length,l=void 0,"own"===i&&"FOR"===this.tag()?(this.token("OWN",i),i.length):(n=e||(u=X(this.tokens))&&("."===(f=u[0])||"?."===f||"::"===f||"?::"===f||!u.spaced&&"@"===u[0]),p="IDENTIFIER",!n&&(Z.call(w,i)>=0||Z.call(o,i)>=0)&&(p=i.toUpperCase(),"WHEN"===p&&(m=this.tag(),Z.call(T,m)>=0)?p="LEADING_WHEN":"FOR"===p?this.seenFor=!0:"UNLESS"===p?p="IF":Z.call(U,p)>=0?p="UNARY":Z.call($,p)>=0&&("INSTANCEOF"!==p&&this.seenFor?(p="FOR"+p,this.seenFor=!1):(p="RELATION","!"===this.value()&&(l=this.tokens.pop(),i="!"+i)))),Z.call(v,i)>=0&&(n?(p="IDENTIFIER",i=new String(i),i.reserved=!0):Z.call(O,i)>=0&&this.error('reserved word "'+i+'"')),n||(Z.call(r,i)>=0&&(i=a[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,s),l&&(b=[l[2].first_line,l[2].first_column],d[2].first_line=b[0],d[2].first_column=b[1]),e&&(t=c.lastIndexOf(":"),this.token(":",":",t,e.length)),c.length)):0},e.prototype.numberToken=function(){var e,t,n,i,s;return(n=R.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,(s=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(s[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;switch(this.chunk.charAt(0)){case"'":if(!(e=B.exec(this.chunk)))return 0;n=e[0],this.token("STRING",n.replace(x,"\\\n"),0,n.length);break;case'"':if(!(n=this.balancedString(this.chunk,'"')))return 0;n.indexOf("#{",1)>0?this.interpolateString(n.slice(1,-1),{strOffset:1,lexedLength:n.length}):this.token("STRING",this.escapeLines(n,0,n.length));break;default:return 0}return(t=/^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(n))&&this.error("octal escape sequences "+n+" are not allowed"),n.length},e.prototype.heredocToken=function(){var e,t,n,i;return(n=u.exec(this.chunk))?(t=n[0],i=t.charAt(0),e=this.sanitizeHeredoc(n[2],{quote:i,indent:null}),'"'===i&&e.indexOf("#{")>=0?this.interpolateString(e,{heredoc:!0,strOffset:3,lexedLength:t.length}):this.token("STRING",this.makeString(e,i,!0),0,t.length),t.length):0},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&this.token("HERECOMMENT",this.sanitizeHeredoc(t,{herecomment:!0,indent:Array(this.indent+1).join(" ")}),0,e.length),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=y.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,i,s,r,a;return"/"!==this.chunk.charAt(0)?0:(n=f.exec(this.chunk))?t=this.heregexToken(n):(i=X(this.tokens),i&&(r=i[0],Z.call(i.spaced?S:A,r)>=0)?0:(n=_.exec(this.chunk))?(a=n,n=a[0],s=a[1],e=a[2],"/*"===s.slice(0,2)&&this.error("regular expressions cannot begin with `*`"),"//"===s&&(s="/(?:)/"),this.token("REGEX",""+s+e,0,n.length),n.length):0)},e.prototype.heregexToken=function(e){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,g,b;if(s=e[0],t=e[1],n=e[2],0>t.indexOf("#{"))return o=t.replace(m,"").replace(/\//g,"\\/"),o.match(/^\*/)&&this.error("regular expressions cannot begin with `*`"),this.token("REGEX","/"+(o||"(?:)")+"/"+n,0,s.length),s.length;for(this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),l=[],f=this.interpolateString(t,{regex:!0}),p=0,d=f.length;d>p;p++){if(h=f[p],c=h[0],u=h[1],"TOKENS"===c)l.push.apply(l,u);else if("NEOSTRING"===c){if(!(u=u.replace(m,"")))continue;u=u.replace(/\\/g,"\\\\"),h[0]="STRING",h[1]=this.makeString(u,'"',!0),l.push(h)}else this.error("Unexpected "+c);a=X(this.tokens),r=["+","+"],r[2]=a[2],l.push(r)}return l.pop(),"STRING"!==(null!=(g=l[0])?g[0]:void 0)&&(this.token("STRING",'""',0,0),this.token("+","+",0,0)),(b=this.tokens).push.apply(b,l),n&&(i=s.lastIndexOf(n),this.token(",",",",i,0),this.token("STRING",'"'+n+'"',i,n.length)),this.token(")",")",s.length-1,0),s.length},e.prototype.lineToken=function(){var e,t,n,i,s;if(!(n=D.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,s=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),s-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(s>this.indent){if(i)return this.indebt=s-this.indent,this.suppressNewlines(),t.length;e=s-this.indent+this.outdebt,this.token("INDENT",e,0,t.length),this.indents.push(e),this.ends.push("OUTDENT"),this.outdebt=this.indebt=0}else this.indebt=0,this.outdentToken(this.indent-s,i,t.length);return this.indent=s,t.length},e.prototype.outdentToken=function(e,t,n){for(var i,s;e>0;)s=this.indents.length-1,void 0===this.indents[s]?e=0:this.indents[s]===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.indents[s]=0)&&this.error('reserved word "'+this.value()+"\" can't be assigned"),"||"===(o=t[1])||"&&"===o))return t[0]="COMPOUND_ASSIGN",t[1]+="=",r.length;if(";"===r)this.seenFor=!1,n="TERMINATOR";else if(Z.call(N,r)>=0)n="MATH";else if(Z.call(h,r)>=0)n="COMPARE";else if(Z.call(l,r)>=0)n="COMPOUND_ASSIGN";else if(Z.call(U,r)>=0)n="UNARY";else if(Z.call(j,r)>=0)n="SHIFT";else if(Z.call(L,r)>=0||"?"===r&&(null!=t?t.spaced:void 0))n="LOGIC";else if(t&&!t.spaced)if("("===r&&(c=t[0],Z.call(i,c)>=0))"?"===t[0]&&(t[0]="FUNC_EXIST"),n="CALL_START";else if("["===r&&(u=t[0],Z.call(b,u)>=0))switch(n="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(r){case"(":case"{":case"[":this.ends.push(k[r]);break;case")":case"}":case"]":this.pair(r)}return this.token(n,r),r.length},e.prototype.sanitizeHeredoc=function(e,t){var n,i,s,r,a;if(s=t.indent,i=t.herecomment){if(p.test(e)&&this.error('block comment cannot contain "*/", starting'),0>e.indexOf("\n"))return e}else for(;r=d.exec(e);)n=r[1],(null===s||(a=n.length)>0&&s.length>a)&&(s=n);return s&&(e=e.replace(RegExp("\\n"+s,"g"),"\n")),this.literate&&(e=e.replace(/\n# \n/g,"\n\n")),i||(e=e.replace(/^\n/,"")),e},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.balancedString=function(e,t){var n,i,s,r,a,o,c,h;for(n=0,o=[t],i=c=1,h=e.length;h>=1?h>c:c>h;i=h>=1?++c:--c)if(n)--n;else{switch(s=e.charAt(i)){case"\\":++n;continue;case t:if(o.pop(),!o.length)return e.slice(0,+i+1||9e9);t=o[o.length-1];continue}"}"!==t||'"'!==s&&"'"!==s?"}"===t&&"/"===s&&(r=f.exec(e.slice(i))||_.exec(e.slice(i)))?n+=r[0].length-1:"}"===t&&"{"===s?o.push(t="}"):'"'===t&&"#"===a&&"{"===s&&o.push(t="}"):o.push(t=s),a=s}return this.error("missing "+o.pop()+", starting")},e.prototype.interpolateString=function(t,n){var i,s,r,a,o,c,h,l,u,p,d,f,m,g,b,k,y,v,w,T,C,F,L,E,N,x,D;for(null==n&&(n={}),r=n.heredoc,y=n.regex,m=n.offsetInChunk,v=n.strOffset,u=n.lexedLength,m=m||0,v=v||0,u=u||t.length,r&&t.length>0&&"\n"===t[0]&&(t=t.slice(1),v++),C=[],g=0,a=-1;l=t.charAt(a+=1);)"\\"!==l?"#"===l&&"{"===t.charAt(a+1)&&(s=this.balancedString(t.slice(a+1),"}"))&&(a>g&&C.push(this.makeToken("NEOSTRING",t.slice(g,a),v+g)),o=s.slice(1,-1),o.length&&(N=this.getLineAndColumnFromChunk(v+a+1),p=N[0],i=N[1],f=(new e).tokenize(o,{line:p,column:i,rewrite:!1}),k=f.pop(),"TERMINATOR"===(null!=(x=f[0])?x[0]:void 0)&&(k=f.shift()),(h=f.length)&&(h>1&&(f.unshift(this.makeToken("(","(",v+a+1,0)),f.push(this.makeToken(")",")",v+a+1+o.length,0))),C.push(["TOKENS",f]))),a+=s.length,g=a+1):a+=1;if(a>g&&t.length>g&&C.push(this.makeToken("NEOSTRING",t.slice(g),v+g)),y)return C;if(!C.length)return this.token("STRING",'""',m,u);for("NEOSTRING"!==C[0][0]&&C.unshift(this.makeToken("NEOSTRING","",m)),(c=C.length>1)&&this.token("(","(",m,0),a=L=0,E=C.length;E>L;a=++L)T=C[a],w=T[0],F=T[1],a&&(a&&(b=this.token("+","+")),d="TOKENS"===w?F[0]:T,b[2]={first_line:d[2].first_line,first_column:d[2].first_column,last_line:d[2].first_line,last_column:d[2].first_column}),"TOKENS"===w?(D=this.tokens).push.apply(D,F):"NEOSTRING"===w?(T[0]="STRING",T[1]=this.makeString(F,'"',r),this.tokens.push(T)):this.error("Unexpected "+w);return c&&this.token(")",")",m+u,0),C},e.prototype.pair=function(e){var t,n;return e!==(n=X(this.ends))?("OUTDENT"!==n&&this.error("unmatched "+e),this.indent-=t=X(this.indents),this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,s;return 0===e?[this.chunkLine,this.chunkColumn]:(s=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),n=G(s,"\n"),t=this.chunkColumn,n>0?(i=s.split("\n"),t=X(i).length):t+=s.length,[this.chunkLine+n,t])},e.prototype.makeToken=function(e,t,n,i){var s,r,a,o,c;return null==n&&(n=0),null==i&&(i=t.length),r={},o=this.getLineAndColumnFromChunk(n),r.first_line=o[0],r.first_column=o[1],s=Math.max(0,i-1),c=this.getLineAndColumnFromChunk(n+(i-1)),r.last_line=c[0],r.last_column=c[1],a=[e,t,r]},e.prototype.token=function(e,t,n,i){var s;return s=this.makeToken(e,t,n,i),this.tokens.push(s),s},e.prototype.tag=function(e,t){var n;return(n=X(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=X(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.unfinished=function(){var e;return C.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"+"===e||"-"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.escapeLines=function(e,t){return e.replace(x,t?"\\n":"")},e.prototype.makeString=function(e,t,n){return e?(e=e.replace(/\\([\s\S])/g,function(e,n){return"\n"===n||n===t?n:e}),e=e.replace(RegExp(""+t,"g"),"\\$&"),t+this.escapeLines(e,n)+t):t+t},e.prototype.error=function(e){throw SyntaxError(""+e+" on line "+(this.chunkLine+1))},e}(),w=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],o=["undefined","then","unless","until","loop","of","by","when"],a={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},r=function(){var e;e=[];for(W in a)e.push(W);return e}(),o=o.concat(r),O=["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"],V=["arguments","eval"],v=w.concat(O).concat(V),e.RESERVED=O.concat(w).concat(o).concat(V),e.STRICT_PROSCRIBED=V,t=65279,g=/^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/,R=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,u=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,I=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/,q=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/,F=/^([ ]{4}|\t)/,s=/^[-=]>/,D=/^(?:\n[^\n\S]*)+/,B=/^'[^\\']*(?:\\.[^\\']*)*'/,y=/^`[^\\`]*(?:\\.[^\\`]*)*`/,_=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/,f=/^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/,m=/\s+(?:#.*)?/g,x=/\n/g,d=/\n+([^\n\S]*)/g,p=/\*\//,C=/^\s*(?:,|\??\.(?![.\d])|::)/,P=/\s+$/,l=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],U=["!","~","NEW","TYPEOF","DELETE","DO"],L=["&&","||","&","|","^"],j=["<<",">>",">>>"],h=["==","!=","<",">","<=",">="],N=["*","/","%"],$=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],S=["NUMBER","REGEX","BOOL","NULL","UNDEFINED","++","--","]"],A=S.concat(")","}","THIS","IDENTIFIER","STRING"),i=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],b=i.concat("NUMBER","BOOL","NULL","UNDEFINED"),T=["INDENT","OUTDENT","TERMINATOR"]}).call(this)},require["./parser"]=new function(){var e=this,t=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Block:5,TERMINATOR:6,Line:7,Expression:8,Statement:9,Return:10,Comment:11,STATEMENT:12,Value:13,Invocation:14,Code:15,Operation:16,Assign:17,If:18,Try:19,While:20,For:21,Switch:22,Class:23,Throw: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,ForStart:111,ForSource:112,ForVariables:113,OWN:114,ForValue:115,FORIN:116,FOROF:117,BY:118,SWITCH:119,Whens:120,ELSE:121,When:122,LEADING_WHEN:123,IfBlock:124,IF:125,POST_IF:126,UNARY:127,"-":128,"+":129,"--":130,"++":131,"?":132,MATH:133,SHIFT:134,COMPARE:135,LOGIC:136,RELATION:137,COMPOUND_ASSIGN:138,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"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",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,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],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,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],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,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],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]],performAction:function(e,t,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return this.$=i.addLocationDataFn(a[o],a[o])(new i.Block);case 2:return this.$=r[o];case 3:return this.$=r[o-1];case 4:this.$=i.addLocationDataFn(a[o],a[o])(i.Block.wrap([r[o]]));break;case 5:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-2].push(r[o]));break;case 6:this.$=r[o-1];break;case 7:this.$=r[o];break;case 8:this.$=r[o];break;case 9:this.$=r[o];break;case 10:this.$=r[o];break;case 11:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 12:this.$=r[o];break;case 13:this.$=r[o];break;case 14:this.$=r[o];break;case 15:this.$=r[o];break;case 16:this.$=r[o];break;case 17:this.$=r[o];break;case 18:this.$=r[o];break;case 19:this.$=r[o];break;case 20:this.$=r[o];break;case 21:this.$=r[o];break;case 22:this.$=r[o];break;case 23:this.$=r[o];break;case 24:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Block);break;case 25:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-1]);break;case 26:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 27:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 28:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 29:this.$=r[o];break;case 30:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 31:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 32:this.$=i.addLocationDataFn(a[o],a[o])(new i.Literal(r[o]));break;case 33:this.$=i.addLocationDataFn(a[o],a[o])(new i.Undefined);break;case 34:this.$=i.addLocationDataFn(a[o],a[o])(new i.Null);break;case 35:this.$=i.addLocationDataFn(a[o],a[o])(new i.Bool(r[o]));break;case 36:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Assign(r[o-2],r[o]));break;case 37:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Assign(r[o-3],r[o]));break;case 38:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Assign(r[o-4],r[o-1]));break;case 39:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 40:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Assign(i.addLocationDataFn(a[o-2])(new i.Value(r[o-2])),r[o],"object"));break;case 41:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Assign(i.addLocationDataFn(a[o-4])(new i.Value(r[o-4])),r[o-1],"object"));break;case 42:this.$=r[o];break;case 43:this.$=r[o];break;case 44:this.$=r[o];break;case 45:this.$=r[o];break;case 46:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Return(r[o]));break;case 47:this.$=i.addLocationDataFn(a[o],a[o])(new i.Return);break;case 48:this.$=i.addLocationDataFn(a[o],a[o])(new i.Comment(r[o]));break;case 49:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Code(r[o-3],r[o],r[o-1]));break;case 50:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Code([],r[o],r[o-1]));break;case 51:this.$=i.addLocationDataFn(a[o],a[o])("func");break;case 52:this.$=i.addLocationDataFn(a[o],a[o])("boundfunc");break;case 53:this.$=r[o];break;case 54:this.$=r[o];break;case 55:this.$=i.addLocationDataFn(a[o],a[o])([]);break;case 56:this.$=i.addLocationDataFn(a[o],a[o])([r[o]]);break;case 57:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-2].concat(r[o]));break;case 58:this.$=i.addLocationDataFn(a[o-3],a[o])(r[o-3].concat(r[o]));break;case 59:this.$=i.addLocationDataFn(a[o-5],a[o])(r[o-5].concat(r[o-2]));break;case 60:this.$=i.addLocationDataFn(a[o],a[o])(new i.Param(r[o]));break;case 61:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Param(r[o-1],null,!0));break;case 62:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Param(r[o-2],r[o]));break;case 63:this.$=r[o];break;case 64:this.$=r[o];break;case 65:this.$=r[o];break;case 66:this.$=r[o];break;case 67:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Splat(r[o-1]));break;case 68:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 69:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o-1].add(r[o]));break;case 70:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Value(r[o-1],[].concat(r[o]))); -break;case 71:this.$=r[o];break;case 72:this.$=r[o];break;case 73:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 74:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 75:this.$=r[o];break;case 76:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 77:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 78:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 79:this.$=r[o];break;case 80:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Access(r[o]));break;case 81:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Access(r[o],"soak"));break;case 82:this.$=i.addLocationDataFn(a[o-1],a[o])([i.addLocationDataFn(a[o-1])(new i.Access(new i.Literal("prototype"))),i.addLocationDataFn(a[o])(new i.Access(r[o]))]);break;case 83:this.$=i.addLocationDataFn(a[o-1],a[o])([i.addLocationDataFn(a[o-1])(new i.Access(new i.Literal("prototype"),"soak")),i.addLocationDataFn(a[o])(new i.Access(r[o]))]);break;case 84:this.$=i.addLocationDataFn(a[o],a[o])(new i.Access(new i.Literal("prototype")));break;case 85:this.$=r[o];break;case 86:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-1]);break;case 87:this.$=i.addLocationDataFn(a[o-1],a[o])(i.extend(r[o],{soak:!0}));break;case 88:this.$=i.addLocationDataFn(a[o],a[o])(new i.Index(r[o]));break;case 89:this.$=i.addLocationDataFn(a[o],a[o])(new i.Slice(r[o]));break;case 90:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Obj(r[o-2],r[o-3].generated));break;case 91:this.$=i.addLocationDataFn(a[o],a[o])([]);break;case 92:this.$=i.addLocationDataFn(a[o],a[o])([r[o]]);break;case 93:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-2].concat(r[o]));break;case 94:this.$=i.addLocationDataFn(a[o-3],a[o])(r[o-3].concat(r[o]));break;case 95:this.$=i.addLocationDataFn(a[o-5],a[o])(r[o-5].concat(r[o-2]));break;case 96:this.$=i.addLocationDataFn(a[o],a[o])(new i.Class);break;case 97:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Class(null,null,r[o]));break;case 98:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Class(null,r[o]));break;case 99:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Class(null,r[o-1],r[o]));break;case 100:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Class(r[o]));break;case 101:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Class(r[o-1],null,r[o]));break;case 102:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Class(r[o-2],r[o]));break;case 103:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Class(r[o-3],r[o-1],r[o]));break;case 104:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Call(r[o-2],r[o],r[o-1]));break;case 105:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Call(r[o-2],r[o],r[o-1]));break;case 106:this.$=i.addLocationDataFn(a[o],a[o])(new i.Call("super",[new i.Splat(new i.Literal("arguments"))]));break;case 107:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Call("super",r[o]));break;case 108:this.$=i.addLocationDataFn(a[o],a[o])(!1);break;case 109:this.$=i.addLocationDataFn(a[o],a[o])(!0);break;case 110:this.$=i.addLocationDataFn(a[o-1],a[o])([]);break;case 111:this.$=i.addLocationDataFn(a[o-3],a[o])(r[o-2]);break;case 112:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(new i.Literal("this")));break;case 113:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(new i.Literal("this")));break;case 114:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Value(i.addLocationDataFn(a[o-1])(new i.Literal("this")),[i.addLocationDataFn(a[o])(new i.Access(r[o]))],"this"));break;case 115:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Arr([]));break;case 116:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Arr(r[o-2]));break;case 117:this.$=i.addLocationDataFn(a[o],a[o])("inclusive");break;case 118:this.$=i.addLocationDataFn(a[o],a[o])("exclusive");break;case 119:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Range(r[o-3],r[o-1],r[o-2]));break;case 120:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Range(r[o-2],r[o],r[o-1]));break;case 121:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Range(r[o-1],null,r[o]));break;case 122:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Range(null,r[o],r[o-1]));break;case 123:this.$=i.addLocationDataFn(a[o],a[o])(new i.Range(null,null,r[o]));break;case 124:this.$=i.addLocationDataFn(a[o],a[o])([r[o]]);break;case 125:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-2].concat(r[o]));break;case 126:this.$=i.addLocationDataFn(a[o-3],a[o])(r[o-3].concat(r[o]));break;case 127:this.$=i.addLocationDataFn(a[o-3],a[o])(r[o-2]);break;case 128:this.$=i.addLocationDataFn(a[o-5],a[o])(r[o-5].concat(r[o-2]));break;case 129:this.$=r[o];break;case 130:this.$=r[o];break;case 131:this.$=r[o];break;case 132:this.$=i.addLocationDataFn(a[o-2],a[o])([].concat(r[o-2],r[o]));break;case 133:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Try(r[o]));break;case 134:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Try(r[o-1],r[o][0],r[o][1]));break;case 135:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Try(r[o-2],null,null,r[o]));break;case 136:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Try(r[o-3],r[o-2][0],r[o-2][1],r[o]));break;case 137:this.$=i.addLocationDataFn(a[o-2],a[o])([r[o-1],r[o]]);break;case 138:this.$=i.addLocationDataFn(a[o-2],a[o])([i.addLocationDataFn(a[o-1])(new i.Value(r[o-1])),r[o]]);break;case 139:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Throw(r[o]));break;case 140:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Parens(r[o-1]));break;case 141:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Parens(r[o-2]));break;case 142:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.While(r[o]));break;case 143:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.While(r[o-2],{guard:r[o]}));break;case 144:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.While(r[o],{invert:!0}));break;case 145:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.While(r[o-2],{invert:!0,guard:r[o]}));break;case 146:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o-1].addBody(r[o]));break;case 147:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o].addBody(i.addLocationDataFn(a[o-1])(i.Block.wrap([r[o-1]]))));break;case 148:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o].addBody(i.addLocationDataFn(a[o-1])(i.Block.wrap([r[o-1]]))));break;case 149:this.$=i.addLocationDataFn(a[o],a[o])(r[o]);break;case 150:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.While(i.addLocationDataFn(a[o-1])(new i.Literal("true"))).addBody(r[o]));break;case 151:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.While(i.addLocationDataFn(a[o-1])(new i.Literal("true"))).addBody(i.addLocationDataFn(a[o])(i.Block.wrap([r[o]]))));break;case 152:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.For(r[o-1],r[o]));break;case 153:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.For(r[o-1],r[o]));break;case 154:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.For(r[o],r[o-1]));break;case 155:this.$=i.addLocationDataFn(a[o-1],a[o])({source:i.addLocationDataFn(a[o])(new i.Value(r[o]))});break;case 156:this.$=i.addLocationDataFn(a[o-1],a[o])(function(){return r[o].own=r[o-1].own,r[o].name=r[o-1][0],r[o].index=r[o-1][1],r[o]}());break;case 157:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o]);break;case 158:this.$=i.addLocationDataFn(a[o-2],a[o])(function(){return r[o].own=!0,r[o]}());break;case 159:this.$=r[o];break;case 160:this.$=r[o];break;case 161:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 162:this.$=i.addLocationDataFn(a[o],a[o])(new i.Value(r[o]));break;case 163:this.$=i.addLocationDataFn(a[o],a[o])([r[o]]);break;case 164:this.$=i.addLocationDataFn(a[o-2],a[o])([r[o-2],r[o]]);break;case 165:this.$=i.addLocationDataFn(a[o-1],a[o])({source:r[o]});break;case 166:this.$=i.addLocationDataFn(a[o-1],a[o])({source:r[o],object:!0});break;case 167:this.$=i.addLocationDataFn(a[o-3],a[o])({source:r[o-2],guard:r[o]});break;case 168:this.$=i.addLocationDataFn(a[o-3],a[o])({source:r[o-2],guard:r[o],object:!0});break;case 169:this.$=i.addLocationDataFn(a[o-3],a[o])({source:r[o-2],step:r[o]});break;case 170:this.$=i.addLocationDataFn(a[o-5],a[o])({source:r[o-4],guard:r[o-2],step:r[o]});break;case 171:this.$=i.addLocationDataFn(a[o-5],a[o])({source:r[o-4],step:r[o-2],guard:r[o]});break;case 172:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Switch(r[o-3],r[o-1]));break;case 173:this.$=i.addLocationDataFn(a[o-6],a[o])(new i.Switch(r[o-5],r[o-3],r[o-1]));break;case 174:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Switch(null,r[o-1]));break;case 175:this.$=i.addLocationDataFn(a[o-5],a[o])(new i.Switch(null,r[o-3],r[o-1]));break;case 176:this.$=r[o];break;case 177:this.$=i.addLocationDataFn(a[o-1],a[o])(r[o-1].concat(r[o]));break;case 178:this.$=i.addLocationDataFn(a[o-2],a[o])([[r[o-1],r[o]]]);break;case 179:this.$=i.addLocationDataFn(a[o-3],a[o])([[r[o-2],r[o-1]]]);break;case 180:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.If(r[o-1],r[o],{type:r[o-2]}));break;case 181:this.$=i.addLocationDataFn(a[o-4],a[o])(r[o-4].addElse(new i.If(r[o-1],r[o],{type:r[o-2]})));break;case 182:this.$=r[o];break;case 183:this.$=i.addLocationDataFn(a[o-2],a[o])(r[o-2].addElse(r[o]));break;case 184:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.If(r[o],i.addLocationDataFn(a[o-2])(i.Block.wrap([r[o-2]])),{type:r[o-1],statement:!0}));break;case 185:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.If(r[o],i.addLocationDataFn(a[o-2])(i.Block.wrap([r[o-2]])),{type:r[o-1],statement:!0}));break;case 186:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op(r[o-1],r[o]));break;case 187:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("-",r[o]));break;case 188:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("+",r[o]));break;case 189:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("--",r[o]));break;case 190:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("++",r[o]));break;case 191:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("--",r[o-1],null,!0));break;case 192:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Op("++",r[o-1],null,!0));break;case 193:this.$=i.addLocationDataFn(a[o-1],a[o])(new i.Existence(r[o-1]));break;case 194:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op("+",r[o-2],r[o]));break;case 195:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op("-",r[o-2],r[o]));break;case 196:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op(r[o-1],r[o-2],r[o]));break;case 197:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op(r[o-1],r[o-2],r[o]));break;case 198:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op(r[o-1],r[o-2],r[o]));break;case 199:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Op(r[o-1],r[o-2],r[o]));break;case 200:this.$=i.addLocationDataFn(a[o-2],a[o])(function(){return"!"===r[o-1].charAt(0)?new i.Op(r[o-1].slice(1),r[o-2],r[o]).invert():new i.Op(r[o-1],r[o-2],r[o])}());break;case 201:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Assign(r[o-2],r[o],r[o-1]));break;case 202:this.$=i.addLocationDataFn(a[o-4],a[o])(new i.Assign(r[o-4],r[o-1],r[o-3]));break;case 203:this.$=i.addLocationDataFn(a[o-3],a[o])(new i.Assign(r[o-3],r[o],r[o-2]));break;case 204:this.$=i.addLocationDataFn(a[o-2],a[o])(new i.Extends(r[o-2],r[o]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,130],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[2,186],105:[2,186],106:[2,186],109:88,110:[2,186],111:69,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,78],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,189],74:[2,72],78:[2,189],84:[2,72],85:[2,72],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:87,104:[2,139],105:[2,139],106:[2,139],109:88,110:[2,139],111:69,118:[2,139],126:[2,139],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,142],126:[2,142],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:87,104:[1,65],105:[2,151],106:[1,66],109:88,110:[1,68],111:69,118:[2,151],126:[2,151],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:87,104:[2,194],105:[2,194],106:[2,194],109:88,110:[2,194],111:69,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,78],133:[1,81],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,198],136:[2,198],137:[1,85]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:87,104:[1,65],105:[2,184],106:[1,66],109:88,110:[1,68],111:69,118:[2,184],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{27:258,28:[1,73],59:259,76:[1,70]},{120:260,122:219,123:[1,220]},{26:[1,261],121:[1,262],122:263,123:[1,220]},{26:[2,176],121:[2,176],123:[2,176]},{8:265,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:264,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:266,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:267,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,74],26:[1,268]},{8:269,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,271],25:[1,272],91:[1,270]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:273,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:274,54:[1,229]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{8:275,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:277},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:87,104:[2,165],105:[1,278],106:[2,165],109:88,110:[2,165],111:69,118:[1,279],126:[2,165],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,280],106:[2,166],109:88,110:[2,166],111:69,118:[2,166],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,282],25:[1,283],78:[1,281]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:284,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:285,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,286],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:287,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,288],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],86:[1,289]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:290,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:291,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:292,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,293],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:87,104:[2,203],105:[2,203],106:[2,203],109:88,110:[2,203],111:69,118:[2,203],126:[2,203],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:294,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:296,25:[1,5]},{5:297,25:[1,5]},{26:[1,298],121:[1,299],122:263,123:[1,220]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{5:300,25:[1,5]},{26:[2,177],121:[2,177],123:[2,177]},{5:301,25:[1,5],54:[1,302]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:303,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,304]},{91:[1,305],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:306,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:307,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,271],25:[1,272],26:[1,308]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[2,143],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[2,145],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,164],117:[2,164]},{8:309,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:312,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:313,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:314,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:315,54:[1,204]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{5:316,25:[1,5]},{26:[1,317]},{6:[1,318],26:[2,178],121:[2,178],123:[2,178]},{8:319,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:320,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[2,167],106:[2,167],109:88,110:[2,167],111:69,118:[1,321],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[1,322],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[2,168],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:323,54:[1,239]},{26:[1,324],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,325]},{26:[1,326]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],26:[1,327]},{8:328,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,282],25:[1,283],26:[1,330]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[2,170],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}],defaultActions:{60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]},parseError:function(e){throw Error(e) -},parse:function(e){function t(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],s=[null],r=[],a=this.table,o="",c=0,h=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var u=this.lexer.yylloc;r.push(u);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,f,m,g,b,k,y,v,w,T={};;){if(m=i[i.length-1],this.defaultActions[m]?g=this.defaultActions[m]:((null===d||d===void 0)&&(d=t()),g=a[m]&&a[m][d]),g===void 0||!g.length||!g[0]){var C="";if(!l){w=[];for(k in a[m])this.terminals_[k]&&k>2&&w.push("'"+this.terminals_[k]+"'");C=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(C,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:w})}}if(g[0]instanceof Array&&g.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+d);switch(g[0]){case 1:i.push(d),s.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(g[1]),d=null,f?(d=f,f=null):(h=this.lexer.yyleng,o=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(y=this.productions_[g[1]][1],T.$=s[s.length-y],T._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},p&&(T._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),b=this.performAction.call(T,o,h,c,this.yy,g[1],s,r),b!==void 0)return b;y&&(i=i.slice(0,2*-1*y),s=s.slice(0,-1*y),r=r.slice(0,-1*y)),i.push(this.productions_[g[1]][0]),s.push(T.$),r.push(T._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}};return e.prototype=t,t.Parser=e,new e}();require!==void 0&&e!==void 0&&(e.parser=t,e.Parser=t.Parser,e.parse=function(){return t.parse.apply(t,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)},"undefined"!=typeof module&&require.main===module&&e.main(process.argv.slice(1)))},require["./scope"]=new function(){var e=this;(function(){var t,n,i,s;s=require("./helpers"),n=s.extend,i=s.last,e.Scope=t=function(){function e(t,n,i){this.parent=t,this.expressions=n,this.method=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(e.root=this)}return e.root=null,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,s;for(s=this.variables,n=0,i=s.length;i>n;n++)if(t=s[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;this.check(i=this.temporary(e,n));)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,s,r;for(e=[],t=[],r=this.variables,i=0,s=r.length;s>i;i++)n=r[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,s;for(i=this.variables,s=[],t=0,n=i.length;n>t;t++)e=i[t],e.type.assigned&&s.push(""+e.name+" = "+e.type.value);return s},e}()}).call(this)},require["./nodes"]=new function(){var e=this;(function(){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,m,g,b,k,y,v,w,T,C,F,L,E,N,x,D,S,A,R,I,_,$,O,M,j,B,V,P,U,q,H,G,W,X,Y,K,z,J,Z,Q,et,tt,nt,it,st,rt,at,ot,ct,ht,lt,ut,pt,dt,ft,mt={}.hasOwnProperty,gt=function(e,t){function n(){this.constructor=e}for(var i in t)mt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},bt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},kt=[].slice;Error.stackTraceLimit=1/0,V=require("./scope").Scope,dt=require("./lexer"),$=dt.RESERVED,B=dt.STRICT_PROSCRIBED,ft=require("./helpers"),Q=ft.compact,it=ft.flatten,nt=ft.extend,ot=ft.merge,et=ft.del,lt=ft.starts,tt=ft.ends,rt=ft.last,ht=ft.some,Z=ft.addLocationDataFn,at=ft.locationDataToString,e.extend=nt,e.addLocationDataFn=Z,J=function(){return!0},S=function(){return!1},G=function(){return this},D=function(){return this.negated=!this.negated,this},e.CodeFragment=l=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?": "+at(this.locationData):void 0]},e}(),st=function(e){var t;return function(){var n,i,s;for(s=[],n=0,i=e.length;i>n;n++)t=e[n],s.push(t.code);return s}().join("")},e.Base=s=function(){function e(){}return e.prototype.compile=function(e,t){return st(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=nt({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==E&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){if(this.jumps())throw SyntaxError("cannot use a pure statement in an expression.");return e.sharedScope=!0,c.wrap(this).compileNode(e)},e.prototype.cache=function(e,t,n){var s,r;return this.isComplex()?(s=new N(n||e.scope.freeVariable("ref")),r=new i(s,this),t?[r.compileToFragments(e,t),[this.makeCode(s.value)]]:[r,s]):(s=t?this.compileToFragments(e,t):this,[s,s])},e.prototype.cacheToCodeFragments=function(e){return[st(e[0]),st(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new a(new N(""+e+".push"),[t]):new M(t)},e.prototype.contains=function(e){var t;return t=!1,this.traverseChildren(!1,function(n){return e(n)?(t=!0,!1):void 0}),t},e.prototype.containsType=function(e){return this instanceof e||this.contains(function(t){return t instanceof e})},e.prototype.lastNonComment=function(e){var t;for(t=e.length;t--;)if(!(e[t]instanceof u))return e[t];return null},e.prototype.toString=function(e,t){var n,i;return null==e&&(e=""),null==t&&(t=this.constructor.name),n=this.locationData?at(this.locationData):"??",i="\n"+e+n+": "+t,this.soak&&(i+="?"),this.eachChild(function(t){return i+=t.toString(e+H)}),i},e.prototype.eachChild=function(e){var t,n,i,s,r,a,o,c;if(!this.children)return this;for(o=this.children,i=0,r=o.length;r>i;i++)if(t=o[i],this[t])for(c=it([this[t]]),s=0,a=c.length;a>s;s++)if(n=c[s],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){return t(n)===!1?!1:n.traverseChildren(e,t)})},e.prototype.invert=function(){return new R("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=S,e.prototype.jumps=S,e.prototype.isComplex=J,e.prototype.isChainable=S,e.prototype.isAssignable=S,e.prototype.unwrap=G,e.prototype.unfoldSoak=S,e.prototype.assigns=S,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData||(this.locationData={},nt(this.locationData,e)),this.eachChild(function(t){return t.updateLocationDataIfMissing(e)})},e.prototype.makeCode=function(e){return new l(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,s,r,a;for(n=[],s=r=0,a=e.length;a>r;s=++r)i=e[s],s&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=r=function(e){function t(e){this.expressions=Q(it(e||[]))}return gt(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,s;for(s=this.expressions,n=0,i=s.length;i>n;n++)if(t=s[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,s;for(s=this.expressions,n=0,i=s.length;i>n;n++)if(t=s[n],t.jumps(e))return t},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof u)){this.expressions[n]=t.makeReturn(e),t instanceof M&&!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,s,r,a,o,c,h,l;for(this.tab=e.indent,o=e.level===E,i=[],l=this.expressions,r=c=0,h=l.length;h>c;r=++c)a=l[r],a=a.unwrapAll(),a=a.unfoldSoak(e)||a,a instanceof t?i.push(a.compileNode(e)):o?(a.front=!0,s=a.compileToFragments(e),a.isStatement(e)||(s.unshift(this.makeCode(""+this.tab)),s.push(this.makeCode(";"))),i.push(s)):i.push(a.compileToFragments(e,C));return o?this.spaced?[].concat(this.makeCode("\n"),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>=C?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,s,r,a;return e.indent=e.bare?"":H,e.scope=new V(null,this,null),e.level=E,this.spaced=!0,s=[],e.bare||(r=function(){var e,n,s,r;for(s=this.expressions,r=[],i=e=0,n=s.length;n>e&&(t=s[i],t.unwrap()instanceof u);i=++e)r.push(t);return r}.call(this),a=this.expressions.slice(r.length),this.expressions=r,r.length&&(s=this.compileNode(ot(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,s,r,a,o,c,h,l,p,d,f,m;for(s=[],a=[],d=this.expressions,r=l=0,p=d.length;p>l&&(i=d[r],i=i.unwrap(),i instanceof u||i instanceof N);r=++l);return e=ot(e,{level:E}),r&&(o=this.expressions.splice(r,9e9),f=[this.spaced,!1],h=f[0],this.spaced=f[1],m=[this.compileNode(e),h],s=m[0],this.spaced=m[1],this.expressions=o),a=this.compileNode(e),c=e.scope,c.expressions===this&&(n=e.scope.hasDeclarations(),t=c.hasAssignments,(n||t)&&(r&&s.push(this.makeCode("\n")),s.push(this.makeCode(""+this.tab+"var ")),n&&s.push(this.makeCode(c.declaredVariables().join(", "))),t&&(n&&s.push(this.makeCode(",\n"+(this.tab+H))),s.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+H))))),s.push(this.makeCode(";\n")))),s.concat(a)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(s),e.Literal=N=function(e){function t(e){this.value=e}return gt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return m.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=S,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}(s),e.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return gt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=w?"(void 0)":"void 0")]},t}(s),e.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return gt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(s),e.Bool=function(e){function t(e){this.val=e}return gt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(s),e.Return=M=function(e){function t(e){e&&!e.unwrap().isUndefined&&(this.expression=e)}return gt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=J,t.prototype.makeReturn=G,t.prototype.jumps=G,t.prototype.compileToFragments=function(e,n){var i,s;return i=null!=(s=this.expression)?s.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?" ":void 0]))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,L))),t.push(this.makeCode(";")),t},t}(s),e.Value=K=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 gt(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.isArray=function(){return!this.properties.length&&this.base instanceof n},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.base instanceof N&&j.test(this.base.value)},t.prototype.isString=function(){return this.base instanceof N&&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 a)return!1;return!0},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 A&&(!e||this.base.generated)},t.prototype.isSplice=function(){return rt(this.properties)instanceof P},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,s,r,a;return r=rt(this.properties),2>this.properties.length&&!this.base.isComplex()&&!(null!=r?r.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(s=new N(e.scope.freeVariable("base")),n=new t(new _(new i(s,n)))),r?(r.isComplex()&&(a=new N(e.scope.freeVariable("name")),r=new v(new i(a,r.index)),a=new v(a)),[n.add(r),new t(s||n.base,[a||r])]):[n,s])},t.prototype.compileNode=function(e){var t,n,i,s,r;for(this.base.front=this.front,i=this.properties,t=this.base.compileToFragments(e,i.length?w:null),(this.base instanceof _||i.length)&&j.test(st(t))&&t.push(this.makeCode(".")),s=0,r=i.length;r>s;s++)n=i[s],t.push.apply(t,n.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){var n,s=this;return null!=(n=this.unfoldedSoak)?n:this.unfoldedSoak=function(){var n,r,a,o,c,h,l,u,d,f;if(a=s.base.unfoldSoak(e))return(d=a.body.properties).push.apply(d,s.properties),a;for(f=s.properties,r=l=0,u=f.length;u>l;r=++l)if(o=f[r],o.soak)return o.soak=!1,n=new t(s.base,s.properties.slice(0,r)),h=new t(s.base,s.properties.slice(r)),n.isComplex()&&(c=new N(e.scope.freeVariable("ref")),n=new _(new i(c,n)),h.base=c),new k(new p(n),h,{soak:!0});return!1}()},t}(s),e.Comment=u=function(e){function t(e){this.comment=e}return gt(t,e),t.prototype.isStatement=J,t.prototype.makeReturn=G,t.prototype.compileNode=function(e,t){var n;return n="/*"+ct(this.comment,this.tab)+("\n"+this.tab+"*/\n"),(t||e.level)===E&&(n=e.indent+n),[this.makeCode(n)]},t}(s),e.Call=a=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}return gt(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;if(i=e.scope.namedMethod(),null!=i?i.klass:void 0)return n=[new t(new N("__super__"))],i["static"]&&n.push(new t(new N("constructor"))),n.push(new t(new N(i.name))),new K(new N(i.klass),n).compile(e);if(null!=i?i.ctor:void 0)return""+i.name+".__super__.constructor";throw SyntaxError("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,s,r,a,o,c,h,l;if(this.soak){if(this.variable){if(i=ut(e,this,"variable"))return i;h=new K(this.variable).cacheReference(e),s=h[0],a=h[1]}else s=new N(this.superReference(e)),a=new K(s);return a=new n(a,this.args),a.isNew=this.isNew,s=new N("typeof "+s.compile(e)+' === "function"'),new k(s,new K(a),{soak:!0})}for(t=this,r=[];;)if(t.variable instanceof n)r.push(t),t=t.variable;else{if(!(t.variable instanceof K))break;if(r.push(t),!((t=t.variable.base)instanceof n))break}for(l=r.reverse(),o=0,c=l.length;c>o;o++)t=l[o],i&&(t.variable instanceof n?t.variable=i:t.variable.base=i),i=ut(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,s,r,a,o,c,h,l;if(null!=(h=this.variable)&&(h.front=this.front),s=U.compileSplattedArray(e,this.args,!0),s.length)return this.compileSplat(e,s);for(i=[],l=this.args,n=o=0,c=l.length;c>o;n=++o)t=l[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,C));return r=[],this.isSuper?(a=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(a+=", "),r.push(this.makeCode(a))):(this.isNew&&r.push(this.makeCode("new ")),r.push.apply(r,this.variable.compileToFragments(e,w)),r.push(this.makeCode("("))),r.push.apply(r,i),r.push(this.makeCode(")")),r},n.prototype.compileSplat=function(e,t){var n,i,s,r,a,o;return this.isSuper?[].concat(this.makeCode(""+this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(r=this.tab+H,[].concat(this.makeCode("(function(func, args, ctor) {\n"+r+"ctor.prototype = func.prototype;\n"+r+"var child = new ctor, result = func.apply(child, args);\n"+r+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,C),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new K(this.variable),(a=i.properties.pop())&&i.isComplex()?(o=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+o+" = "),i.compileToFragments(e,C),this.makeCode(")"),a.compileToFragments(e))):(s=i.compileToFragments(e,w),j.test(st(s))&&(s=this.wrapInBraces(s)),a?(o=st(s),s.push.apply(s,a.compileToFragments(e))):o="null",n=n.concat(s)),n=n.concat(this.makeCode(".apply("+o+", "),t,this.makeCode(")")))},n}(s),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return gt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new a(new K(new N(pt("extends"))),[this.child,this.parent]).compileToFragments(e)},t}(s),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return gt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),m.test(st(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=S,t}(s),e.Index=v=function(e){function t(e){this.index=e}return gt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,L),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(s),e.Range=O=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return gt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,s,r;return e=ot(e,{top:!0}),n=this.cacheToCodeFragments(this.from.cache(e,C)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,C)),this.toC=i[0],this.toVar=i[1],(t=et(e,"step"))&&(s=this.cacheToCodeFragments(t.cache(e,C)),this.step=s[0],this.stepVar=s[1]),r=[this.fromVar.match(j),this.toVar.match(j)],this.fromNum=r[0],this.toNum=r[1],this.stepVar?this.stepNum=this.stepVar.match(j):void 0},t.prototype.compileNode=function(e){var t,n,i,s,r,a,o,c,h,l,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(o=this.fromNum&&this.toNum,r=et(e,"index"),a=et(e,"name"),h=a&&a!==r,p=""+r+" = "+this.fromC,this.toC!==this.toVar&&(p+=", "+this.toC),this.step!==this.stepVar&&(p+=", "+this.step),d=[""+r+" <"+this.equals,""+r+" >"+this.equals],c=d[0],s=d[1],n=this.stepNum?+this.stepNum>0?""+c+" "+this.toVar:""+s+" "+this.toVar:o?(f=[+this.fromNum,+this.toNum],i=f[0],u=f[1],f,u>=i?""+c+" "+u:""+s+" "+u):(t=this.stepVar?""+this.stepVar+" > 0":""+this.fromVar+" <= "+this.toVar,""+t+" ? "+c+" "+this.toVar+" : "+s+" "+this.toVar),l=this.stepVar?""+r+" += "+this.stepVar:o?h?u>=i?"++"+r:"--"+r:u>=i?""+r+"++":""+r+"--":h?""+t+" ? ++"+r+" : --"+r:""+t+" ? "+r+"++ : "+r+"--",h&&(p=""+a+" = "+p),h&&(l=""+a+" = "+l),[this.makeCode(""+p+"; "+n+"; "+l)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,s,r,a,o,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(", ")+"]")]):(a=this.tab+H,r=e.scope.freeVariable("i"),l=e.scope.freeVariable("results"),c="\n"+a+l+" = [];",this.fromNum&&this.toNum?(e.index=r,n=st(this.compileNode(e))):(u=""+r+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=""+this.fromVar+" <= "+this.toVar,n="var "+u+"; "+i+" ? "+r+" <"+this.equals+" "+this.toVar+" : "+r+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+r+"++ : "+r+"--"),o="{ "+l+".push("+r+"); }\n"+a+"return "+l+";\n"+e.indent,s=function(e){return null!=e?e.contains(function(e){return e instanceof N&&"arguments"===e.value&&!e.asKey}):void 0},(s(this.from)||s(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+a+"for ("+n+")"+o+"}).apply(this"+(null!=t?t:"")+")")])},t}(s),e.Slice=P=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return gt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,s,r,a,o;return o=this.range,r=o.to,i=o.from,s=i&&i.compileToFragments(e,L)||[this.makeCode("0")],r&&(t=r.compileToFragments(e,L),n=st(t),(this.range.exclusive||-1!==+n)&&(a=", "+(this.range.exclusive?n:j.test(n)?""+(+n+1):(t=r.compileToFragments(e,w),"+"+st(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+st(s)+(a||"")+")")]},t}(s),e.Obj=A=function(e){function t(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return gt(t,e),t.prototype.children=["properties"],t.prototype.compileNode=function(e){var t,n,s,r,a,o,c,h,l,p,d,f,m;if(l=this.properties,!l.length)return[this.makeCode(this.front?"({})":"{}")];if(this.generated)for(p=0,f=l.length;f>p;p++)if(c=l[p],c instanceof K)throw Error("cannot have an implicit value in an implicit object");for(s=e.indent+=H,o=this.lastNonComment(this.properties),t=[],n=d=0,m=l.length;m>d;n=++d)h=l[n],a=n===l.length-1?"":h===o||h instanceof u?"\n":",\n",r=h instanceof u?"":s,h instanceof K&&h["this"]&&(h=new i(h.properties[0].name,h,"object")),h instanceof u||(h instanceof i||(h=new i(h,h,"object")),(h.variable.base||h.variable).asKey=!0),r&&t.push(this.makeCode(r)),t.push.apply(t,h.compileToFragments(e,E)),a&&t.push(this.makeCode(a));return t.unshift(this.makeCode("{"+(l.length&&"\n"))),t.push(this.makeCode(""+(l.length&&"\n"+this.tab)+"}")),this.front?this.wrapInBraces(t):t},t.prototype.assigns=function(e){var t,n,i,s;for(s=this.properties,n=0,i=s.length;i>n;n++)if(t=s[n],t.assigns(e))return!0;return!1},t}(s),e.Arr=n=function(e){function t(e){this.objects=e||[]}return gt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,s,r,a,o;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=H,t=U.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,s;for(i=this.objects,s=[],t=0,n=i.length;n>t;t++)r=i[t],s.push(r.compileToFragments(e,C));return s}.call(this),s=a=0,o=n.length;o>a;s=++a)i=n[s],s&&t.push(this.makeCode(", ")),t.push.apply(t,i);return st(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,s;for(s=this.objects,n=0,i=s.length;i>n;n++)if(t=s[n],t.assigns(e))return!0;return!1},t}(s),e.Class=o=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new r,this.boundFuncs=[],this.body.classBody=!0}return gt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n;if(!this.variable)return null;if(e=(n=rt(this.variable.properties))?n instanceof t&&n.name.value:this.variable.base.value,bt.call(B,e)>=0)throw SyntaxError("variable name may not be "+e);return e&&(e=m.test(e)&&e)},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof N&&"this"===t.value?t.value=e:t instanceof h&&(t.klass=e,t.bound)?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,s,a,o,c,l,u,p,d,f;if(this.boundFuncs.length)for(e.scope.assign("_this","this"),d=this.boundFuncs,u=0,p=d.length;p>u;u++)f=d[u],c=f[0],a=f[1],o=new K(new N("this"),[new t(c)]),n=new r([new M(new N(""+this.ctor.name+".prototype."+c.value+".apply(_this, arguments)"))]),l=new h(a.params,n,"boundfunc"),s=new i(o,l),this.ctor.body.unshift(s)},n.prototype.addProperties=function(e,n,s){var r,a,o,c,l;return l=e.base.properties.slice(0),o=function(){var e;for(e=[];r=l.shift();){if(r instanceof i)if(a=r.variable.base,delete r.context,c=r.value,"constructor"===a.value){if(this.ctor)throw Error("cannot define more than one constructor in a class");if(c.bound)throw Error("cannot define a constructor as a bound function");c instanceof h?r=this.ctor=c:(this.externalCtor=s.scope.freeVariable("class"),r=new i(new N(this.externalCtor),c))}else r.variable["this"]?(c["static"]=!0,c.bound&&(c.context=n)):(r.variable=new K(new N(n),[new t(new N("prototype")),new t(a)]),c instanceof h&&c.bound&&(this.boundFuncs.push([a,c]),c.bound=!1));e.push(r)}return e}.call(this),Q(o)},n.prototype.walkBody=function(e,t){var i=this;return this.traverseChildren(!1,function(s){var a,o,c,h,l,u,p;if(a=!0,s instanceof n)return!1;if(s instanceof r){for(p=o=s.expressions,c=l=0,u=p.length;u>l;c=++l)h=p[c],h instanceof K&&h.isObject(!0)&&(a=!1,o[c]=i.addProperties(h,e,t));s.expressions=o=it(o)}return a&&!(s instanceof n)})},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof u||n instanceof K&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new h,this.parent&&this.ctor.body.push(new N(""+e+".__super__.constructor.apply(this, arguments)")),this.externalCtor&&this.ctor.body.push(new N(""+this.externalCtor+".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,s,r,a,o,l;return n=this.determineName(),a=n||"_Class",a.reserved&&(a="_"+a),r=new N(a),this.hoistDirectivePrologue(),this.setContext(a),this.walkBody(a,e),this.ensureConstructor(a),this.body.spaced=!0,this.ctor instanceof h||this.body.expressions.unshift(this.ctor),this.body.expressions.push(r),(l=this.body.expressions).unshift.apply(l,this.directives),this.addBoundFunctions(e),t=c.wrap(this.body),this.parent&&(this.superClass=new N(e.scope.freeVariable("super",!1)),this.body.expressions.unshift(new d(r,this.superClass)),t.args.push(this.parent),o=t.variable.params||t.variable.base.params,o.push(new I(this.superClass))),s=new _(t,!0),this.variable&&(s=new i(this.variable,s)),s.compileToFragments(e)},n}(s),e.Assign=i=function(e){function n(e,t,n,i){var s,r,a;if(this.variable=e,this.value=t,this.context=n,this.param=i&&i.param,this.subpattern=i&&i.subpattern,a=r=this.variable.unwrapAll().value,s=bt.call(B,a)>=0,s&&"object"!==this.context)throw SyntaxError('variable name may not be "'+r+'"')}return gt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===E&&null!=this.context&&bt.call(this.context,"?")>=0},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return ut(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,s,r,a,o,c,l,u,p;if(i=this.variable instanceof K){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(c=this.context)||"&&="===c||"?="===c)return this.compileConditional(e)}if(n=this.variable.compileToFragments(e,C),r=st(n),!this.context){if(!(o=this.variable.unwrapAll()).isAssignable())throw SyntaxError('"'+this.variable.compile(e)+'" cannot be assigned.');("function"==typeof o.hasProperties?o.hasProperties():void 0)||(this.param?e.scope.add(r,"var"):e.scope.find(r))}return this.value instanceof h&&(s=x.exec(r))&&(s[1]&&(this.value.klass=s[1]),this.value.name=null!=(l=null!=(u=null!=(p=s[2])?p:s[3])?u:s[4])?l:s[5]),a=this.value.compileToFragments(e,C),"object"===this.context?n.concat(this.makeCode(": "),a):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),a),C>=e.level?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,s,r,a,o,c,h,l,u,p,d,f,g,b,k,y,w,T,L,x,D,S,A,R,I,O,M,j;if(y=e.level===E,T=this.value,d=this.variable.base.objects,!(f=d.length))return r=T.compileToFragments(e),e.level>=F?this.wrapInBraces(r):r;if(h=this.variable.isObject(),y&&1===f&&!((p=d[0])instanceof U)){if(p instanceof n?(A=p,R=A.variable,c=R.base,p=A.value):c=h?p["this"]?p.properties[0].name:p:new N(0),i=m.test(c.unwrap().value||0),T=new K(T),T.properties.push(new(i?t:v)(c)),I=p.unwrap().value,bt.call($,I)>=0)throw new SyntaxError("assignment to a reserved word: "+p.compile(e)+" = "+T.compile(e));return new n(p,T,null,{param:this.param}).compileToFragments(e,E)}for(L=T.compileToFragments(e,C),x=st(L),s=[],k=!1,(!m.test(x)||this.variable.assigns(x))&&(s.push([this.makeCode(""+(g=e.scope.freeVariable("ref"))+" = ")].concat(kt.call(L))),L=[this.makeCode(g)],x=g),o=D=0,S=d.length;S>D;o=++D){if(p=d[o],c=o,h&&(p instanceof n?(O=p,M=O.variable,c=M.base,p=O.value):p.base instanceof _?(j=new K(p.unwrapAll()).cacheReference(e),p=j[0],c=j[1]):c=p["this"]?p.properties[0].name:p),!k&&p instanceof U)u=p.name.unwrap().value,p=p.unwrap(),w=""+f+" <= "+x+".length ? "+pt("slice")+".call("+x+", "+o,(b=f-o-1)?(l=e.scope.freeVariable("i"),w+=", "+l+" = "+x+".length - "+b+") : ("+l+" = "+o+", [])"):w+=") : []",w=new N(w),k=""+l+"++"; -else{if(u=p.unwrap().value,p instanceof U)throw p=p.name.compileToFragments(e),new SyntaxError("multiple splats are disallowed in an assignment: "+p+"...");"number"==typeof c?(c=new N(k||c),i=!1):i=h&&m.test(c.unwrap().value||0),w=new K(new N(x),[new(i?t:v)(c)])}if(null!=u&&bt.call($,u)>=0)throw new SyntaxError("assignment to a reserved word: "+p.compile(e)+" = "+w.compile(e));s.push(new n(p,w,null,{param:this.param,subpattern:!0}).compileToFragments(e,C))}return y||this.subpattern||s.push(L),a=this.joinFragmentArrays(s,", "),C>e.level?a:this.wrapInBraces(a)},n.prototype.compileConditional=function(e){var t,i,s;if(s=this.variable.cacheReference(e),t=s[0],i=s[1],!t.properties.length&&t.base instanceof N&&"this"!==t.base.value&&!e.scope.check(t.base.value))throw Error('the variable "'+t.base.value+"\" can't be assigned with "+this.context+" because it has not been defined.");return bt.call(this.context,"?")>=0&&(e.isExistentialEquals=!0),new R(this.context.slice(0,-1),t,new n(i,this.value,"=")).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,s,r,a,o,c,h,l,u,p;return l=this.variable.properties.pop().range,i=l.from,o=l.to,n=l.exclusive,a=this.variable.compile(e),i?(u=this.cacheToCodeFragments(i.cache(e,F)),s=u[0],r=u[1]):s=r="0",o?(null!=i?i.isSimpleNumber():void 0)&&o.isSimpleNumber()?(o=+o.compile(e)-+r,n||(o+=1)):(o=o.compile(e,w)+" - "+r,n||(o+=" + 1")):o="9e9",p=this.value.cache(e,C),c=p[0],h=p[1],t=[].concat(this.makeCode("[].splice.apply("+a+", ["+s+", "+o+"].concat("),c,this.makeCode(")), "),h),e.level>E?this.wrapInBraces(t):t},n}(s),e.Code=h=function(e){function t(e,t,n){this.params=e||[],this.body=t||new r,this.bound="boundfunc"===n,this.bound&&(this.context="_this")}return gt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=S,t.prototype.compileNode=function(e){var t,s,r,a,o,c,h,l,u,p,d,f,m,g,b,y,v,T,C,F,L,E,x,D,S,A,I,_,$,O,M,j,B,P,U,q;for(e.scope=new V(e.scope,this.body,this),e.scope.shared=et(e,"sharedScope"),e.indent+=H,delete e.bare,delete e.isExistentialEquals,p=[],r=[],O=this.paramNames(),y=0,F=O.length;F>y;y++)h=O[y],e.scope.check(h)||e.scope.parameter(h);for(M=this.params,v=0,L=M.length;L>v;v++)if(u=M[v],u.splat){for(j=this.params,T=0,E=j.length;E>T;T++)l=j[T].name,l["this"]&&(l=l.properties[0].name),l.value&&e.scope.add(l.value,"var",!0);f=new i(new K(new n(function(){var t,n,i,s;for(i=this.params,s=[],t=0,n=i.length;n>t;t++)l=i[t],s.push(l.asReference(e));return s}.call(this))),new K(new N("arguments")));break}for(B=this.params,C=0,x=B.length;x>C;C++)u=B[C],u.isComplex()?(g=d=u.asReference(e),u.value&&(g=new R("?",d,u.value)),r.push(new i(new K(u.name),g,"=",{param:!0}))):(d=u,u.value&&(c=new N(d.name.value+" == null"),g=new i(new K(u.name),u.value,"="),r.push(new k(c,g)))),f||p.push(d);for(b=this.body.isEmpty(),f&&r.unshift(f),r.length&&(P=this.body.expressions).unshift.apply(P,r),a=I=0,D=p.length;D>I;a=++I)l=p[a],p[a]=l.compileToFragments(e),e.scope.parameter(st(p[a]));for(m=[],U=this.paramNames(),_=0,S=U.length;S>_;_++){if(h=U[_],bt.call(m,h)>=0)throw SyntaxError("multiple parameters named '"+h+"'");m.push(h)}for(b||this.noReturn||this.body.makeReturn(),this.bound&&((null!=(q=e.scope.parent.method)?q.bound:void 0)?this.bound=this.context=e.scope.parent.method.context:this["static"]||e.scope.parent.assign("_this","this")),o=e.indent,s="function",this.ctor&&(s+=" "+this.name),s+="(",t=[this.makeCode(s)],a=$=0,A=p.length;A>$;a=++$)l=p[a],a&&t.push(this.makeCode(", ")),t.push.apply(t,l);return t.push(this.makeCode(") {")),this.body.isEmpty()||(t=t.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),t.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(kt.call(t)):this.front||e.level>=w?this.wrapInBraces(t):t},t.prototype.paramNames=function(){var e,t,n,i,s;for(e=[],s=this.params,n=0,i=s.length;i>n;n++)t=s[n],e.push.apply(e,t.names());return e},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(s),e.Param=I=function(e){function t(e,t,n){var i;if(this.name=e,this.value=t,this.splat=n,i=e=this.name.unwrapAll().value,bt.call(B,i)>=0)throw SyntaxError('parameter name "'+e+'" is not allowed')}return gt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,C)},t.prototype.asReference=function(e){var t;return this.reference?this.reference:(t=this.name,t["this"]?(t=t.properties[0].name,t.value.reserved&&(t=new N(e.scope.freeVariable(t.value)))):t.isComplex()&&(t=new N(e.scope.freeVariable("arg"))),t=new K(t),this.splat&&(t=new U(t)),this.reference=t)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.names=function(e){var t,n,s,r,a,o;if(null==e&&(e=this.name),t=function(e){var t;return t=e.properties[0].name.value,t.reserved?[]:[t]},e instanceof N)return[e.value];if(e instanceof K)return t(e);for(n=[],o=e.objects,r=0,a=o.length;a>r;r++)if(s=o[r],s instanceof i)n.push.apply(n,this.names(s.value.unwrap()));else if(s instanceof U)n.push(s.name.unwrap().value);else{if(!(s instanceof K))throw SyntaxError("illegal parameter "+s.compile());s.isArray()||s.isObject()?n.push.apply(n,this.names(s.base)):s["this"]?n.push.apply(n,t(s)):n.push(s.base.value)}return n},t}(s),e.Splat=U=function(e){function t(e){this.name=e.compile?e:new N(e)}return gt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=J,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 s,r,a,o,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,C),i?c:[].concat(u.makeCode(""+pt("slice")+".call("),c,u.makeCode(")"));for(s=n.slice(l),h=p=0,d=s.length;d>p;h=++p)u=s[h],a=u.compileToFragments(e,C),s[h]=u instanceof t?[].concat(u.makeCode(""+pt("slice")+".call("),a,u.makeCode(")")):[].concat(u.makeCode("["),a,u.makeCode("]"));return 0===l?(u=n[0],o=u.joinFragmentArrays(s.slice(1),", "),s[0].concat(u.makeCode(".concat("),o,u.makeCode(")"))):(r=function(){var t,i,s,r;for(s=n.slice(0,l),r=[],t=0,i=s.length;i>t;t++)u=s[t],r.push(u.compileToFragments(e,C));return r}(),r=n[0].joinFragmentArrays(r,", "),o=n[l].joinFragmentArrays(s,", "),[].concat(n[0].makeCode("["),r,n[l].makeCode("].concat("),o,rt(n).makeCode(")")))},t}(s),e.While=z=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 gt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=J,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;if(e=this.body.expressions,!e.length)return!1;for(n=0,i=e.length;i>n;n++)if(t=e[n],t.jumps({loop:!0}))return t;return!1},t.prototype.compileNode=function(e){var t,n,i,s;return e.indent+=H,s="",n=this.body,n.isEmpty()?n="":(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),s=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new k(new _(this.guard).invert(),new N("continue"))):this.guard&&(n=r.wrap([new k(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,E),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(s+this.tab+"while ("),this.condition.compileToFragments(e,L),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(s),e.Op=R=function(e){function t(e,t,i,s){if("in"===e)return new y(t,i);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof a&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof h&&t.bound||t["do"])&&(t=new _(t))}return this.operator=n[e]||e,this.first=t,this.second=i,this.flip=!!s,this}var n,s;return gt(t,e),n={"==":"===","!=":"!==",of:"in"},s={"!==":"===","===":"!=="},t.prototype.children=["first","second"],t.prototype.isSimpleNumber=S,t.prototype.isUnary=function(){return!this.second},t.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e))||this.first.isComplex()},t.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},t.prototype.invert=function(){var e,n,i,r,a;if(this.isChainable()&&this.first.isChainable()){for(e=!0,n=this;n&&n.operator;)e&&(e=n.operator in s),n=n.first;if(!e)return new _(this).invert();for(n=this;n&&n.operator;)n.invert=!n.invert,n.operator=s[n.operator],n=n.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof t&&this.first.invert(),this):this.second?new _(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof t&&("!"===(a=i.operator)||"in"===a||"instanceof"===a)?i:new t("!",this)},t.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&ut(e,this,"first")},t.prototype.generateDo=function(e){var t,n,s,r,o,c,l,u;for(r=[],n=e instanceof i&&(o=e.value.unwrap())instanceof h?o:e,u=n.params||[],c=0,l=u.length;l>c;c++)s=u[c],s.value?(r.push(s.value),delete s.value):r.push(s);return t=new a(e,r),t["do"]=!0,t},t.prototype.compileNode=function(e){var t,n,i,s;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value))throw SyntaxError("delete operand may not be argument or var");if(("--"===(i=this.operator)||"++"===i)&&(s=this.first.unwrapAll().value,bt.call(B,s)>=0))throw SyntaxError("prefix increment/decrement may not have eval or arguments operand");return this.isUnary()?this.compileUnary(e):n?this.compileChain(e):"?"===this.operator?this.compileExistence(e):(t=[].concat(this.first.compileToFragments(e,F),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),F>=e.level?t:this.wrapInBraces(t))},t.prototype.compileChain=function(e){var t,n,i,s;return s=this.first.second.cache(e),this.first.second=s[0],i=s[1],n=this.first.compileToFragments(e,F),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),i.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),this.wrapInBraces(t)},t.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new N(e.scope.freeVariable("ref")),t=new _(new i(n,this.first))):(t=this.first,n=t),new k(new p(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},t.prototype.compileUnary=function(e){var n,i,s;return i=[],n=this.operator,i.push([this.makeCode(n)]),"!"===n&&this.first instanceof p?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=w?new _(this).compileToFragments(e):(s="+"===n||"-"===n,("new"===n||"typeof"===n||"delete"===n||s&&this.first instanceof t&&this.first.operator===n)&&i.push([this.makeCode(" ")]),(s&&this.first instanceof t||"new"===n&&this.first.isStatement(e))&&(this.first=new _(this.first)),i.push(this.first.compileToFragments(e,F)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},t}(s),e.In=y=function(e){function t(e,t){this.object=e,this.array=t}return gt(t,e),t.prototype.children=["object","array"],t.prototype.invert=D,t.prototype.compileNode=function(e){var t,n,i,s,r;if(this.array instanceof K&&this.array.isArray()){for(r=this.array.base.objects,i=0,s=r.length;s>i;i++)if(n=r[i],n instanceof U){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,s,r,a,o,c,h,l,u,p;if(0===this.array.base.objects.length)return[this.makeCode(""+!!this.negated)];for(l=this.object.cache(e,F),a=l[0],r=l[1],u=this.negated?[" !== "," && "]:[" === "," || "],t=u[0],n=u[1],o=[],p=this.array.base.objects,i=c=0,h=p.length;h>c;i=++c)s=p[i],i&&o.push(this.makeCode(n)),o=o.concat(i?r:a,this.makeCode(t),s.compileToFragments(e,w));return F>e.level?o:this.wrapInBraces(o)},t.prototype.compileLoopTest=function(e){var t,n,i,s;return s=this.object.cache(e,C),i=s[0],n=s[1],t=[].concat(this.makeCode(pt("indexOf")+".call("),this.array.compileToFragments(e,C),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),st(i)===st(n)?t:(t=i.concat(this.makeCode(", "),t),C>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(s),e.Try=X=function(e){function t(e,t,n,i){this.attempt=e,this.error=t,this.recovery=n,this.ensure=i}return gt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=J,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,s,r;return e.indent+=H,r=this.attempt.compileToFragments(e,E),t=function(){var t,n;if(this.recovery){if(("function"==typeof(t=this.error).isObject?t.isObject():void 0)&&(s=new N("_error"),this.recovery.unshift(new i(this.error,s)),this.error=s),n=this.error.value,bt.call(B,n)>=0)throw SyntaxError('catch variable may not be "'+this.error.value+'"');return e.scope.check(this.error.value)||e.scope.add(this.error.value,"param"),[].concat(this.makeCode(" catch ("),this.error.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,E),this.makeCode("\n"+this.tab+"}"))}return this.ensure||this.recovery?[]:[this.makeCode(" catch (_error) {}")]}.call(this),n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,E),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(""+this.tab+"try {\n"),r,this.makeCode("\n"+this.tab+"}"),t,n)},t}(s),e.Throw=W=function(e){function t(e){this.expression=e}return gt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=J,t.prototype.jumps=S,t.prototype.makeReturn=G,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(s),e.Existence=p=function(e){function t(e){this.expression=e}return gt(t,e),t.prototype.children=["expression"],t.prototype.invert=D,t.prototype.compileNode=function(e){var t,n,i,s;return this.expression.front=this.front,i=this.expression.compile(e,F),m.test(i)&&!e.scope.check(i)?(s=this.negated?["===","||"]:["!==","&&"],t=s[0],n=s[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=""+i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(T>=e.level?i:"("+i+")")]},t}(s),e.Parens=_=function(e){function t(e){this.body=e}return gt(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 K&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,L),t=F>e.level&&(n instanceof R||n instanceof a||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(s),e.For=f=function(e){function t(e,t){var n;if(this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=r.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 K)throw SyntaxError("index cannot be a pattern matching expression");if(this.range=this.source instanceof K&&this.source.base instanceof O&&!this.source.properties.length,this.pattern=this.name instanceof K,this.range&&this.index)throw SyntaxError("indexes do not apply to range loops");if(this.range&&this.pattern)throw SyntaxError("cannot pattern match over range loops");this.returns=!1}return gt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,s,a,o,c,h,l,u,p,d,f,g,b,y,v,w,T,F,L,x,D,S,A,R,I,$,O,B,V,P,U,q,G;return t=r.wrap([this.body]),T=null!=(q=rt(t.expressions))?q.jumps():void 0,T&&T instanceof M&&(this.returns=!1),$=this.range?this.source.base:this.source,I=e.scope,L=this.name&&this.name.compile(e,C),b=this.index&&this.index.compile(e,C),L&&!this.pattern&&I.find(L),b&&I.find(b),this.returns&&(R=I.freeVariable("results")),y=this.object&&b||I.freeVariable("i"),v=this.range&&L||b||y,w=v!==y?""+v+" = ":"",this.step&&!this.range&&(G=this.cacheToCodeFragments(this.step.cache(e,C)),O=G[0],V=G[1],B=V.match(j)),this.pattern&&(L=y),U="",d="",h="",f=this.tab+H,this.range?p=$.compileToFragments(ot(e,{index:y,name:L,step:this.step})):(P=this.source.compile(e,C),!L&&!this.own||m.test(P)||(h+=""+this.tab+(D=I.freeVariable("ref"))+" = "+P+";\n",P=D),L&&!this.pattern&&(x=""+L+" = "+P+"["+v+"]"),this.object||(O!==V&&(h+=""+this.tab+O+";\n"),this.step&&B&&(u=0>+B)||(F=I.freeVariable("len")),o=""+w+y+" = 0, "+F+" = "+P+".length",c=""+w+y+" = "+P+".length - 1",s=""+y+" < "+F,a=""+y+" >= 0",this.step?(B?u&&(s=a,o=c):(s=""+V+" > 0 ? "+s+" : "+a,o="("+V+" > 0 ? ("+o+") : "+c+")"),g=""+y+" += "+V):g=""+(v!==y?"++"+y:""+y+"++"),p=[this.makeCode(""+o+"; "+s+"; "+w+g)])),this.returns&&(S=""+this.tab+R+" = [];\n",A="\n"+this.tab+"return "+R+";",t.makeReturn(R)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new k(new _(this.guard).invert(),new N("continue"))):this.guard&&(t=r.wrap([new k(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new N(""+P+"["+v+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),x&&(U="\n"+f+x+";"),this.object&&(p=[this.makeCode(""+v+" in "+P)],this.own&&(d="\n"+f+"if (!"+pt("hasProp")+".call("+P+", "+v+")) continue;")),n=t.compileToFragments(ot(e,{indent:f}),E),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+"}"+(A||"")))},t.prototype.pluckDirectCall=function(e,t){var n,s,r,o,c,l,u,p,d,f,m,g,b,k,y;for(s=[],f=t.expressions,c=p=0,d=f.length;d>p;c=++p)r=f[c],r=r.unwrapAll(),r instanceof a&&(u=r.variable.unwrapAll(),(u instanceof h||u instanceof K&&(null!=(m=u.base)?m.unwrapAll():void 0)instanceof h&&1===u.properties.length&&("call"===(g=null!=(b=u.properties[0].name)?b.value:void 0)||"apply"===g))&&(o=(null!=(k=u.base)?k.unwrapAll():void 0)||u,l=new N(e.scope.freeVariable("fn")),n=new K(l),u.base&&(y=[n,u],u.base=y[0],n=y[1]),t.expressions[c]=new a(n,r.args),s=s.concat(this.makeCode(this.tab),new i(l,o).compileToFragments(e,E),this.makeCode(";\n"))));return s},t}(z),e.Switch=q=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return gt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=J,t.prototype.jumps=function(e){var t,n,i,s,r,a,o;for(null==e&&(e={block:!0}),r=this.cases,i=0,s=r.length;s>i;i++)if(a=r[i],n=a[0],t=a[1],t.jumps(e))return t;return null!=(o=this.otherwise)?o.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,s,a;for(s=this.cases,n=0,i=s.length;i>n;n++)t=s[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new r([new N("void 0")]))),null!=(a=this.otherwise)&&a.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,m,g;for(c=e.indent+H,h=e.indent=c+H,a=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,L):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,o=l=0,p=f.length;p>l;o=++l){for(m=f[o],s=m[0],t=m[1],g=it([s]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),a=a.concat(this.makeCode(c+"case "),i.compileToFragments(e,L),this.makeCode(":\n"));if((n=t.compileToFragments(e,E)).length>0&&(a=a.concat(n,this.makeCode("\n"))),o===this.cases.length-1&&!this.otherwise)break;r=this.lastNonComment(t.expressions),r instanceof M||r instanceof N&&r.jumps()&&"debugger"!==r.value||a.push(i.makeCode(h+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&a.push.apply(a,[this.makeCode(c+"default:\n")].concat(kt.call(this.otherwise.compileToFragments(e,E)),[this.makeCode("\n")])),a.push(this.makeCode(this.tab+"}")),a},t}(s),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 gt(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},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===E||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 r([new N("void 0")]))),this.body&&(this.body=new r([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new r([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof r?e:new r([e])},t.prototype.compileStatement=function(e){var n,i,s,r,a,o,c;return s=et(e,"chainChild"),(a=et(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+H,r=this.condition.compileToFragments(e,L),i=this.ensureBlock(this.body).compileToFragments(ot(e,{indent:c})),o=[].concat(this.makeCode("if ("),r,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),s||o.unshift(this.makeCode(this.tab)),this.elseBody?(n=o.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,E))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(ot(e,{indent:c}),E),this.makeCode("\n"+this.tab+"}")),n):o)},t.prototype.compileExpression=function(e){var t,n,i,s;return i=this.condition.compileToFragments(e,T),n=this.bodyNode().compileToFragments(e,C),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,C):[this.makeCode("void 0")],s=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=T?this.wrapInBraces(s):s},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(s),c={wrap:function(e,n,i){var s,o,c,l,u;if(e.jumps())return e;if(c=new h([],r.wrap([e])),s=[],(l=e.contains(this.literalArgs))||e.contains(this.literalThis)){if(l&&e.classBody)throw SyntaxError("Class bodies shouldn't reference arguments");u=new N(l?"apply":"call"),s=[new N("this")],l&&s.push(new N("arguments")),c=new K(c,[new t(u)])}return c.noReturn=i,o=new a(c,s),n?r.wrap([o]):o},literalArgs:function(e){return e instanceof N&&"arguments"===e.value&&!e.asKey},literalThis:function(e){return e instanceof N&&"this"===e.value&&!e.asKey||e instanceof h&&e.bound||e instanceof a&&e.isSuper}},ut=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new K(t),i},Y={"extends":function(){return"function(child, parent) { for (var key in parent) { if ("+pt("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; }"},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; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},E=1,L=2,C=3,T=4,F=5,w=6,H=" ",g="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",m=RegExp("^"+g+"$"),j=/^[+-]?\d+$/,x=RegExp("^(?:("+g+")\\.prototype(?:\\.("+g+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|("+g+")$"),b=/^['"]/,pt=function(e){var t;return t="__"+e,V.root.assign(t,Y[e]()),t},ct=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")}}).call(this)},require["./sourcemap"]=new function(){var e=this;(function(){var t,n,i,s,r,a,o,c;n=function(){function e(e){this.generatedLine=e,this.columnMap={},this.columnMappings=[]}return e.prototype.addMapping=function(e,t,n){var i,s;return s=t[0],i=t[1],null==n&&(n={}),this.columnMap[e]&&n.noReplace?void 0:(this.columnMap[e]={generatedLine:this.generatedLine,generatedColumn:e,sourceLine:s,sourceColumn:i},this.columnMappings.push(this.columnMap[e]),this.columnMappings.sort(function(e,t){return e.generatedColumn-t.generatedColumn}))},e.prototype.getSourcePosition=function(e){var t,n,i,s,r,a;for(t=null,i=null,a=this.columnMappings,s=0,r=a.length;r>s&&(n=a[s],!(n.generatedColumn>e));s++)i=n;return i?t=[i.sourceLine,i.sourceColumn]:void 0},e}(),e.SourceMap=function(){function e(){this.generatedLines=[]}return e.prototype.addMapping=function(e,t,i){var s,r,a;return null==i&&(i={}),r=t[0],s=t[1],a=this.generatedLines[r],a||(a=this.generatedLines[r]=new n(r)),a.addMapping(s,e,i)},e.prototype.getSourcePosition=function(e){var t,n,i,s;return i=e[0],n=e[1],t=null,s=this.generatedLines[i],s&&(t=s.getSourcePosition(n)),t},e.prototype.forEachMapping=function(e){var t,n,i,s,r,a,o;for(a=this.generatedLines,o=[],n=s=0,r=a.length;r>s;n=++s)i=a[n],i?o.push(function(){var n,s,r,a;for(r=i.columnMappings,a=[],n=0,s=r.length;s>n;n++)t=r[n],a.push(e(t));return a}()):o.push(void 0);return o},e}(),e.generateV3SourceMap=function(t,n,i){var s,r,a,o,c,h,l;return null==n&&(n=null),null==i&&(i=null),l=0,r=0,o=0,a=0,h=!1,c="",t.forEachMapping(function(t){for(;t.generatedLine>l;)r=0,h=!1,c+=";",l++;return h&&(c+=",",h=!1),c+=e.vlqEncodeValue(t.generatedColumn-r),r=t.generatedColumn,c+=e.vlqEncodeValue(0),c+=e.vlqEncodeValue(t.sourceLine-o),o=t.sourceLine,c+=e.vlqEncodeValue(t.sourceColumn-a),a=t.sourceColumn,h=!0}),s={version:3,file:i,sourceRoot:"",sources:n?[n]:[],names:[],mappings:c},JSON.stringify(s,null,2)},e.loadV3SourceMap=function(){return todo()},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=t.length-1,c=function(e){if(e>i)throw Error("Cannot encode value "+e+" > "+i);if(0>e)throw Error("Cannot encode value "+e+" < 0");return t[e]},o=function(e){var n;if(n=t.indexOf(e),-1===n)throw Error("Invalid Base 64 character: "+e);return n},r=5,s=1<e?1:0,o=(Math.abs(e)<<1)+i,t="";o||!t;)n=o&a,o>>=r,o&&(n|=s),t+=c(n);return t},e.vlqDecodeValue=function(e,t){var n,i,c,h,l,u,p,d;for(null==t&&(t=0),u=t,c=!1,d=0,i=0;!c;)l=o(e[u]),u+=1,h=l&a,d+=h<>=1,p&&(d=-d),[d,n]}}).call(this)},require["./coffee-script"]=new function(){var e=this;(function(){var t,n,i,s,r,a,o,c,h,l,u,p,d,f,m={}.hasOwnProperty;if(s=require("fs"),h=require("path"),t=require("./lexer").Lexer,c=require("./parser").parser,r=require("./helpers"),u=require("vm"),l=require("./sourcemap"),o=function(e,t){var i,a;return i=s.readFileSync(t,"utf8"),a=65279===i.charCodeAt(0)?i.substring(1):i,e._compile(n(a,{filename:t,literate:r.isLiterate(t)}),t)},require.extensions)for(f=[".coffee",".litcoffee",".md",".coffee.md"],p=0,d=f.length;d>p;p++)i=f[p],require.extensions[i]=o;e.VERSION="1.6.1",e.helpers=r,e.compile=n=function(t,n){var i,s,o,h,u,p,d,f,m,g,b,k,y,v;null==n&&(n={}),g=e.helpers.merge;try{for(n.sourceMap&&(s=r.baseFileName(n.filename),m=r.baseFileName(n.filename,!0)+".js",k=new l.SourceMap),p=c.parse(a.tokenize(t,n)).compileToFragments(n),h=0,n.header&&(h+=1),n.sourceMap&&(h+=1),o=0,f="",y=0,v=p.length;v>y;y++)u=p[y],k&&(u.locationData&&k.addMapping([u.locationData.first_line,u.locationData.first_column],[h,o],{noReplace:!0}),b=r.count(u.code,"\n"),h+=b,o=u.code.length-(b?u.code.lastIndexOf("\n"):0)),f+=u.code}catch(w){throw n.filename&&(w.message="In "+n.filename+", "+w.message),w}return n.header&&(d="Generated by CoffeeScript "+this.VERSION,f="// "+d+"\n"+f),n.sourceMap?(i={js:f},k&&(i.sourceMap=k,i.v3SourceMap=l.generateV3SourceMap(k,s,m)),i):f},e.tokens=function(e,t){return a.tokenize(e,t)},e.nodes=function(e,t){return"string"==typeof e?c.parse(a.tokenize(e,t)):c.parse(e)},e.run=function(e,t){var i;return null==t&&(t={}),i=require.main,i.filename=process.argv[1]=t.filename?s.realpathSync(t.filename):".",i.moduleCache&&(i.moduleCache={}),i.paths=require("module")._nodeModulePaths(h.dirname(s.realpathSync(t.filename))),!r.isCoffee(i.filename)||require.extensions?i._compile(n(e,t),i.filename):i._compile(e,i.filename)},e.eval=function(e,t){var i,s,r,a,o,c,l,p,d,f,g,b,k,y;if(null==t&&(t={}),e=e.trim()){if(s=u.Script){if(null!=t.sandbox){if(t.sandbox instanceof s.createContext().constructor)l=t.sandbox;else{l=s.createContext(),b=t.sandbox;for(a in b)m.call(b,a)&&(p=b[a],l[a]=p)}l.global=l.root=l.GLOBAL=l}else l=global;if(l.__filename=t.filename||"eval",l.__dirname=h.dirname(l.__filename),l===global&&!l.module&&!l.require){for(i=require("module"),l.module=g=new i(t.modulename||"eval"),l.require=y=function(e){return i._load(e,g,!0)},g.filename=l.__filename,k=Object.getOwnPropertyNames(require),d=0,f=k.length;f>d;d++)c=k[d],"paths"!==c&&(y[c]=require[c]);y.paths=g.paths=i._nodeModulePaths(process.cwd()),y.resolve=function(e){return i._resolveFilename(e,g)}}}o={};for(a in t)m.call(t,a)&&(p=t[a],o[a]=p);return o.bare=!0,r=n(e,o),l===global?u.runInThisContext(r):u.runInContext(r,l)}},a=new t,c.lexer={lex:function(){var e,t;return t=this.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}},c.yy=require("./nodes")}).call(this)},require["./browser"]=new function(){var exports=this;(function(){var CoffeeScript,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,CoffeeScript.eval=function(code,options){var _ref;return null==options&&(options={}),null==(_ref=options.bare)&&(options.bare=!0),eval(CoffeeScript.compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,Function(CoffeeScript.compile(e,t))()},"undefined"!=typeof window&&null!==window&&(CoffeeScript.load=function(e,t,n){var i;return null==n&&(n={}),i=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,i.open("GET",e,!0),"overrideMimeType"in i&&i.overrideMimeType("text/plain"),i.onreadystatechange=function(){var s;if(4===i.readyState){if(0!==(s=i.status)&&200!==s)throw Error("Could not load "+e);if(CoffeeScript.run(i.responseText,n),t)return t()}},i.send(null)},runScripts=function(){var e,t,n,i,s,r,a;return a=document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,s;for(s=[],e=0,n=a.length;n>e;e++)r=a[e],i=r.type,__indexOf.call(t,i)>=0&&s.push(r);return s}(),i=0,s=e.length,(n=function(){var s,r,a;return a=e[i++],s=null!=a?a.type:void 0,__indexOf.call(t,s)>=0?(r={literate:"text/literate-coffeescript"===s},a.src?CoffeeScript.load(a.src,n,r):(CoffeeScript.run(a.innerHTML,r),n())):void 0})(),null},window.addEventListener?addEventListener("DOMContentLoaded",runScripts,!1):attachEvent("onload",runScripts))}).call(this)},require["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this); \ No newline at end of file +!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,s,r,o;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=r=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,s;for(s=[],n=0,i=e.length;i>n;n++)t=e[n],t&&s.push(t);return s},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,s,r;for(n=[],s=0,r=e.length;r>s;s++)t=e[s],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=s=function(e,t){return e[e.length-(t||0)-1]},e.some=null!=(o=Array.prototype.some)?o: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,s,r,o;for(r=e.split("\n"),o=[],n=0,s=r.length;s>n;n++)t=r[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,s;return null==t&&(t=!1),null==n&&(n=!1),s=n?/\\|\//:/\//,i=e.split(s),e=i[i.length-1],t?(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 null==t.last_line&&(t.last_line=t.first_line),null==t.last_column&&(t.last_column=t.first_column),n=new SyntaxError(e),n.location=t,n},e.prettyErrorMessage=function(e,t,n,i){var s,o,a,c,h,l,u,p,d,f,m;return e.location?(m=e.location,h=m.first_line,c=m.first_column,u=m.last_line,l=m.last_column,s=n.split("\n")[h],f=c,a=h===u?l+1:s.length,p=r(" ",f)+r("^",a-f),i&&(o=function(e){return""+e+""},s=s.slice(0,f)+o(s.slice(f,a))+s.slice(a),p=o(p)),d=""+t+":"+(h+1)+":"+(c+1)+": error: "+e.message+"\n"+s+"\n"+p):e.stack||""+e}}.call(this),t.exports}(),require["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,s,r,o,a,c,h,l,u,p,d,f,m,b,k,g,y=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},v=[].slice;for(d=function(e,t){var n;return n=[e,t],n.generated=!0,n},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.removeMidExpressionNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.addImplicitIndentation(),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 r,o,a,c,h;for(a=this.tokens,r=0;o=a[e];){if(0===r&&t.call(this,o,e))return n.call(this,o,e);if(!o||0>r)return n.call(this,o,e-1);c=o[0],y.call(s,c)>=0?r+=1:(h=o[0],y.call(i,h)>=0&&(r-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,s;for(s=this.tokens,e=n=0,i=s.length;i>n&&(t=s[e][0],"TERMINATOR"===t);e=++n);return e?this.tokens.splice(0,e):void 0},e.prototype.removeMidExpressionNewlines=function(){return this.scanTokens(function(e,t,i){var s;return"TERMINATOR"===e[0]&&(s=this.tag(t+1),y.call(n,s)>=0)?(i.splice(t,1),0):1})},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,s,r,o;for(t=arguments[0],i=2<=arguments.length?v.call(arguments,1):[],e=0,n=s=0,r=i.length;r>=0?r>s:s>r;n=r>=0?++s:--s){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),y.call(i[n],o)<0))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,r,o,a,c,h,u;for(n=[];e>=0&&(n.length||(a=this.tag(e),y.call(t,a)<0&&(c=this.tag(e),y.call(s,c)<0||this.tokens[e].generated)&&(h=this.tag(e),y.call(l,h)<0)));)r=this.tag(e),y.call(i,r)>=0&&n.push(this.tag(e)),o=this.tag(e),y.call(s,o)>=0&&n.length&&n.pop(),e-=1;return u=this.tag(e),y.call(t,u)>=0},e.prototype.addImplicitBracesAndParens=function(){var e;return e=[],this.scanTokens(function(t,n,h){var u,p,f,m,b,k,g,v,w,T,C,F,L,N,x,E,D,S,R,A,I,_,$,O,j,M;if(A=t[0],T=(n>0?h[n-1]:[])[0],v=(n"!==T&&"->"!==T&&"["!==T&&"("!==T&&","!==T&&"{"!==T&&"TRY"!==T&&"ELSE"!==T&&"="!==T)for(;b();)u();return k()&&e.pop(),e.push([A,n]),f(1)}if(y.call(s,A)>=0)return e.push([A,n]),f(1);if(y.call(i,A)>=0){for(;m();)b()?u():g()?p():e.pop();e.pop()}if((y.call(a,A)>=0&&t.spaced&&!t.stringEnd||"?"===A&&n>0&&!h[n-1].spaced)&&(y.call(r,v)>=0||y.call(c,v)>=0&&!(null!=(I=h[n+1])?I.spaced:void 0)&&!(null!=(_=h[n+1])?_.newLine:void 0)))return"?"===A&&(A=t[0]="FUNC_EXIST"),D(n+1),f(2);if(y.call(a,A)>=0&&this.matchTags(n+1,"INDENT",null,":")&&!this.findTagsBackwards(n,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return D(n+1),e.push(["INDENT",n+2]),f(3);if(":"===A){for(C="@"===this.tag(n-2)?n-2:n-1;"HERECOMMENT"===this.tag(C-2);)C-=2;return R=0===C||($=this.tag(C-1),y.call(l,$)>=0)||h[C-1].newLine,x()&&(O=x(),N=O[0],L=O[1],("{"===N||"INDENT"===N&&"{"===this.tag(L-1))&&(R||","===this.tag(C-1)||"{"===this.tag(C-1)))?f(1):(S(C,!!R),f(2))}if("OUTDENT"===T&&b()&&("."===A||"?."===A||"::"===A||"?::"===A))return u(),f(1);if(g()&&y.call(l,A)>=0&&(x()[2].sameLine=!1),y.call(o,A)>=0)for(;m();)if(j=x(),N=j[0],L=j[1],M=j[2],F=M.sameLine,R=M.startsLine,b()&&","!==T)u();else if(g()&&F&&!R)p();else{if(!g()||"TERMINATOR"!==A||","===T||R&&this.looksObjectish(n+1))break;p()}if(","===A&&!this.looksObjectish(n+1)&&g()&&("TERMINATOR"!==v||!this.looksObjectish(n+2)))for(w="OUTDENT"===v?1:0;g();)p(n+w);return f(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,s,r,o,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(r=null!=(a=n[t+1])?a[2]:void 0)?(s=r.first_line,i=r.first_column):(o=null!=(c=n[t-1])?c[2]:void 0)?(s=o.last_line,i=o.last_column):s=i=0,e[2]={first_line:s,first_column:i,last_line:s,last_column:i},1):1})},e.prototype.addImplicitIndentation=function(){var e,t,n,i,s;return s=n=i=null,t=function(e){var t,n;return";"!==e[1]&&(t=e[0],y.call(u,t)>=0)&&!("ELSE"===e[0]&&"THEN"!==s)&&!!("CATCH"!==(n=e[0])&&"FINALLY"!==n||"->"!==s&&"=>"!==s)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,i)},this.scanTokens(function(r,o,a){var c,h,l,u,d;if(h=r[0],"TERMINATOR"===h&&"THEN"===this.tag(o+1))return a.splice(o,1),0;if("ELSE"===h&&"OUTDENT"!==this.tag(o-1))return a.splice.apply(a,[o,0].concat(v.call(this.indentation()))),2;if("CATCH"===h)for(c=l=1;2>=l;c=++l)if("OUTDENT"===(u=this.tag(o+c))||"TERMINATOR"===u||"FINALLY"===u)return a.splice.apply(a,[o+c,0].concat(v.call(this.indentation()))),2+c;return y.call(p,h)>=0&&"INDENT"!==this.tag(o+1)&&("ELSE"!==h||"IF"!==this.tag(o+1))?(s=h,d=this.indentation(!0),n=d[0],i=d[1],"THEN"===s&&(n.fromThen=!0),a.splice(o+1,0,n),this.detectEnd(o+2,t,e),"THEN"===h&&a.splice(o,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&&y.call(p,n)<0},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,s){return"IF"!==i[0]?1:(n=i,this.detectEnd(s+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return null==e&&(e=!1),t=["INDENT",2],n=["OUTDENT",2],e&&(t.generated=n.generated=!0),e||(t.explicit=n.explicit=!0),[t,n]},e.prototype.generate=d,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=h={},s=[],i=[],b=0,k=t.length;k>b;b++)g=t[b],f=g[0],m=g[1],s.push(h[m]=f),i.push(h[f]=m);n=["CATCH","WHEN","ELSE","FINALLY"].concat(i),a=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],r=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","SUPER","THROW","@","->","=>","[","(","{","--","++"],c=["+","-"],o=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],p=["ELSE","->","=>","TRY","FINALLY","THEN"],u=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],l=["TERMINATOR","INDENT","OUTDENT"]}.call(this),t.exports}(),require["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,s,r,o,a,c,h,l,u,p,d,f,m,b,k,g,y,v,w,T,C,F,L,N,x,E,D,S,R,A,I,_,$,O,j,M,B,V,P,U,q,H,G,W,X,Y,K,z,J,Z,Q,et=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};Z=require("./rewriter"),O=Z.Rewriter,g=Z.INVERSES,Q=require("./helpers"),H=Q.count,z=Q.starts,q=Q.compact,X=Q.last,K=Q.repeat,G=Q.invertLiterate,Y=Q.locationDataToString,J=Q.throwSyntaxError,e.Lexer=L=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,s,r;for(null==t&&(t={}),this.literate=t.literate,this.indent=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),i=0;this.chunk=e.slice(i);)n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.heredocToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),r=this.getLineAndColumnFromChunk(n),this.chunkLine=r[0],this.chunkColumn=r[1],i+=n;return this.closeIndentation(),(s=this.ends.pop())&&this.error("missing "+s),t.rewrite===!1?this.tokens:(new O).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(V,""),U.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=G(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,s,c,h,l,u,p,d,f,m,k;return(h=b.exec(this.chunk))?(c=h[0],i=h[1],e=h[2],s=i.length,l=void 0,"own"===i&&"FOR"===this.tag()?(this.token("OWN",i),i.length):(n=e||(u=X(this.tokens))&&("."===(f=u[0])||"?."===f||"::"===f||"?::"===f||!u.spaced&&"@"===u[0]),p="IDENTIFIER",!n&&(et.call(w,i)>=0||et.call(a,i)>=0)&&(p=i.toUpperCase(),"WHEN"===p&&(m=this.tag(),et.call(T,m)>=0)?p="LEADING_WHEN":"FOR"===p?this.seenFor=!0:"UNLESS"===p?p="IF":et.call(P,p)>=0?p="UNARY":et.call(_,p)>=0&&("INSTANCEOF"!==p&&this.seenFor?(p="FOR"+p,this.seenFor=!1):(p="RELATION","!"===this.value()&&(l=this.tokens.pop(),i="!"+i)))),et.call(v,i)>=0&&(n?(p="IDENTIFIER",i=new String(i),i.reserved=!0):et.call($,i)>=0&&this.error('reserved word "'+i+'"')),n||(et.call(r,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,s),l&&(k=[l[2].first_line,l[2].first_column],d[2].first_line=k[0],d[2].first_column=k[1]),e&&(t=c.lastIndexOf(":"),this.token(":",":",t,e.length)),c.length)):0},e.prototype.numberToken=function(){var e,t,n,i,s;return(n=R.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,(s=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(s[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;switch(this.chunk.charAt(0)){case"'":if(!(e=M.exec(this.chunk)))return 0;n=e[0],this.token("STRING",n.replace(x,"\\\n"),0,n.length);break;case'"':if(!(n=this.balancedString(this.chunk,'"')))return 0;0=0)?0:(n=I.exec(this.chunk))?(o=n,n=o[0],s=o[1],e=o[2],"/*"===s.slice(0,2)&&this.error("regular expressions cannot begin with `*`"),"//"===s&&(s="/(?:)/"),this.token("REGEX",""+s+e,0,n.length),n.length):0)},e.prototype.heregexToken=function(e){var t,n,i,s,r,o,a,c,h,l,u,p,d,f,b,k;if(s=e[0],t=e[1],n=e[2],0>t.indexOf("#{"))return a=t.replace(m,"").replace(/\//g,"\\/"),a.match(/^\*/)&&this.error("regular expressions cannot begin with `*`"),this.token("REGEX","/"+(a||"(?:)")+"/"+n,0,s.length),s.length;for(this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),l=[],f=this.interpolateString(t,{regex:!0}),p=0,d=f.length;d>p;p++){if(h=f[p],c=h[0],u=h[1],"TOKENS"===c)l.push.apply(l,u);else if("NEOSTRING"===c){if(!(u=u.replace(m,"")))continue;u=u.replace(/\\/g,"\\\\"),h[0]="STRING",h[1]=this.makeString(u,'"',!0),l.push(h)}else this.error("Unexpected "+c);o=X(this.tokens),r=["+","+"],r[2]=o[2],l.push(r)}return l.pop(),"STRING"!==(null!=(b=l[0])?b[0]:void 0)&&(this.token("STRING",'""',0,0),this.token("+","+",0,0)),(k=this.tokens).push.apply(k,l),n&&(i=s.lastIndexOf(n),this.token(",",",",i,0),this.token("STRING",'"'+n+'"',i,n.length)),this.token(")",")",s.length-1,0),s.length},e.prototype.lineToken=function(){var e,t,n,i,s;if(!(n=E.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,s=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),s-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(s>this.indent){if(i)return this.indebt=s-this.indent,this.suppressNewlines(),t.length;e=s-this.indent+this.outdebt,this.token("INDENT",e,t.length-s,s),this.indents.push(e),this.ends.push("OUTDENT"),this.outdebt=this.indebt=0}else this.indebt=0,this.outdentToken(this.indent-s,i,t.length);return this.indent=s,t.length},e.prototype.outdentToken=function(e,t,n){for(var i,s;e>0;)s=this.indents.length-1,void 0===this.indents[s]?e=0:this.indents[s]===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.indents[s]=0)&&this.error('reserved word "'+this.value()+"\" can't be assigned"),"||"===(a=t[1])||"&&"===a))return t[0]="COMPOUND_ASSIGN",t[1]+="=",r.length;if(";"===r)this.seenFor=!1,n="TERMINATOR";else if(et.call(N,r)>=0)n="MATH";else if(et.call(h,r)>=0)n="COMPARE";else if(et.call(l,r)>=0)n="COMPOUND_ASSIGN";else if(et.call(P,r)>=0)n="UNARY";else if(et.call(j,r)>=0)n="SHIFT";else if(et.call(F,r)>=0||"?"===r&&(null!=t?t.spaced:void 0))n="LOGIC";else if(t&&!t.spaced)if("("===r&&(c=t[0],et.call(i,c)>=0))"?"===t[0]&&(t[0]="FUNC_EXIST"),n="CALL_START";else if("["===r&&(u=t[0],et.call(k,u)>=0))switch(n="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(r){case"(":case"{":case"[":this.ends.push(g[r]);break;case")":case"}":case"]":this.pair(r)}return this.token(n,r),r.length},e.prototype.sanitizeHeredoc=function(e,t){var n,i,s,r,o;if(s=t.indent,i=t.herecomment){if(p.test(e)&&this.error('block comment cannot contain "*/", starting'),e.indexOf("\n")<0)return e}else for(;r=d.exec(e);)n=r[1],(null===s||0<(o=n.length)&&o=1?h>c:c>h;i=h>=1?++c:--c)if(n)--n;else{switch(s=e.charAt(i)){case"\\":++n;continue;case t:if(a.pop(),!a.length)return e.slice(0,+i+1||9e9);t=a[a.length-1];continue}"}"!==t||'"'!==s&&"'"!==s?"}"===t&&"/"===s&&(r=f.exec(e.slice(i))||I.exec(e.slice(i)))?n+=r[0].length-1:"}"===t&&"{"===s?a.push(t="}"):'"'===t&&"#"===o&&"{"===s&&a.push(t="}"):a.push(t=s),o=s}return this.error("missing "+a.pop()+", starting")},e.prototype.interpolateString=function(t,n){var i,s,r,o,a,c,h,l,u,p,d,f,m,b,k,g,y,v,w,T,C,F,L,N,x,E,D,S;for(null==n&&(n={}),r=n.heredoc,y=n.regex,m=n.offsetInChunk,w=n.strOffset,u=n.lexedLength,m=m||0,w=w||0,u=u||t.length,r&&t.length>0&&"\n"===t[0]&&(t=t.slice(1),w++),F=[],b=0,o=-1;l=t.charAt(o+=1);)"\\"!==l?"#"===l&&"{"===t.charAt(o+1)&&(s=this.balancedString(t.slice(o+1),"}"))&&(o>b&&F.push(this.makeToken("NEOSTRING",t.slice(b,o),w+b)),a=s.slice(1,-1),a.length&&(E=this.getLineAndColumnFromChunk(w+o+1),p=E[0],i=E[1],f=(new e).tokenize(a,{line:p,column:i,rewrite:!1}),g=f.pop(),"TERMINATOR"===(null!=(D=f[0])?D[0]:void 0)&&(g=f.shift()),(h=f.length)&&(h>1&&(f.unshift(this.makeToken("(","(",w+o+1,0)),f.push(this.makeToken(")",")",w+o+1+a.length,0))),F.push(["TOKENS",f]))),o+=s.length,b=o+1):o+=1;if(o>b&&b1)&&this.token("(","(",m,0),o=N=0,x=F.length;x>N;o=++N)C=F[o],T=C[0],L=C[1],o&&(o&&(k=this.token("+","+")),d="TOKENS"===T?L[0]:C,k[2]={first_line:d[2].first_line,first_column:d[2].first_column,last_line:d[2].first_line,last_column:d[2].first_column}),"TOKENS"===T?(S=this.tokens).push.apply(S,L):"NEOSTRING"===T?(C[0]="STRING",C[1]=this.makeString(L,'"',r),this.tokens.push(C)):this.error("Unexpected "+T);return c&&(v=this.makeToken(")",")",m+u,0),v.stringEnd=!0,this.tokens.push(v)),F},e.prototype.pair=function(e){var t,n;return e!==(n=X(this.ends))?("OUTDENT"!==n&&this.error("unmatched "+e),this.indent-=t=X(this.indents),this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,s;return 0===e?[this.chunkLine,this.chunkColumn]:(s=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),n=H(s,"\n"),t=this.chunkColumn,n>0?(i=s.split("\n"),t=X(i).length):t+=s.length,[this.chunkLine+n,t])},e.prototype.makeToken=function(e,t,n,i){var s,r,o,a,c;return null==n&&(n=0),null==i&&(i=t.length),r={},a=this.getLineAndColumnFromChunk(n),r.first_line=a[0],r.first_column=a[1],s=Math.max(0,i-1),c=this.getLineAndColumnFromChunk(n+s),r.last_line=c[0],r.last_column=c[1],o=[e,t,r]},e.prototype.token=function(e,t,n,i){var s;return s=this.makeToken(e,t,n,i),this.tokens.push(s),s},e.prototype.tag=function(e,t){var n;return(n=X(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=X(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.unfinished=function(){var e;return C.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"+"===e||"-"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.escapeLines=function(e,t){return e.replace(x,t?"\\n":"")},e.prototype.makeString=function(e,t,n){return e?(e=e.replace(/\\([\s\S])/g,function(e,n){return"\n"===n||n===t?n:e}),e=e.replace(RegExp(""+t,"g"),"\\$&"),t+this.escapeLines(e,n)+t):t+t},e.prototype.error=function(e){return J(e,{first_line:this.chunkLine,first_column:this.chunkColumn})},e}(),w=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","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"},r=function(){var e;e=[];for(W in o)e.push(W);return e}(),a=a.concat(r),$=["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"],B=["arguments","eval"],v=w.concat($).concat(B),e.RESERVED=$.concat(w).concat(a).concat(B),e.STRICT_PROSCRIBED=B,t=65279,b=/^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/,R=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,u=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,A=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/,U=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/,s=/^[-=]>/,E=/^(?:\n[^\n\S]*)+/,M=/^'[^\\']*(?:\\.[^\\']*)*'/,y=/^`[^\\`]*(?:\\.[^\\`]*)*`/,I=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/,f=/^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/,m=/\s+(?:#.*)?/g,x=/\n/g,d=/\n+([^\n\S]*)/g,p=/\*\//,C=/^\s*(?:,|\??\.(?![.\d])|::)/,V=/\s+$/,l=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],P=["!","~","NEW","TYPEOF","DELETE","DO"],F=["&&","||","&","|","^"],j=["<<",">>",">>>"],h=["==","!=","<",">","<=",">="],N=["*","/","%"],_=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],D=["NUMBER","REGEX","BOOL","NULL","UNDEFINED","++","--"],S=D.concat(")","}","THIS","IDENTIFIER","STRING","]"),i=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],k=i.concat("NUMBER","BOOL","NULL","UNDEFINED"),T=["INDENT","OUTDENT","TERMINATOR"]}.call(this),t.exports}(),require["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Block:5,TERMINATOR:6,Line:7,Expression:8,Statement:9,Return:10,Comment:11,STATEMENT:12,Value:13,Invocation:14,Code:15,Operation:16,Assign:17,If:18,Try:19,While:20,For:21,Switch:22,Class:23,Throw: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,ForStart:111,ForSource:112,ForVariables:113,OWN:114,ForValue:115,FORIN:116,FOROF:117,BY:118,SWITCH:119,Whens:120,ELSE:121,When:122,LEADING_WHEN:123,IfBlock:124,IF:125,POST_IF:126,UNARY:127,"-":128,"+":129,"--":130,"++":131,"?":132,MATH:133,SHIFT:134,COMPARE:135,LOGIC:136,RELATION:137,COMPOUND_ASSIGN:138,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"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",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,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],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,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],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,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],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]],performAction:function(e,t,n,i,s,r,o){var a=r.length-1;switch(s){case 1:return this.$=i.addLocationDataFn(o[a],o[a])(new i.Block);case 2:return this.$=r[a];case 3:return this.$=r[a-1];case 4:this.$=i.addLocationDataFn(o[a],o[a])(i.Block.wrap([r[a]]));break;case 5:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-2].push(r[a]));break;case 6:this.$=r[a-1];break;case 7:this.$=r[a];break;case 8:this.$=r[a];break;case 9:this.$=r[a];break;case 10:this.$=r[a];break;case 11:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 12:this.$=r[a];break;case 13:this.$=r[a];break;case 14:this.$=r[a];break;case 15:this.$=r[a];break;case 16:this.$=r[a];break;case 17:this.$=r[a];break;case 18:this.$=r[a];break;case 19:this.$=r[a];break;case 20:this.$=r[a];break;case 21:this.$=r[a];break;case 22:this.$=r[a];break;case 23:this.$=r[a];break;case 24:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Block);break;case 25:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-1]);break;case 26:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 27:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 28:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 29:this.$=r[a];break;case 30:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 31:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 32:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(r[a]));break;case 33:this.$=i.addLocationDataFn(o[a],o[a])(new i.Undefined);break;case 34:this.$=i.addLocationDataFn(o[a],o[a])(new i.Null);break;case 35:this.$=i.addLocationDataFn(o[a],o[a])(new i.Bool(r[a]));break;case 36:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(r[a-2],r[a]));break;case 37:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(r[a-3],r[a]));break;case 38:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(r[a-4],r[a-1]));break;case 39:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 40:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(r[a-2])),r[a],"object"));break;case 41:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(r[a-4])),r[a-1],"object"));break;case 42:this.$=r[a];break;case 43:this.$=r[a];break;case 44:this.$=r[a];break;case 45:this.$=r[a];break;case 46:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Return(r[a]));break;case 47:this.$=i.addLocationDataFn(o[a],o[a])(new i.Return);break;case 48:this.$=i.addLocationDataFn(o[a],o[a])(new i.Comment(r[a]));break;case 49:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Code(r[a-3],r[a],r[a-1]));break;case 50:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Code([],r[a],r[a-1])); +break;case 51:this.$=i.addLocationDataFn(o[a],o[a])("func");break;case 52:this.$=i.addLocationDataFn(o[a],o[a])("boundfunc");break;case 53:this.$=r[a];break;case 54:this.$=r[a];break;case 55:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 56:this.$=i.addLocationDataFn(o[a],o[a])([r[a]]);break;case 57:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-2].concat(r[a]));break;case 58:this.$=i.addLocationDataFn(o[a-3],o[a])(r[a-3].concat(r[a]));break;case 59:this.$=i.addLocationDataFn(o[a-5],o[a])(r[a-5].concat(r[a-2]));break;case 60:this.$=i.addLocationDataFn(o[a],o[a])(new i.Param(r[a]));break;case 61:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Param(r[a-1],null,!0));break;case 62:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Param(r[a-2],r[a]));break;case 63:this.$=r[a];break;case 64:this.$=r[a];break;case 65:this.$=r[a];break;case 66:this.$=r[a];break;case 67:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Splat(r[a-1]));break;case 68:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 69:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a-1].add(r[a]));break;case 70:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(r[a-1],[].concat(r[a])));break;case 71:this.$=r[a];break;case 72:this.$=r[a];break;case 73:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 74:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 75:this.$=r[a];break;case 76:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 77:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 78:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 79:this.$=r[a];break;case 80:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(r[a]));break;case 81:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(r[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(r[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(r[a]))]);break;case 84:this.$=i.addLocationDataFn(o[a],o[a])(new i.Access(new i.Literal("prototype")));break;case 85:this.$=r[a];break;case 86:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-1]);break;case 87:this.$=i.addLocationDataFn(o[a-1],o[a])(i.extend(r[a],{soak:!0}));break;case 88:this.$=i.addLocationDataFn(o[a],o[a])(new i.Index(r[a]));break;case 89:this.$=i.addLocationDataFn(o[a],o[a])(new i.Slice(r[a]));break;case 90:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Obj(r[a-2],r[a-3].generated));break;case 91:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 92:this.$=i.addLocationDataFn(o[a],o[a])([r[a]]);break;case 93:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-2].concat(r[a]));break;case 94:this.$=i.addLocationDataFn(o[a-3],o[a])(r[a-3].concat(r[a]));break;case 95:this.$=i.addLocationDataFn(o[a-5],o[a])(r[a-5].concat(r[a-2]));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,r[a]));break;case 98:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(null,r[a]));break;case 99:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(null,r[a-1],r[a]));break;case 100:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(r[a]));break;case 101:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(r[a-1],null,r[a]));break;case 102:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(r[a-2],r[a]));break;case 103:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Class(r[a-3],r[a-1],r[a]));break;case 104:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(r[a-2],r[a],r[a-1]));break;case 105:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(r[a-2],r[a],r[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",r[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:this.$=i.addLocationDataFn(o[a-3],o[a])(r[a-2]);break;case 112:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(new i.Literal("this")));break;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(r[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(r[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(r[a-3],r[a-1],r[a-2]));break;case 120:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Range(r[a-2],r[a],r[a-1]));break;case 121:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(r[a-1],null,r[a]));break;case 122:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(null,r[a],r[a-1]));break;case 123:this.$=i.addLocationDataFn(o[a],o[a])(new i.Range(null,null,r[a]));break;case 124:this.$=i.addLocationDataFn(o[a],o[a])([r[a]]);break;case 125:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-2].concat(r[a]));break;case 126:this.$=i.addLocationDataFn(o[a-3],o[a])(r[a-3].concat(r[a]));break;case 127:this.$=i.addLocationDataFn(o[a-3],o[a])(r[a-2]);break;case 128:this.$=i.addLocationDataFn(o[a-5],o[a])(r[a-5].concat(r[a-2]));break;case 129:this.$=r[a];break;case 130:this.$=r[a];break;case 131:this.$=r[a];break;case 132:this.$=i.addLocationDataFn(o[a-2],o[a])([].concat(r[a-2],r[a]));break;case 133:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Try(r[a]));break;case 134:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Try(r[a-1],r[a][0],r[a][1]));break;case 135:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Try(r[a-2],null,null,r[a]));break;case 136:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Try(r[a-3],r[a-2][0],r[a-2][1],r[a]));break;case 137:this.$=i.addLocationDataFn(o[a-2],o[a])([r[a-1],r[a]]);break;case 138:this.$=i.addLocationDataFn(o[a-2],o[a])([i.addLocationDataFn(o[a-1])(new i.Value(r[a-1])),r[a]]);break;case 139:this.$=i.addLocationDataFn(o[a-1],o[a])([null,r[a]]);break;case 140:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Throw(r[a]));break;case 141:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Parens(r[a-1]));break;case 142:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Parens(r[a-2]));break;case 143:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(r[a]));break;case 144:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(r[a-2],{guard:r[a]}));break;case 145:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(r[a],{invert:!0}));break;case 146:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(r[a-2],{invert:!0,guard:r[a]}));break;case 147:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a-1].addBody(r[a]));break;case 148:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([r[a-1]]))));break;case 149:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([r[a-1]]))));break;case 150:this.$=i.addLocationDataFn(o[a],o[a])(r[a]);break;case 151:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(r[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(i.addLocationDataFn(o[a])(i.Block.wrap([r[a]]))));break;case 153:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(r[a-1],r[a]));break;case 154:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(r[a-1],r[a]));break;case 155:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(r[a],r[a-1]));break;case 156:this.$=i.addLocationDataFn(o[a-1],o[a])({source:i.addLocationDataFn(o[a])(new i.Value(r[a]))});break;case 157:this.$=i.addLocationDataFn(o[a-1],o[a])(function(){return r[a].own=r[a-1].own,r[a].name=r[a-1][0],r[a].index=r[a-1][1],r[a]}());break;case 158:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a]);break;case 159:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return r[a].own=!0,r[a]}());break;case 160:this.$=r[a];break;case 161:this.$=r[a];break;case 162:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 163:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(r[a]));break;case 164:this.$=i.addLocationDataFn(o[a],o[a])([r[a]]);break;case 165:this.$=i.addLocationDataFn(o[a-2],o[a])([r[a-2],r[a]]);break;case 166:this.$=i.addLocationDataFn(o[a-1],o[a])({source:r[a]});break;case 167:this.$=i.addLocationDataFn(o[a-1],o[a])({source:r[a],object:!0});break;case 168:this.$=i.addLocationDataFn(o[a-3],o[a])({source:r[a-2],guard:r[a]});break;case 169:this.$=i.addLocationDataFn(o[a-3],o[a])({source:r[a-2],guard:r[a],object:!0});break;case 170:this.$=i.addLocationDataFn(o[a-3],o[a])({source:r[a-2],step:r[a]});break;case 171:this.$=i.addLocationDataFn(o[a-5],o[a])({source:r[a-4],guard:r[a-2],step:r[a]});break;case 172:this.$=i.addLocationDataFn(o[a-5],o[a])({source:r[a-4],step:r[a-2],guard:r[a]});break;case 173:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Switch(r[a-3],r[a-1]));break;case 174:this.$=i.addLocationDataFn(o[a-6],o[a])(new i.Switch(r[a-5],r[a-3],r[a-1]));break;case 175:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Switch(null,r[a-1]));break;case 176:this.$=i.addLocationDataFn(o[a-5],o[a])(new i.Switch(null,r[a-3],r[a-1]));break;case 177:this.$=r[a];break;case 178:this.$=i.addLocationDataFn(o[a-1],o[a])(r[a-1].concat(r[a]));break;case 179:this.$=i.addLocationDataFn(o[a-2],o[a])([[r[a-1],r[a]]]);break;case 180:this.$=i.addLocationDataFn(o[a-3],o[a])([[r[a-2],r[a-1]]]);break;case 181:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(r[a-1],r[a],{type:r[a-2]}));break;case 182:this.$=i.addLocationDataFn(o[a-4],o[a])(r[a-4].addElse(new i.If(r[a-1],r[a],{type:r[a-2]})));break;case 183:this.$=r[a];break;case 184:this.$=i.addLocationDataFn(o[a-2],o[a])(r[a-2].addElse(r[a]));break;case 185:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(r[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([r[a-2]])),{type:r[a-1],statement:!0}));break;case 186:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(r[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([r[a-2]])),{type:r[a-1],statement:!0}));break;case 187:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op(r[a-1],r[a]));break;case 188:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("-",r[a]));break;case 189:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("+",r[a]));break;case 190:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",r[a]));break;case 191:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",r[a]));break;case 192:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",r[a-1],null,!0));break;case 193:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",r[a-1],null,!0));break;case 194:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Existence(r[a-1]));break;case 195:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("+",r[a-2],r[a]));break;case 196:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("-",r[a-2],r[a]));break;case 197:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(r[a-1],r[a-2],r[a]));break;case 198:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(r[a-1],r[a-2],r[a]));break;case 199:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(r[a-1],r[a-2],r[a]));break;case 200:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(r[a-1],r[a-2],r[a]));break;case 201:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return"!"===r[a-1].charAt(0)?new i.Op(r[a-1].slice(1),r[a-2],r[a]).invert():new i.Op(r[a-1],r[a-2],r[a])}());break;case 202:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(r[a-2],r[a],r[a-1]));break;case 203:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(r[a-4],r[a-1],r[a-3]));break;case 204:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(r[a-3],r[a],r[a-2]));break;case 205:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Extends(r[a-2],r[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}],defaultActions:{60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]},parseError:function(e){throw new Error(e) +},parse:function(e){function t(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],s=[null],r=[],o=this.table,a="",c=0,h=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var u=this.lexer.yylloc;r.push(u);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,f,m,b,k,g,y,v,w,T={};;){if(m=i[i.length-1],this.defaultActions[m]?b=this.defaultActions[m]:((null===d||"undefined"==typeof d)&&(d=t()),b=o[m]&&o[m][d]),"undefined"==typeof b||!b.length||!b[0]){var C="";if(!l){w=[];for(g in o[m])this.terminals_[g]&&g>2&&w.push("'"+this.terminals_[g]+"'");C=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(C,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:w})}}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+d);switch(b[0]){case 1:i.push(d),s.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(b[1]),d=null,f?(d=f,f=null):(h=this.lexer.yyleng,a=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(y=this.productions_[b[1]][1],T.$=s[s.length-y],T._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},p&&(T._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),k=this.performAction.call(T,a,h,c,this.yy,b[1],s,r),"undefined"!=typeof k)return k;y&&(i=i.slice(0,2*-1*y),s=s.slice(0,-1*y),r=r.slice(0,-1*y)),i.push(this.productions_[b[1]][0]),s.push(T.$),r.push(T._$),v=o[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}};return e.prototype=t,t.Parser=e,new e}();return"undefined"!=typeof require&&"undefined"!=typeof e&&(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)},"undefined"!=typeof t&&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,s;s=require("./helpers"),n=s.extend,i=s.last,e.Scope=t=function(){function e(t,n,i){this.parent=t,this.expressions=n,this.method=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(e.root=this)}return e.root=null,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,s;for(s=this.variables,n=0,i=s.length;i>n;n++)if(t=s[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;this.check(i=this.temporary(e,n));)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,s,r;for(e=[],t=[],r=this.variables,i=0,s=r.length;s>i;i++)n=r[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,s;for(i=this.variables,s=[],t=0,n=i.length;n>t;t++)e=i[t],e.type.assigned&&s.push(""+e.name+" = "+e.type.value);return s},e}()}.call(this),t.exports}(),require["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,s,r,o,a,c,h,l,u,p,d,f,m,b,k,g,y,v,w,T,C,F,L,N,x,E,D,S,R,A,I,_,$,O,j,M,B,V,P,U,q,H,G,W,X,Y,K,z,J,Z,Q,et,tt,nt,it,st,rt,ot,at,ct,ht,lt,ut,pt,dt,ft,mt,bt,kt,gt={}.hasOwnProperty,yt=function(e,t){function n(){this.constructor=e}for(var i in t)gt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},vt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},wt=[].slice;Error.stackTraceLimit=1/0,V=require("./scope").Scope,ft=require("./lexer"),$=ft.RESERVED,B=ft.STRICT_PROSCRIBED,mt=require("./helpers"),Q=mt.compact,it=mt.flatten,nt=mt.extend,at=mt.merge,et=mt.del,lt=mt.starts,tt=mt.ends,rt=mt.last,ht=mt.some,Z=mt.addLocationDataFn,ot=mt.locationDataToString,ut=mt.throwSyntaxError,e.extend=nt,e.addLocationDataFn=Z,J=function(){return!0},S=function(){return!1},G=function(){return this},D=function(){return this.negated=!this.negated,this},e.CodeFragment=l=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?": "+ot(this.locationData):"")},e}(),st=function(e){var t;return function(){var n,i,s;for(s=[],n=0,i=e.length;i>n;n++)t=e[n],s.push(t.code);return s}().join("")},e.Base=s=function(){function e(){}return e.prototype.compile=function(e,t){return st(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=nt({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==N&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var t;return(t=this.jumps())&&t.error("cannot use a pure statement in an expression"),e.sharedScope=!0,c.wrap(this).compileNode(e)},e.prototype.cache=function(e,t,n){var s,r;return this.isComplex()?(s=new x(n||e.scope.freeVariable("ref")),r=new i(s,this),t?[r.compileToFragments(e,t),[this.makeCode(s.value)]]:[r,s]):(s=t?this.compileToFragments(e,t):this,[s,s])},e.prototype.cacheToCodeFragments=function(e){return[st(e[0]),st(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new o(new x(""+e+".push"),[t]):new j(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 u))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+H)}),n},e.prototype.eachChild=function(e){var t,n,i,s,r,o,a,c;if(!this.children)return this;for(a=this.children,i=0,r=a.length;r>i;i++)if(t=a[i],this[t])for(c=it([this[t]]),s=0,o=c.length;o>s;s++)if(n=c[s],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 A("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=S,e.prototype.jumps=S,e.prototype.isComplex=J,e.prototype.isChainable=S,e.prototype.isAssignable=S,e.prototype.unwrap=G,e.prototype.unfoldSoak=S,e.prototype.assigns=S,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData||(this.locationData=e),this.eachChild(function(t){return t.updateLocationDataIfMissing(e)})},e.prototype.error=function(e){return ut(e,this.locationData)},e.prototype.makeCode=function(e){return new l(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,s,r,o;for(n=[],s=r=0,o=e.length;o>r;s=++r)i=e[s],s&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=r=function(e){function t(e){this.expressions=Q(it(e||[]))}return yt(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,s;for(s=this.expressions,n=0,i=s.length;i>n;n++)if(t=s[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,s;for(s=this.expressions,n=0,i=s.length;i>n;n++)if(t=s[n],t.jumps(e))return t},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof u)){this.expressions[n]=t.makeReturn(e),t instanceof j&&!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,s,r,o,a,c,h,l;for(this.tab=e.indent,a=e.level===N,i=[],l=this.expressions,r=c=0,h=l.length;h>c;r=++c)o=l[r],o=o.unwrapAll(),o=o.unfoldSoak(e)||o,o instanceof t?i.push(o.compileNode(e)):a?(o.front=!0,s=o.compileToFragments(e),o.isStatement(e)||(s.unshift(this.makeCode(""+this.tab)),s.push(this.makeCode(";"))),i.push(s)):i.push(o.compileToFragments(e,C));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>=C?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,s,r,o,a,c,h,l;for(e.indent=e.bare?"":H,e.level=N,this.spaced=!0,e.scope=new V(null,this,null),l=e.locals||[],c=0,h=l.length;h>c;c++)s=l[c],e.scope.parameter(s);return r=[],e.bare||(o=function(){var e,n,s,r;for(s=this.expressions,r=[],i=e=0,n=s.length;n>e&&(t=s[i],t.unwrap()instanceof u);i=++e)r.push(t);return r}.call(this),a=this.expressions.slice(o.length),this.expressions=o,o.length&&(r=this.compileNode(at(e,{indent:""})),r.push(this.makeCode("\n"))),this.expressions=a),n=this.compileWithDeclarations(e),e.bare?n:[].concat(r,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,s,r,o,a,c,h,l,p,d,f,m;for(s=[],o=[],d=this.expressions,r=l=0,p=d.length;p>l&&(i=d[r],i=i.unwrap(),i instanceof u||i instanceof x);r=++l);return e=at(e,{level:N}),r&&(a=this.expressions.splice(r,9e9),f=[this.spaced,!1],h=f[0],this.spaced=f[1],m=[this.compileNode(e),h],s=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?(r&&s.push(this.makeCode("\n")),s.push(this.makeCode(""+this.tab+"var ")),n&&s.push(this.makeCode(c.declaredVariables().join(", "))),t&&(n&&s.push(this.makeCode(",\n"+(this.tab+H))),s.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+H))))),s.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):s.length&&o.length&&s.push(this.makeCode("\n"))),s.concat(o)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(s),e.Literal=x=function(e){function t(e){this.value=e}return yt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return m.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=S,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}(s),e.Undefined=function(e){function t(){return bt=t.__super__.constructor.apply(this,arguments)}return yt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=w?"(void 0)":"void 0")]},t}(s),e.Null=function(e){function t(){return kt=t.__super__.constructor.apply(this,arguments)}return yt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(s),e.Bool=function(e){function t(e){this.val=e}return yt(t,e),t.prototype.isAssignable=S,t.prototype.isComplex=S,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(s),e.Return=j=function(e){function t(e){e&&!e.unwrap().isUndefined&&(this.expression=e)}return yt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=J,t.prototype.makeReturn=G,t.prototype.jumps=G,t.prototype.compileToFragments=function(e,n){var i,s;return i=null!=(s=this.expression)?s.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,L))),t.push(this.makeCode(";")),t},t}(s),e.Value=K=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 yt(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.isArray=function(){return!this.properties.length&&this.base instanceof n},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.base instanceof x&&M.test(this.base.value)},t.prototype.isString=function(){return this.base instanceof x&&k.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.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 R&&(!e||this.base.generated)},t.prototype.isSplice=function(){return rt(this.properties)instanceof P},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,s,r,o;return r=rt(this.properties),this.properties.length<2&&!this.base.isComplex()&&!(null!=r?r.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(s=new x(e.scope.freeVariable("base")),n=new t(new _(new i(s,n)))),r?(r.isComplex()&&(o=new x(e.scope.freeVariable("name")),r=new v(new i(o,r.index)),o=new v(o)),[n.add(r),new t(s||n.base,[o||r])]):[n,s])},t.prototype.compileNode=function(e){var t,n,i,s,r;for(this.base.front=this.front,i=this.properties,t=this.base.compileToFragments(e,i.length?w:null),(this.base instanceof _||i.length)&&M.test(st(t))&&t.push(this.makeCode(".")),s=0,r=i.length;r>s;s++)n=i[s],t.push.apply(t,n.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){var n=this;return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(){var s,r,o,a,c,h,l,u,d,f;if(o=n.base.unfoldSoak(e))return(d=o.body.properties).push.apply(d,n.properties),o;for(f=n.properties,r=l=0,u=f.length;u>l;r=++l)if(a=f[r],a.soak)return a.soak=!1,s=new t(n.base,n.properties.slice(0,r)),h=new t(n.base,n.properties.slice(r)),s.isComplex()&&(c=new x(e.scope.freeVariable("ref")),s=new _(new i(c,s)),h.base=c),new g(new p(s),h,{soak:!0});return!1}()},t}(s),e.Comment=u=function(e){function t(e){this.comment=e}return yt(t,e),t.prototype.isStatement=J,t.prototype.makeReturn=G,t.prototype.compileNode=function(e,t){var n;return n="/*"+ct(this.comment,this.tab)+(vt.call(this.comment,"\n")>=0?"\n"+this.tab:"")+"*/\n",(t||e.level)===N&&(n=e.indent+n),[this.makeCode(n)]},t}(s),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}return yt(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 x("__super__"))],i["static"]&&n.push(new t(new x("constructor"))),n.push(new t(new x(i.name))),new K(new x(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,s,r,o,a,c,h,l;if(this.soak){if(this.variable){if(i=pt(e,this,"variable"))return i;h=new K(this.variable).cacheReference(e),s=h[0],o=h[1]}else s=new x(this.superReference(e)),o=new K(s);return o=new n(o,this.args),o.isNew=this.isNew,s=new x("typeof "+s.compile(e)+' === "function"'),new g(s,new K(o),{soak:!0})}for(t=this,r=[];;)if(t.variable instanceof n)r.push(t),t=t.variable;else{if(!(t.variable instanceof K))break;if(r.push(t),!((t=t.variable.base)instanceof n))break}for(l=r.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=pt(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,s,r,o,a,c,h,l;if(null!=(h=this.variable)&&(h.front=this.front),s=U.compileSplattedArray(e,this.args,!0),s.length)return this.compileSplat(e,s);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,C));return r=[],this.isSuper?(o=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(o+=", "),r.push(this.makeCode(o))):(this.isNew&&r.push(this.makeCode("new ")),r.push.apply(r,this.variable.compileToFragments(e,w)),r.push(this.makeCode("("))),r.push.apply(r,i),r.push(this.makeCode(")")),r},n.prototype.compileSplat=function(e,t){var n,i,s,r,o,a;return this.isSuper?[].concat(this.makeCode(""+this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(r=this.tab+H,[].concat(this.makeCode("(function(func, args, ctor) {\n"+r+"ctor.prototype = func.prototype;\n"+r+"var child = new ctor, result = func.apply(child, args);\n"+r+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,C),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new K(this.variable),(o=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,C),this.makeCode(")"),o.compileToFragments(e))):(s=i.compileToFragments(e,w),M.test(st(s))&&(s=this.wrapInBraces(s)),o?(a=st(s),s.push.apply(s,o.compileToFragments(e))):a="null",n=n.concat(s)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},n}(s),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return yt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new o(new K(new x(dt("extends"))),[this.child,this.parent]).compileToFragments(e)},t}(s),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return yt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),m.test(st(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=S,t}(s),e.Index=v=function(e){function t(e){this.index=e}return yt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,L),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(s),e.Range=O=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return yt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,s,r;return e=at(e,{top:!0}),n=this.cacheToCodeFragments(this.from.cache(e,C)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,C)),this.toC=i[0],this.toVar=i[1],(t=et(e,"step"))&&(s=this.cacheToCodeFragments(t.cache(e,C)),this.step=s[0],this.stepVar=s[1]),r=[this.fromVar.match(M),this.toVar.match(M)],this.fromNum=r[0],this.toNum=r[1],this.stepVar?this.stepNum=this.stepVar.match(M):void 0},t.prototype.compileNode=function(e){var t,n,i,s,r,o,a,c,h,l,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=this.fromNum&&this.toNum,r=et(e,"index"),o=et(e,"name"),h=o&&o!==r,p=""+r+" = "+this.fromC,this.toC!==this.toVar&&(p+=", "+this.toC),this.step!==this.stepVar&&(p+=", "+this.step),d=[""+r+" <"+this.equals,""+r+" >"+this.equals],c=d[0],s=d[1],n=this.stepNum?+this.stepNum>0?""+c+" "+this.toVar:""+s+" "+this.toVar:a?(f=[+this.fromNum,+this.toNum],i=f[0],u=f[1],f,u>=i?""+c+" "+u:""+s+" "+u):(t=this.stepVar?""+this.stepVar+" > 0":""+this.fromVar+" <= "+this.toVar,""+t+" ? "+c+" "+this.toVar+" : "+s+" "+this.toVar),l=this.stepVar?""+r+" += "+this.stepVar:a?h?u>=i?"++"+r:"--"+r:u>=i?""+r+"++":""+r+"--":h?""+t+" ? ++"+r+" : --"+r:""+t+" ? "+r+"++ : "+r+"--",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,s,r,o,a,c,h,l,u,p,d;return this.fromNum&&this.toNum&&Math.abs(this.fromNum-this.toNum)<=20?(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+H,r=e.scope.freeVariable("i"),l=e.scope.freeVariable("results"),c="\n"+o+l+" = [];",this.fromNum&&this.toNum?(e.index=r,n=st(this.compileNode(e))):(u=""+r+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=""+this.fromVar+" <= "+this.toVar,n="var "+u+"; "+i+" ? "+r+" <"+this.equals+" "+this.toVar+" : "+r+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+r+"++ : "+r+"--"),a="{ "+l+".push("+r+"); }\n"+o+"return "+l+";\n"+e.indent,s=function(e){return null!=e?e.contains(function(e){return e instanceof x&&"arguments"===e.value&&!e.asKey}):void 0},(s(this.from)||s(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+o+"for ("+n+")"+a+"}).apply(this"+(null!=t?t:"")+")")])},t}(s),e.Slice=P=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return yt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,s,r,o,a;return a=this.range,r=a.to,i=a.from,s=i&&i.compileToFragments(e,L)||[this.makeCode("0")],r&&(t=r.compileToFragments(e,L),n=st(t),(this.range.exclusive||-1!==+n)&&(o=", "+(this.range.exclusive?n:M.test(n)?""+(+n+1):(t=r.compileToFragments(e,w),"+"+st(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+st(s)+(o||"")+")")]},t}(s),e.Obj=R=function(e){function t(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return yt(t,e),t.prototype.children=["properties"],t.prototype.compileNode=function(e){var t,n,s,r,o,a,c,h,l,p,d,f,m;if(l=this.properties,!l.length)return[this.makeCode(this.front?"({})":"{}")];if(this.generated)for(p=0,f=l.length;f>p;p++)c=l[p],c instanceof K&&c.error("cannot have an implicit value in an implicit object");for(s=e.indent+=H,a=this.lastNonComment(this.properties),t=[],n=d=0,m=l.length;m>d;n=++d)h=l[n],o=n===l.length-1?"":h===a||h instanceof u?"\n":",\n",r=h instanceof u?"":s,h instanceof i&&h.variable instanceof K&&h.variable.hasProperties()&&h.variable.error("Invalid object key"),h instanceof K&&h["this"]&&(h=new i(h.properties[0].name,h,"object")),h instanceof u||(h instanceof i||(h=new i(h,h,"object")),(h.variable.base||h.variable).asKey=!0),r&&t.push(this.makeCode(r)),t.push.apply(t,h.compileToFragments(e,N)),o&&t.push(this.makeCode(o));return t.unshift(this.makeCode("{"+(l.length&&"\n"))),t.push(this.makeCode(""+(l.length&&"\n"+this.tab)+"}")),this.front?this.wrapInBraces(t):t},t.prototype.assigns=function(e){var t,n,i,s;for(s=this.properties,n=0,i=s.length;i>n;n++)if(t=s[n],t.assigns(e))return!0;return!1},t}(s),e.Arr=n=function(e){function t(e){this.objects=e||[]}return yt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,s,r,o,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=H,t=U.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,s;for(i=this.objects,s=[],t=0,n=i.length;n>t;t++)r=i[t],s.push(r.compileToFragments(e,C));return s}.call(this),s=o=0,a=n.length;a>o;s=++o)i=n[s],s&&t.push(this.makeCode(", ")),t.push.apply(t,i);return st(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,s;for(s=this.objects,n=0,i=s.length;i>n;n++)if(t=s[n],t.assigns(e))return!0;return!1},t}(s),e.Class=a=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new r,this.boundFuncs=[],this.body.classBody=!0}return yt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n;return this.variable?(e=(n=rt(this.variable.properties))?n instanceof t&&n.name.value:this.variable.base.value,vt.call(B,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=m.test(e)&&e)):null},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof x&&"this"===t.value?t.value=e:t instanceof h&&(t.klass=e,t.bound)?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,s,r,o;for(o=this.boundFuncs,s=0,r=o.length;r>s;s++)n=o[s],i=new K(new x("this"),[new t(n)]).compile(e),this.ctor.body.unshift(new x(""+i+" = "+dt("bind")+"("+i+", this)"))},n.prototype.addProperties=function(e,n,s){var r,o,a,c,l;return l=e.base.properties.slice(0),a=function(){var e;for(e=[];r=l.shift();)r instanceof i&&(o=r.variable.base,delete r.context,c=r.value,"constructor"===o.value?(this.ctor&&r.error("cannot define more than one constructor in a class"),c.bound&&r.error("cannot define a constructor as a bound function"),c instanceof h?r=this.ctor=c:(this.externalCtor=s.scope.freeVariable("class"),r=new i(new x(this.externalCtor),c))):r.variable["this"]?(c["static"]=!0,c.bound&&(c.context=n)):(r.variable=new K(new x(n),[new t(new x("prototype")),new t(o)]),c instanceof h&&c.bound&&(this.boundFuncs.push(o),c.bound=!1))),e.push(r);return e}.call(this),Q(a)},n.prototype.walkBody=function(e,t){var i=this;return this.traverseChildren(!1,function(s){var o,a,c,h,l,u,p;if(o=!0,s instanceof n)return!1;if(s instanceof r){for(p=a=s.expressions,c=l=0,u=p.length;u>l;c=++l)h=p[c],h instanceof K&&h.isObject(!0)&&(o=!1,a[c]=i.addProperties(h,e,t));s.expressions=a=it(a)}return o&&!(s instanceof n)})},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof u||n instanceof K&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e,t){var n,s,r;return n=!this.ctor,this.ctor||(this.ctor=new h),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0,n?(this.parent&&(r=new x(""+e+".__super__.constructor.apply(this, arguments)")),this.externalCtor&&(r=new x(""+this.externalCtor+".apply(this, arguments)")),r&&(s=new x(t.scope.freeVariable("ref")),this.ctor.body.unshift(new i(s,r))),this.addBoundFunctions(t),r&&(this.ctor.body.push(s),this.ctor.body.makeReturn()),this.body.expressions.unshift(this.ctor)):this.addBoundFunctions(t)},n.prototype.compileNode=function(e){var t,n,s,r,o,a,l;return n=this.determineName(),o=n||"_Class",o.reserved&&(o="_"+o),r=new x(o),this.hoistDirectivePrologue(),this.setContext(o),this.walkBody(o,e),this.ensureConstructor(o,e),this.body.spaced=!0,this.ctor instanceof h||this.body.expressions.unshift(this.ctor),this.body.expressions.push(r),(l=this.body.expressions).unshift.apply(l,this.directives),t=c.wrap(this.body),this.parent&&(this.superClass=new x(e.scope.freeVariable("super",!1)),this.body.expressions.unshift(new d(r,this.superClass)),t.args.push(this.parent),a=t.variable.params||t.variable.base.params,a.push(new I(this.superClass))),s=new _(t,!0),this.variable&&(s=new i(this.variable,s)),s.compileToFragments(e)},n}(s),e.Assign=i=function(e){function n(e,t,n,i){var s,r,o;this.variable=e,this.value=t,this.context=n,this.param=i&&i.param,this.subpattern=i&&i.subpattern,o=r=this.variable.unwrapAll().value,s=vt.call(B,o)>=0,s&&"object"!==this.context&&this.variable.error('variable name may not be "'+r+'"')}return yt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===N&&null!=this.context&&vt.call(this.context,"?")>=0},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return pt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,s,r,o,a,c,l,u,p;if(i=this.variable instanceof K){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(c=this.context)||"&&="===c||"?="===c)return this.compileConditional(e)}return n=this.variable.compileToFragments(e,C),r=st(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(r,"var"):e.scope.find(r))),this.value instanceof h&&(s=E.exec(r))&&(s[1]&&(this.value.klass=s[1]),this.value.name=null!=(l=null!=(u=null!=(p=s[2])?p:s[3])?u:s[4])?l:s[5]),o=this.value.compileToFragments(e,C),"object"===this.context?n.concat(this.makeCode(": "),o):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),o),e.level<=C?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,s,r,o,a,c,h,l,u,p,d,f,b,k,g,y,w,T,L,E,D,S,R,A,I,O,j,M;if(y=e.level===N,T=this.value,d=this.variable.base.objects,!(f=d.length))return r=T.compileToFragments(e),e.level>=F?this.wrapInBraces(r):r;if(h=this.variable.isObject(),y&&1===f&&!((p=d[0])instanceof U))return p instanceof n?(R=p,A=R.variable,c=A.base,p=R.value):c=h?p["this"]?p.properties[0].name:p:new x(0),i=m.test(c.unwrap().value||0),T=new K(T),T.properties.push(new(i?t:v)(c)),I=p.unwrap().value,vt.call($,I)>=0&&p.error("assignment to a reserved word: "+p.compile(e)),new n(p,T,null,{param:this.param}).compileToFragments(e,N);for(L=T.compileToFragments(e,C),E=st(L),s=[],g=!1,(!m.test(E)||this.variable.assigns(E))&&(s.push([this.makeCode(""+(b=e.scope.freeVariable("ref"))+" = ")].concat(wt.call(L))),L=[this.makeCode(b)],E=b),a=D=0,S=d.length;S>D;a=++D)p=d[a],c=a,h&&(p instanceof n?(O=p,j=O.variable,c=j.base,p=O.value):p.base instanceof _?(M=new K(p.unwrapAll()).cacheReference(e),p=M[0],c=M[1]):c=p["this"]?p.properties[0].name:p),!g&&p instanceof U?(u=p.name.unwrap().value,p=p.unwrap(),w=""+f+" <= "+E+".length ? "+dt("slice")+".call("+E+", "+a,(k=f-a-1)?(l=e.scope.freeVariable("i"),w+=", "+l+" = "+E+".length - "+k+") : ("+l+" = "+a+", [])"):w+=") : []",w=new x(w),g=""+l+"++"):(u=p.unwrap().value,p instanceof U&&p.error("multiple splats are disallowed in an assignment"),"number"==typeof c?(c=new x(g||c),i=!1):i=h&&m.test(c.unwrap().value||0),w=new K(new x(E),[new(i?t:v)(c)])),null!=u&&vt.call($,u)>=0&&p.error("assignment to a reserved word: "+p.compile(e)),s.push(new n(p,w,null,{param:this.param,subpattern:!0}).compileToFragments(e,C)); +return y||this.subpattern||s.push(L),o=this.joinFragmentArrays(s,", "),e.level=0&&(e.isExistentialEquals=!0),new A(this.context.slice(0,-1),t,new n(i,this.value,"=")).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,s,r,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,F)),s=u[0],r=u[1]):s=r="0",a?(null!=i?i.isSimpleNumber():void 0)&&a.isSimpleNumber()?(a=+a.compile(e)-+r,n||(a+=1)):(a=a.compile(e,w)+" - "+r,n||(a+=" + 1")):a="9e9",p=this.value.cache(e,C),c=p[0],h=p[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+s+", "+a+"].concat("),c,this.makeCode(")), "),h),e.level>N?this.wrapInBraces(t):t},n}(s),e.Code=h=function(e){function t(e,t,n){this.params=e||[],this.body=t||new r,this.bound="boundfunc"===n,this.bound&&(this.context="_this")}return yt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=S,t.prototype.compileNode=function(e){var t,s,r,o,a,c,h,l,u,p,d,f,m,b,k,y,v,T,C,F,L,N,E,D,S,R,I,_,$;for(e.scope=new V(e.scope,this.body,this),e.scope.shared=et(e,"sharedScope"),e.indent+=H,delete e.bare,delete e.isExistentialEquals,u=[],r=[],this.eachParamName(function(t){return e.scope.check(t)?void 0:e.scope.parameter(t)}),S=this.params,k=0,C=S.length;C>k;k++)if(l=S[k],l.splat){for(R=this.params,y=0,F=R.length;F>y;y++)h=R[y].name,h["this"]&&(h=h.properties[0].name),h.value&&e.scope.add(h.value,"var",!0);d=new i(new K(new n(function(){var t,n,i,s;for(i=this.params,s=[],t=0,n=i.length;n>t;t++)h=i[t],s.push(h.asReference(e));return s}.call(this))),new K(new x("arguments")));break}for(I=this.params,v=0,L=I.length;L>v;v++)l=I[v],l.isComplex()?(m=p=l.asReference(e),l.value&&(m=new A("?",p,l.value)),r.push(new i(new K(l.name),m,"=",{param:!0}))):(p=l,l.value&&(c=new x(p.name.value+" == null"),m=new i(new K(l.name),l.value,"="),r.push(new g(c,m)))),d||u.push(p);for(b=this.body.isEmpty(),d&&r.unshift(d),r.length&&(_=this.body.expressions).unshift.apply(_,r),o=T=0,N=u.length;N>T;o=++T)h=u[o],u[o]=h.compileToFragments(e),e.scope.parameter(st(u[o]));for(f=[],this.eachParamName(function(e,t){return vt.call(f,e)>=0&&t.error("multiple parameters named '"+e+"'"),f.push(e)}),b||this.noReturn||this.body.makeReturn(),this.bound&&((null!=($=e.scope.parent.method)?$.bound:void 0)?this.bound=this.context=e.scope.parent.method.context:this["static"]||e.scope.parent.assign("_this","this")),a=e.indent,s="function",this.ctor&&(s+=" "+this.name),s+="(",t=[this.makeCode(s)],o=D=0,E=u.length;E>D;o=++D)h=u[o],o&&t.push(this.makeCode(", ")),t.push.apply(t,h);return t.push(this.makeCode(") {")),this.body.isEmpty()||(t=t.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),t.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(wt.call(t)):this.front||e.level>=w?this.wrapInBraces(t):t},t.prototype.eachParamName=function(e){var t,n,i,s,r;for(s=this.params,r=[],n=0,i=s.length;i>n;n++)t=s[n],r.push(t.eachName(e));return r},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(s),e.Param=I=function(e){function t(e,t,n){var i;this.name=e,this.value=t,this.splat=n,i=e=this.name.unwrapAll().value,vt.call(B,i)>=0&&this.name.error('parameter name "'+e+'" is not allowed')}return yt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,C)},t.prototype.asReference=function(e){var t;return this.reference?this.reference:(t=this.name,t["this"]?(t=t.properties[0].name,t.value.reserved&&(t=new x(e.scope.freeVariable(t.value)))):t.isComplex()&&(t=new x(e.scope.freeVariable("arg"))),t=new K(t),this.splat&&(t=new U(t)),this.reference=t)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,s,r,o,a,c;if(null==t&&(t=this.name),n=function(t){var n;return n=t.properties[0].name,n.value.reserved?void 0:e(n.value,n)},t instanceof x)return e(t.value,t);if(t instanceof K)return n(t);for(c=t.objects,o=0,a=c.length;a>o;o++)r=c[o],r instanceof i?this.eachName(e,r.value.unwrap()):r instanceof U?(s=r.name.unwrap(),e(s.value,s)):r instanceof K?r.isArray()||r.isObject()?this.eachName(e,r.base):r["this"]?n(r):e(r.base.value,r.base):r.error("illegal parameter "+r.compile())},t}(s),e.Splat=U=function(e){function t(e){this.name=e.compile?e:new x(e)}return yt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=J,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 s,r,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,C),i?c:[].concat(u.makeCode(""+dt("slice")+".call("),c,u.makeCode(")"));for(s=n.slice(l),h=p=0,d=s.length;d>p;h=++p)u=s[h],o=u.compileToFragments(e,C),s[h]=u instanceof t?[].concat(u.makeCode(""+dt("slice")+".call("),o,u.makeCode(")")):[].concat(u.makeCode("["),o,u.makeCode("]"));return 0===l?(u=n[0],a=u.joinFragmentArrays(s.slice(1),", "),s[0].concat(u.makeCode(".concat("),a,u.makeCode(")"))):(r=function(){var t,i,s,r;for(s=n.slice(0,l),r=[],t=0,i=s.length;i>t;t++)u=s[t],r.push(u.compileToFragments(e,C));return r}(),r=n[0].joinFragmentArrays(r,", "),a=n[l].joinFragmentArrays(s,", "),[].concat(n[0].makeCode("["),r,n[l].makeCode("].concat("),a,rt(n).makeCode(")")))},t}(s),e.While=z=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 yt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=J,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;if(e=this.body.expressions,!e.length)return!1;for(n=0,i=e.length;i>n;n++)if(t=e[n],t.jumps({loop:!0}))return t;return!1},t.prototype.compileNode=function(e){var t,n,i,s;return e.indent+=H,s="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),s=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new g(new _(this.guard).invert(),new x("continue"))):this.guard&&(n=r.wrap([new g(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,N),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(s+this.tab+"while ("),this.condition.compileToFragments(e,L),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(s),e.Op=A=function(e){function t(e,t,i,s){if("in"===e)return new y(t,i);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof h&&t.bound||t["do"])&&(t=new _(t))}return this.operator=n[e]||e,this.first=t,this.second=i,this.flip=!!s,this}var n,s;return yt(t,e),n={"==":"===","!=":"!==",of:"in"},s={"!==":"===","===":"!=="},t.prototype.children=["first","second"],t.prototype.isSimpleNumber=S,t.prototype.isUnary=function(){return!this.second},t.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e))||this.first.isComplex()},t.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},t.prototype.invert=function(){var e,n,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,n=this;n&&n.operator;)e&&(e=n.operator in s),n=n.first;if(!e)return new _(this).invert();for(n=this;n&&n.operator;)n.invert=!n.invert,n.operator=s[n.operator],n=n.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof t&&this.first.invert(),this):this.second?new _(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof t&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new t("!",this)},t.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&pt(e,this,"first")},t.prototype.generateDo=function(e){var t,n,s,r,a,c,l,u;for(r=[],n=e instanceof i&&(a=e.value.unwrap())instanceof h?a:e,u=n.params||[],c=0,l=u.length;l>c;c++)s=u[c],s.value?(r.push(s.value),delete s.value):r.push(s);return t=new o(e,r),t["do"]=!0,t},t.prototype.compileNode=function(e){var t,n,i,s;return 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"),("--"===(i=this.operator)||"++"===i)&&(s=this.first.unwrapAll().value,vt.call(B,s)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isUnary()?this.compileUnary(e):n?this.compileChain(e):"?"===this.operator?this.compileExistence(e):(t=[].concat(this.first.compileToFragments(e,F),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),e.level<=F?t:this.wrapInBraces(t))},t.prototype.compileChain=function(e){var t,n,i,s;return s=this.first.second.cache(e),this.first.second=s[0],i=s[1],n=this.first.compileToFragments(e,F),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),i.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),this.wrapInBraces(t)},t.prototype.compileExistence=function(e){var t,n;return!e.isExistentialEquals&&this.first.isComplex()?(n=new x(e.scope.freeVariable("ref")),t=new _(new i(n,this.first))):(t=this.first,n=t),new g(new p(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},t.prototype.compileUnary=function(e){var n,i,s;return i=[],n=this.operator,i.push([this.makeCode(n)]),"!"===n&&this.first instanceof p?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=w?new _(this).compileToFragments(e):(s="+"===n||"-"===n,("new"===n||"typeof"===n||"delete"===n||s&&this.first instanceof t&&this.first.operator===n)&&i.push([this.makeCode(" ")]),(s&&this.first instanceof t||"new"===n&&this.first.isStatement(e))&&(this.first=new _(this.first)),i.push(this.first.compileToFragments(e,F)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},t}(s),e.In=y=function(e){function t(e,t){this.object=e,this.array=t}return yt(t,e),t.prototype.children=["object","array"],t.prototype.invert=D,t.prototype.compileNode=function(e){var t,n,i,s,r;if(this.array instanceof K&&this.array.isArray()){for(r=this.array.base.objects,i=0,s=r.length;s>i;i++)if(n=r[i],n instanceof U){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,s,r,o,a,c,h,l,u,p;if(0===this.array.base.objects.length)return[this.makeCode(""+!!this.negated)];for(l=this.object.cache(e,F),o=l[0],r=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)s=p[i],i&&a.push(this.makeCode(n)),a=a.concat(i?r:o,this.makeCode(t),s.compileToFragments(e,w));return e.level= 0"))),st(i)===st(n)?t:(t=i.concat(this.makeCode(", "),t),e.level+B)||(F=I.freeVariable("len")),a=""+w+y+" = 0, "+F+" = "+P+".length",c=""+w+y+" = "+P+".length - 1",s=""+y+" < "+F,o=""+y+" >= 0",this.step?(B?u&&(s=o,a=c):(s=""+V+" > 0 ? "+s+" : "+o,a="("+V+" > 0 ? ("+a+") : "+c+")"),b=""+y+" += "+V):b=""+(v!==y?"++"+y:""+y+"++"),p=[this.makeCode(""+a+"; "+s+"; "+w+b)])),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 g(new _(this.guard).invert(),new x("continue"))):this.guard&&(t=r.wrap([new g(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new x(""+P+"["+v+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),E&&(U="\n"+f+E+";"),this.object&&(p=[this.makeCode(""+v+" in "+P)],this.own&&(d="\n"+f+"if (!"+dt("hasProp")+".call("+P+", "+v+")) continue;")),n=t.compileToFragments(at(e,{indent:f}),N),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,s,r,a,c,l,u,p,d,f,m,b,k,g,y;for(s=[],f=t.expressions,c=p=0,d=f.length;d>p;c=++p)r=f[c],r=r.unwrapAll(),r instanceof o&&(u=r.variable.unwrapAll(),(u instanceof h||u instanceof K&&(null!=(m=u.base)?m.unwrapAll():void 0)instanceof h&&1===u.properties.length&&("call"===(b=null!=(k=u.properties[0].name)?k.value:void 0)||"apply"===b))&&(a=(null!=(g=u.base)?g.unwrapAll():void 0)||u,l=new x(e.scope.freeVariable("fn")),n=new K(l),u.base&&(y=[n,u],u.base=y[0],n=y[1]),t.expressions[c]=new o(n,r.args),s=s.concat(this.makeCode(this.tab),new i(l,a).compileToFragments(e,N),this.makeCode(";\n"))));return s},t}(z),e.Switch=q=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return yt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=J,t.prototype.jumps=function(e){var t,n,i,s,r,o,a;for(null==e&&(e={block:!0}),r=this.cases,i=0,s=r.length;s>i;i++)if(o=r[i],n=o[0],t=o[1],t.jumps(e))return t;return null!=(a=this.otherwise)?a.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,s,o;for(s=this.cases,n=0,i=s.length;i>n;n++)t=s[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new r([new x("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,s,r,o,a,c,h,l,u,p,d,f,m,b;for(c=e.indent+H,h=e.indent=c+H,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,L):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=l=0,p=f.length;p>l;a=++l){for(m=f[a],s=m[0],t=m[1],b=it([s]),u=0,d=b.length;d>u;u++)i=b[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,L),this.makeCode(":\n"));if((n=t.compileToFragments(e,N)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;r=this.lastNonComment(t.expressions),r instanceof j||r instanceof x&&r.jumps()&&"debugger"!==r.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(wt.call(this.otherwise.compileToFragments(e,N)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(s),e.If=g=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 yt(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},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===N||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 r([new x("void 0")]))),this.body&&(this.body=new r([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new r([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof r?e:new r([e])},t.prototype.compileStatement=function(e){var n,i,s,r,o,a,c;return s=et(e,"chainChild"),(o=et(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+H,r=this.condition.compileToFragments(e,L),i=this.ensureBlock(this.body).compileToFragments(at(e,{indent:c})),a=[].concat(this.makeCode("if ("),r,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),s||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,N))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(at(e,{indent:c}),N),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,s;return i=this.condition.compileToFragments(e,T),n=this.bodyNode().compileToFragments(e,C),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,C):[this.makeCode("void 0")],s=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=T?this.wrapInBraces(s):s},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(s),c={wrap:function(e,n,i){var s,a,c,l,u;return e.jumps()?e:(l=new h([],r.wrap([e])),s=[],a=e.contains(this.isLiteralArguments),a&&e.classBody&&a.error("Class bodies shouldn't reference arguments"),(a||e.contains(this.isLiteralThis))&&(u=new x(a?"apply":"call"),s=[new x("this")],a&&s.push(new x("arguments")),l=new K(l,[new t(u)])),l.noReturn=i,c=new o(l,s),n?r.wrap([c]):c)},isLiteralArguments:function(e){return e instanceof x&&"arguments"===e.value&&!e.asKey},isLiteralThis:function(e){return e instanceof x&&"this"===e.value&&!e.asKey||e instanceof h&&e.bound||e instanceof o&&e.isSuper}},pt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new K(t),i},Y={"extends":function(){return"function(child, parent) { for (var key in parent) { if ("+dt("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; }"},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; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},N=1,L=2,C=3,T=4,F=5,w=6,H=" ",b="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",m=RegExp("^"+b+"$"),M=/^[+-]?\d+$/,E=RegExp("^(?:("+b+")\\.prototype(?:\\.("+b+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|("+b+")$"),k=/^['"]/,dt=function(e){var t;return t="__"+e,V.root.assign(t,Y[e]()),t},ct=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")}}.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,s;return s=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:s,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,s,r;return t.prototype.add=function(t,n,i){var s,r,o,a;return null==i&&(i={}),r=n[0],s=n[1],o=(a=this.lines)[r]||(a[r]=new e(r)),o.add(s,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,s,r,o,a,c,h,l,u,p,d,f,m,b,k;for(null==e&&(e={}),null==t&&(t=null),u=0,i=0,r=0,s=0,h=!1,n="",b=this.lines,a=p=0,f=b.length;f>p;a=++p)if(o=b[a])for(k=o.columns,d=0,m=k.length;m>d;d++)if(c=k[d]){for(;ue?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&r,a>>=s,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw new 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,s,r,o,a,c,h,l,u,p,d,f,m,b,k,g,y,v,w,T,C={}.hasOwnProperty;if(l=require("fs"),y=require("vm"),k=require("path"),s=require("child_process"),t=require("./lexer").Lexer,f=require("./parser").parser,u=require("./helpers"),i=require("./sourcemap"),e.VERSION="1.6.3",e.helpers=u,e.compile=r=function(e,t){var n,s,r,o,a,c,h,l,d,m,b,k;for(null==t&&(t={}),d=u.merge,t.sourceMap&&(l=new i),a=f.parse(p.tokenize(e,t)).compileToFragments(t),r=0,t.header&&(r+=1),t.shiftLine&&(r+=1),s=0,h="",b=0,k=a.length;k>b;b++)o=a[b],t.sourceMap&&(o.locationData&&l.add([o.locationData.first_line,o.locationData.first_column],[r,s],{noReplace:!0}),m=u.count(o.code,"\n"),r+=m,s=o.code.length-(m?o.code.lastIndexOf("\n"):0)),h+=o.code;return t.header&&(c="Generated by CoffeeScript "+this.VERSION,h="// "+c+"\n"+h),t.sourceMap?(n={js:h},n.sourceMap=l,n.v3SourceMap=l.generate(t,e),n):h},e.tokens=function(e,t){return p.tokenize(e,t)},e.nodes=function(e,t){return"string"==typeof e?f.parse(p.tokenize(e,t)):f.parse(e)},e.run=function(e,t){var n,i;return null==t&&(t={}),i=require.main,null==t.sourceMap&&(t.sourceMap=!0),i.filename=process.argv[1]=t.filename?l.realpathSync(t.filename):".",i.moduleCache&&(i.moduleCache={}),i.paths=require("module")._nodeModulePaths(k.dirname(l.realpathSync(t.filename||"."))),!u.isCoffee(i.filename)||require.extensions?(n=r(e,t),m(),g[i.filename]=n.sourceMap,i._compile(n.js,i.filename)):i._compile(e,i.filename)},e.eval=function(e,t){var n,i,s,o,a,c,h,l,u,p,d,f,m,b;if(null==t&&(t={}),e=e.trim()){if(i=y.Script){if(null!=t.sandbox){if(t.sandbox instanceof i.createContext().constructor)h=t.sandbox;else{h=i.createContext(),f=t.sandbox;for(o in f)C.call(f,o)&&(l=f[o],h[o]=l)}h.global=h.root=h.GLOBAL=h}else h=global;if(h.__filename=t.filename||"eval",h.__dirname=k.dirname(h.__filename),h===global&&!h.module&&!h.require){for(n=require("module"),h.module=d=new n(t.modulename||"eval"),h.require=b=function(e){return n._load(e,d,!0)},d.filename=h.__filename,m=Object.getOwnPropertyNames(require),u=0,p=m.length;p>u;u++)c=m[u],"paths"!==c&&(b[c]=require[c]);b.paths=d.paths=n._nodeModulePaths(process.cwd()),b.resolve=function(e){return n._resolveFilename(e,d)}}}a={};for(o in t)C.call(t,o)&&(l=t[o],a[o]=l);return a.bare=!0,s=r(e,a),h===global?y.runInThisContext(s):y.runInContext(s,h)}},d=function(e,t){var n,i,s;return i=l.readFileSync(t,"utf8"),s=65279===i.charCodeAt(0)?i.substring(1):i,n=r(s,{filename:t,sourceMap:!0,literate:u.isLiterate(t)}),g[t]=n.sourceMap,e._compile(n.js,t)},require.extensions){for(T=[".coffee",".litcoffee",".coffee.md"],v=0,w=T.length;w>v;v++)o=T[v],require.extensions[o]=d;n=require("module"),a=function(e){var t,i;for(i=k.basename(e).split("."),""===i[0]&&i.shift();i.shift();)if(t="."+i.join("."),n._extensions[t])return t;return".js"},n.prototype.load=function(e){var t;return this.filename=e,this.paths=n._nodeModulePaths(k.dirname(e)),t=a(e),n._extensions[t](this,e),this.loaded=!0}}s&&(c=s.fork,s.fork=function(e,t,n){var i;return null==t&&(t=[]),null==n&&(n={}),i=u.isCoffee(e)?"coffee":null,Array.isArray(t)||(t=[],n=t||{}),n.execPath||(n.execPath=i),c(e,t,n)}),p=new t,f.lexer={lex:function(){var e,t;return t=this.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}},f.yy=require("./nodes"),f.yy.parseError=function(e,t){var n;return n=t.token,e="unexpected "+(1===n?"end of input":n),u.throwSyntaxError(e,f.lexer.yylloc)},b=!1,g={},m=function(){var t;if(!b)return b=!0,t=require.main,Error.prepareStackTrace=function(t,n){var i,s,r,o,a;return o={},r=function(e,t,n){var i,s;return s=g[e],s&&(i=s.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},s=function(){var t,s,o;for(o=[],t=0,s=n.length;s>t&&(i=n[t],i.getFunction()!==e.run);t++)o.push(" at "+h(i,r));return o}(),""+t.name+": "+(null!=(a=t.message)?a:"")+"\n"+s.join("\n")+"\n"}},h=function(e,t){var n,i,s,r,o,a,c,h,l,u,p,d;return r=void 0,s="",e.isNative()?s="native":(e.isEval()?(r=e.getScriptNameOrSourceURL(),r||(s=""+e.getEvalOrigin()+", ")):r=e.getFileName(),r||(r=""),h=e.getLineNumber(),i=e.getColumnNumber(),u=t(r,h,i),s=u?""+r+":"+u[0]+":"+u[1]+", :"+h+":"+i:""+r+":"+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+" ("+s+")"):""+d+"."+(l||"")+" ("+s+")"):a?"new "+(o||"")+" ("+s+")":o?""+o+" ("+s+")":s}}.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,s;return null==t&&(t={}),t.sourceMap=!0,t.inline=!0,s=CoffeeScript.compile(e,t),n=s.js,i=s.v3SourceMap,""+n+"\n//@ sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(i)))+"\n//@ sourceURL=coffeescript"}),CoffeeScript.load=function(e,t,n){var i;return null==n&&(n={}),n.sourceFiles=[e],i=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,i.open("GET",e,!0),"overrideMimeType"in i&&i.overrideMimeType("text/plain"),i.onreadystatechange=function(){var s;if(4===i.readyState){if(0!==(s=i.status)&&200!==s)throw new Error("Could not load "+e);if(CoffeeScript.run(i.responseText,n),t)return t()}},i.send(null)},runScripts=function(){var e,t,n,i,s,r,o;return o=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,s; +for(s=[],e=0,n=o.length;n>e;e++)r=o[e],i=r.type,__indexOf.call(t,i)>=0&&s.push(r);return s}(),i=0,s=e.length,(n=function(){var s,r,o;return o=e[i++],s=null!=o?o.type:void 0,__indexOf.call(t,s)>=0?(r={literate:"text/literate-coffeescript"===s},o.src?CoffeeScript.load(o.src,n,r):(r.sourceFiles=["embedded"],CoffeeScript.run(o.innerHTML,r),n())):void 0})(),null},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/extras/jsl.conf b/extras/jsl.conf deleted file mode 100644 index 1190da529e..0000000000 --- a/extras/jsl.conf +++ /dev/null @@ -1,44 +0,0 @@ -# JavaScriptLint configuration file for CoffeeScript. - -+no_return_value # function {0} does not always return a value -+duplicate_formal # duplicate formal argument {0} --equal_as_assign # test for equality (==) mistyped as assignment (=)?{0} -+var_hides_arg # variable {0} hides argument -+redeclared_var # redeclaration of {0} {1} --anon_no_return_value # anonymous function does not always return a value -+missing_semicolon # missing semicolon -+meaningless_block # meaningless block; curly braces have no impact --comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+unreachable_code # unreachable code -+missing_break # missing break statement --missing_break_for_last_case # missing break statement for last case in switch --comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) --inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement --useless_void # use of the void type may be unnecessary (void is always undefined) -+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+use_of_label # use of label --block_without_braces # block statement without curly braces -+leading_decimal_point # leading decimal point may indicate a number or an object member -+trailing_decimal_point # trailing decimal point may indicate a number or an object member -+octal_number # leading zeros make an octal number -+nested_comment # nested comment -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma -+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+empty_statement # empty statement or extra semicolon --missing_option_explicit # the "option explicit" control comment is missing -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+dup_option_explicit # duplicate "option explicit" control comment -+useless_assign # useless assignment -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent) --missing_default_case # missing default case in switch statement -+duplicate_case_in_switch # duplicate case in switch statements -+default_not_at_end # the default case is not at the end of the switch statement -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+useless_comparison # useless comparison; comparing identical expressions -+with_statement # with statement hides undeclared variables; use temporary variable instead -+trailing_comma_in_array # extra comma is not recommended in array initializers -+assign_to_function_call # assignment to a function call -+parseint_missing_radix # parseInt missing radix parameter -+lambda_assign_requires_semicolon diff --git a/index.html b/index.html index 593b2b05eb..db05f188a4 100644 --- a/index.html +++ b/index.html @@ -108,15 +108,13 @@ compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is - readable and pretty-printed, passes through - JavaScript Lint - without warnings, will work in every JavaScript runtime, and tends + readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.

    Latest Version: - 1.6.1 + 1.6.3

    @@ -359,16 +357,6 @@ 

    directly to stdout. - - -l, --lint - - If the jsl - (JavaScript Lint) - command is installed, use it - to check the compilation of a CoffeeScript file. (Handy in - conjunction with
    --watch) - - -s, --stdio @@ -378,17 +366,18 @@

    - -e, --eval + -l, --literate - Compile and print a little snippet of CoffeeScript directly from the - command line. For example:
    coffee -e "console.log num for num in [10..1]" + Parses the code as Literate CoffeeScript. You only need to specify + this when passing in code directly over stdio, or using some sort + of extension-less file name. - -r, --require + -e, --eval - Load a library before compiling or executing your script. Can be used - to hook in to the compiler (to add Growl notifications, for example). + Compile and print a little snippet of CoffeeScript directly from the + command line. For example:
    coffee -e "console.log num for num in [10..1]" @@ -671,8 +660,7 @@

    log object.class -

    -$('.account').attr({
    +
    $('.account').attr({
       "class": 'active'
     });
     
    @@ -1272,19 +1260,23 @@ 

    "And the error is ... #{error}" ) -

    +
    var error;
    +
     alert((function() {
       try {
         return nonexistent / void 0;
    -  } catch (error) {
    +  } catch (_error) {
    +    error = _error;
         return "And the error is ... " + error;
       }
     })());
    -
    load
    load
    load
    load
    String::dasherize = ->
       this.replace /_/g, "-"
     
    -
    -String.prototype.dasherize = function() {
    +
    String.prototype.dasherize = function() {
       return this.replace(/_/g, "-");
     };
    -
    load
    load
    run: "one_two".dasherize()

    @@ -1786,6 +1774,35 @@

    tag = ""; _ref = tag.split(""), open = _ref[0], contents = 3 <= _ref.length ? __slice.call(_ref, 1, _i = _ref.length - 1) : (_i = 1, []), close = _ref[_i++]; +;alert(contents.join(""));'>run: contents.join("")
    +

    + Destructuring assignment is also useful when combined with class constructors + to assign properties to your instance from an options object passed to the constructor. +

    +
    class Person
    +  constructor: (options) -> 
    +    {@name, @age, @height} = options
    +
    +
    var Person;
    +
    +Person = (function() {
    +  function Person(options) {
    +    this.name = options.name, this.age = options.age, this.height = options.height;
    +  }
    +
    +  return Person;
    +
    +})();
    +
    load
    run: contents.join("")

    @@ -1822,7 +1839,7 @@

    return _this.customer.purchase(_this.cart); }); }; -
    load

    +
    load

    If we had used -> in the callback above, @customer would have referred to the undefined "customer" property of the DOM element, @@ -1852,7 +1869,7 @@

    hi = function() { 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. +

    +
    score = 76
    +grade = switch
    +  when score < 60 then 'F'
    +  when score < 70 then 'D'
    +  when score < 80 then 'C'
    +  when score < 90 then 'B'
    +  else 'A'
    +# grade == 'C'
    +
    var grade, score;
    +
    +score = 76;
    +
    +grade = (function() {
    +  switch (false) {
    +    case !(score < 60):
    +      return 'F';
    +    case !(score < 70):
    +      return 'D';
    +    case !(score < 80):
    +      return 'C';
    +    case !(score < 90):
    +      return 'B';
    +    default:
    +      return 'A';
    +  }
    +})();
    +
    load

    @@ -1924,16 +1971,18 @@

    finally cleanUp() -
    +
    var error;
    +
     try {
       allHellBreaksLoose();
       catsAndDogsLivingTogether();
    -} catch (error) {
    +} catch (_error) {
    +  error = _error;
       print(error);
     } finally {
       cleanUp();
     }
    -
    load

    +
    load

    @@ -1953,7 +2002,7 @@

    cholesterol = 127; healthy = (200 > cholesterol && cholesterol > 60); -
    load
    load
    load
    load
    load
    load
    run: mobyDick

    @@ -2024,7 +2073,7 @@

    var html;
     
     html = "<strong>\n  cup of coffeescript\n</strong>";
    -
    load
    load
    run: html

    @@ -2038,25 +2087,25 @@

    are preserved in the generated code.

    ###
    -CoffeeScript Compiler v1.6.1
    +SkinnyMochaHalfCaffScript Compiler v1.0
     Released under the MIT License
     ###
     
     
     
    /*
    -CoffeeScript Compiler v1.6.1
    +SkinnyMochaHalfCaffScript Compiler v1.0
     Released under the MIT License
     */
     
     
    -
    load

    +
    load

    Block Regular Expressions Similar to block strings and comments, CoffeeScript supports block regexes — extended regular expressions that ignore internal whitespace and can contain - comments and interpolation. Modeled after Perl's /x modifier, CoffeeSctipt's + comments and interpolation. Modeled after Perl's /x modifier, CoffeeScript's block regexes are delimited by /// and go a long way towards making complex regular expressions readable. To quote from the CoffeeScript source:

    @@ -2074,7 +2123,7 @@

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

    +
    load

    @@ -2122,7 +2171,7 @@

    dir = options.output || 'lib'; 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: @@ -2335,6 +2384,13 @@

    The FAQ
    Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.

  • +
  • + JS2Coffee
    + Is a very well done reverse JavaScript-to-CoffeeScript compiler. It's + not going to be perfect (infer what your JavaScript classes are, when + you need bound functions, and so on...) — but it's a great starting + point for converting simple scripts. +
  • High-Rez Logo
    The CoffeeScript logo is available in Illustrator, EPS and PSD formats, for use @@ -2362,6 +2418,64 @@

    Change Log

    +

    + + 1.6.3 + June 2, 2013 + +

      +
    • + The CoffeeScript REPL now remembers your history between sessions. + Just like a proper REPL should. +
    • +
    • + You can now use require in Node to load .coffee.md + Literate CoffeeScript files. In the browser, + text/literate-coffeescript script tags. +
    • +
    • + The old coffee --lint command has been removed. It was useful + while originally working on the compiler, but has been surpassed by + JSHint. You may now use -l to pass literate files in over + stdio. +
    • +
    • + Bugfixes for Windows path separators, catch without naming + the error, and executable-class-bodies-with- + prototypal-property-attachment. +
    • +
    +

    + +

    + + 1.6.2 + March 18, 2013 + +

      +
    • + Source maps have been used to provide automatic line-mapping when + running CoffeeScript directly via the coffee command, and + for automatic line-mapping when running CoffeeScript directly in the + browser. Also, to provide better error messages for semantic errors + thrown by the compiler — + with colors, even. +
    • +
    • + Improved support for mixed literate/vanilla-style CoffeeScript projects, + and generating source maps for both at the same time. +
    • +
    • + Fixes for 1.6.x regressions with overriding inherited bound + functions, and for Windows file path management. +
    • +
    • + The coffee command can now correctly fork() + both .coffee and .js files. (Requires Node.js 0.9+) +
    • +
    +

    +

    1.6.1 @@ -3109,8 +3223,10 @@

    else $(el).text window.compiledJS $('#error').hide() - catch error - $('#error').text(error.message).show() + catch {location, message} + if location? + message = "Error on line #{location.first_line + 1}: #{message}" + $('#error').text(message).show() # Update permalink $('#repl_permalink').attr 'href', "##{sourceFragment}#{encodeURIComponent source}" diff --git a/lib/coffee-script/browser.js b/lib/coffee-script/browser.js index fec8e6901c..e5411d8c2b 100644 --- a/lib/coffee-script/browser.js +++ b/lib/coffee-script/browser.js @@ -1,21 +1,22 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var CoffeeScript, runScripts, + 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; }; CoffeeScript = require('./coffee-script'); CoffeeScript.require = require; + compile = CoffeeScript.compile; + CoffeeScript["eval"] = function(code, options) { - var _ref; if (options == null) { options = {}; } - if ((_ref = options.bare) == null) { + if (options.bare == null) { options.bare = true; } - return eval(CoffeeScript.compile(code, options)); + return eval(compile(code, options)); }; CoffeeScript.run = function(code, options) { @@ -23,19 +24,34 @@ options = {}; } options.bare = true; - return Function(CoffeeScript.compile(code, options))(); + options.shiftLine = true; + return Function(compile(code, options))(); }; if (typeof window === "undefined" || window === null) { return; } + if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { + compile = function(code, options) { + var js, v3SourceMap, _ref; + if (options == null) { + options = {}; + } + options.sourceMap = true; + options.inline = true; + _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; + return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript"; + }; + } + CoffeeScript.load = function(url, callback, options) { var xhr; if (options == null) { options = {}; } - xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(); + options.sourceFiles = [url]; + xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); xhr.open('GET', url, true); if ('overrideMimeType' in xhr) { xhr.overrideMimeType('text/plain'); @@ -58,7 +74,7 @@ runScripts = function() { var coffees, coffeetypes, execute, index, length, s, scripts; - scripts = document.getElementsByTagName('script'); + scripts = window.document.getElementsByTagName('script'); coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; coffees = (function() { var _i, _len, _ref, _results; @@ -84,6 +100,7 @@ if (script.src) { return CoffeeScript.load(script.src, execute, options); } else { + options.sourceFiles = ['embedded']; CoffeeScript.run(script.innerHTML, options); return execute(); } @@ -93,9 +110,9 @@ }; if (window.addEventListener) { - addEventListener('DOMContentLoaded', runScripts, false); + window.addEventListener('DOMContentLoaded', runScripts, false); } else { - attachEvent('onload', runScripts); + window.attachEvent('onload', runScripts); } }).call(this); diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js index a0b643f665..68bd7c30f8 100644 --- a/lib/coffee-script/cake.js +++ b/lib/coffee-script/cake.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; @@ -46,7 +46,7 @@ }); exports.run = function() { - var arg, args, _i, _len, _ref, _results; + var arg, args, e, _i, _len, _ref, _results; global.__originalDirname = fs.realpathSync('.'); process.chdir(cakefileDirectory(__originalDirname)); args = process.argv.slice(2); @@ -59,7 +59,8 @@ } try { options = oparse.parse(args); - } catch (e) { + } catch (_error) { + e = _error; return fatalError("" + e); } _ref = options["arguments"]; diff --git a/lib/coffee-script/coffee-script.js b/lib/coffee-script/coffee-script.js index d791035d30..11ccd8104b 100644 --- a/lib/coffee-script/coffee-script.js +++ b/lib/coffee-script/coffee-script.js @@ -1,85 +1,60 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var Lexer, compile, ext, fs, helpers, lexer, loadFile, parser, path, sourcemap, vm, _i, _len, _ref, + var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref, __hasProp = {}.hasOwnProperty; fs = require('fs'); + vm = require('vm'); + path = require('path'); + child_process = require('child_process'); + Lexer = require('./lexer').Lexer; parser = require('./parser').parser; helpers = require('./helpers'); - vm = require('vm'); - - sourcemap = require('./sourcemap'); - - loadFile = function(module, filename) { - var raw, stripped; - raw = fs.readFileSync(filename, 'utf8'); - stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; - return module._compile(compile(stripped, { - filename: filename, - literate: helpers.isLiterate(filename) - }), filename); - }; - - if (require.extensions) { - _ref = ['.coffee', '.litcoffee', '.md', '.coffee.md']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ext = _ref[_i]; - require.extensions[ext] = loadFile; - } - } + SourceMap = require('./sourcemap'); - exports.VERSION = '1.6.1'; + exports.VERSION = '1.6.3'; exports.helpers = helpers; exports.compile = compile = function(code, options) { - var answer, coffeeFile, currentColumn, currentLine, fragment, fragments, header, js, jsFile, merge, newLines, sourceMap, _j, _len1; + var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len; if (options == null) { options = {}; } - merge = exports.helpers.merge; - try { - if (options.sourceMap) { - coffeeFile = helpers.baseFileName(options.filename); - jsFile = helpers.baseFileName(options.filename, true) + ".js"; - sourceMap = new sourcemap.SourceMap(); - } - fragments = (parser.parse(lexer.tokenize(code, options))).compileToFragments(options); - currentLine = 0; - if (options.header) { - currentLine += 1; - } + merge = helpers.merge; + if (options.sourceMap) { + map = new SourceMap; + } + fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); + currentLine = 0; + if (options.header) { + currentLine += 1; + } + if (options.shiftLine) { + currentLine += 1; + } + currentColumn = 0; + js = ""; + for (_i = 0, _len = fragments.length; _i < _len; _i++) { + fragment = fragments[_i]; if (options.sourceMap) { - currentLine += 1; - } - currentColumn = 0; - js = ""; - for (_j = 0, _len1 = fragments.length; _j < _len1; _j++) { - fragment = fragments[_j]; - if (sourceMap) { - if (fragment.locationData) { - sourceMap.addMapping([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { - noReplace: true - }); - } - newLines = helpers.count(fragment.code, "\n"); - currentLine += newLines; - currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0); + if (fragment.locationData) { + map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { + noReplace: true + }); } - js += fragment.code; - } - } catch (err) { - if (options.filename) { - err.message = "In " + options.filename + ", " + err.message; + newLines = helpers.count(fragment.code, "\n"); + currentLine += newLines; + currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0); } - throw err; + js += fragment.code; } if (options.header) { header = "Generated by CoffeeScript " + this.VERSION; @@ -89,10 +64,8 @@ answer = { js: js }; - if (sourceMap) { - answer.sourceMap = sourceMap; - answer.v3SourceMap = sourcemap.generateV3SourceMap(sourceMap, coffeeFile, jsFile); - } + answer.sourceMap = map; + answer.v3SourceMap = map.generate(options, code); return answer; } else { return js; @@ -112,23 +85,29 @@ }; exports.run = function(code, options) { - var mainModule; + var answer, mainModule; if (options == null) { options = {}; } mainModule = require.main; + if (options.sourceMap == null) { + options.sourceMap = true; + } mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; mainModule.moduleCache && (mainModule.moduleCache = {}); - mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename))); + mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename || '.'))); if (!helpers.isCoffee(mainModule.filename) || require.extensions) { - return mainModule._compile(compile(code, options), mainModule.filename); + answer = compile(code, options); + patchStackTrace(); + sourceMaps[mainModule.filename] = answer.sourceMap; + return mainModule._compile(answer.js, mainModule.filename); } else { return mainModule._compile(code, mainModule.filename); } }; exports["eval"] = function(code, options) { - var Module, Script, js, k, o, r, sandbox, v, _j, _len1, _module, _ref1, _ref2, _require; + var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; if (options == null) { options = {}; } @@ -142,10 +121,10 @@ sandbox = options.sandbox; } else { sandbox = Script.createContext(); - _ref1 = options.sandbox; - for (k in _ref1) { - if (!__hasProp.call(_ref1, k)) continue; - v = _ref1[k]; + _ref = options.sandbox; + for (k in _ref) { + if (!__hasProp.call(_ref, k)) continue; + v = _ref[k]; sandbox[k] = v; } } @@ -162,9 +141,9 @@ return Module._load(path, _module, true); }; _module.filename = sandbox.__filename; - _ref2 = Object.getOwnPropertyNames(require); - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - r = _ref2[_j]; + _ref1 = Object.getOwnPropertyNames(require); + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + r = _ref1[_i]; if (r !== 'paths') { _require[r] = require[r]; } @@ -190,6 +169,70 @@ } }; + loadFile = function(module, filename) { + var answer, raw, stripped; + raw = fs.readFileSync(filename, 'utf8'); + stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; + answer = compile(stripped, { + filename: filename, + sourceMap: true, + literate: helpers.isLiterate(filename) + }); + sourceMaps[filename] = answer.sourceMap; + return module._compile(answer.js, filename); + }; + + if (require.extensions) { + _ref = ['.coffee', '.litcoffee', '.coffee.md']; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + ext = _ref[_i]; + require.extensions[ext] = loadFile; + } + Module = require('module'); + findExtension = function(filename) { + var curExtension, extensions; + extensions = path.basename(filename).split('.'); + if (extensions[0] === '') { + extensions.shift(); + } + while (extensions.shift()) { + curExtension = '.' + extensions.join('.'); + if (Module._extensions[curExtension]) { + return curExtension; + } + } + return '.js'; + }; + Module.prototype.load = function(filename) { + var extension; + this.filename = filename; + this.paths = Module._nodeModulePaths(path.dirname(filename)); + extension = findExtension(filename); + Module._extensions[extension](this, filename); + return this.loaded = true; + }; + } + + if (child_process) { + fork = child_process.fork; + child_process.fork = function(path, args, options) { + var execPath; + if (args == null) { + args = []; + } + if (options == null) { + options = {}; + } + execPath = helpers.isCoffee(path) ? 'coffee' : null; + if (!Array.isArray(args)) { + args = []; + options = args || {}; + } + options.execPath || (options.execPath = execPath); + return fork(path, args, options); + }; + } + lexer = new Lexer; parser.lexer = { @@ -215,4 +258,101 @@ parser.yy = require('./nodes'); + parser.yy.parseError = function(message, _arg) { + var token; + token = _arg.token; + message = "unexpected " + (token === 1 ? 'end of input' : token); + return helpers.throwSyntaxError(message, parser.lexer.yylloc); + }; + + patched = false; + + sourceMaps = {}; + + patchStackTrace = function() { + var mainModule; + if (patched) { + return; + } + patched = true; + mainModule = require.main; + return Error.prepareStackTrace = function(err, stack) { + var frame, frames, getSourceMapping, sourceFiles, _ref1; + sourceFiles = {}; + getSourceMapping = function(filename, line, column) { + var answer, sourceMap; + sourceMap = sourceMaps[filename]; + if (sourceMap) { + answer = sourceMap.sourceLocation([line - 1, column - 1]); + } + if (answer) { + return [answer[0] + 1, answer[1] + 1]; + } else { + return null; + } + }; + frames = (function() { + var _j, _len1, _results; + _results = []; + for (_j = 0, _len1 = stack.length; _j < _len1; _j++) { + frame = stack[_j]; + if (frame.getFunction() === exports.run) { + break; + } + _results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); + } + return _results; + })(); + return "" + err.name + ": " + ((_ref1 = err.message) != null ? _ref1 : '') + "\n" + (frames.join('\n')) + "\n"; + }; + }; + + formatSourcePosition = function(frame, getSourceMapping) { + var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; + fileName = void 0; + fileLocation = ''; + if (frame.isNative()) { + fileLocation = "native"; + } else { + if (frame.isEval()) { + fileName = frame.getScriptNameOrSourceURL(); + if (!fileName) { + fileLocation = "" + (frame.getEvalOrigin()) + ", "; + } + } else { + fileName = frame.getFileName(); + } + fileName || (fileName = ""); + line = frame.getLineNumber(); + column = frame.getColumnNumber(); + source = getSourceMapping(fileName, line, column); + fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] + ", :" + line + ":" + column : "" + fileName + ":" + line + ":" + column; + } + functionName = frame.getFunctionName(); + isConstructor = frame.isConstructor(); + isMethodCall = !(frame.isToplevel() || isConstructor); + if (isMethodCall) { + methodName = frame.getMethodName(); + typeName = frame.getTypeName(); + if (functionName) { + tp = as = ''; + if (typeName && functionName.indexOf(typeName)) { + tp = "" + typeName + "."; + } + if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { + as = " [as " + methodName + "]"; + } + return "" + tp + functionName + as + " (" + fileLocation + ")"; + } else { + return "" + typeName + "." + (methodName || '') + " (" + fileLocation + ")"; + } + } else if (isConstructor) { + return "new " + (functionName || '') + " (" + fileLocation + ")"; + } else if (functionName) { + return "" + functionName + " (" + fileLocation + ")"; + } else { + return fileLocation; + } + }; + }).call(this); diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js index 4077577ebf..26b2554083 100644 --- a/lib/coffee-script/command.js +++ b/lib/coffee-script/command.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, lint, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref; + var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref; fs = require('fs'); @@ -18,6 +18,8 @@ exists = fs.exists || path.exists; + useWinPathSep = path.sep === '\\'; + helpers.extend(CoffeeScript, new EventEmitter); printLine = function(line) { @@ -34,7 +36,7 @@ BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; - SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; + SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; opts = {}; @@ -148,9 +150,12 @@ }; compileScript = function(file, input, base) { - var compiled, o, options, t, task; + var compiled, err, message, o, options, t, task, useColors; + if (base == null) { + base = null; + } o = opts; - options = compileOptions(file); + options = compileOptions(file, base); try { t = task = { file: file, @@ -165,6 +170,9 @@ } else if (o.run) { return CoffeeScript.run(t.input, t.options); } else if (o.join && t.file !== o.join) { + if (helpers.isLiterate(file)) { + t.input = helpers.invertLiterate(t.input); + } sourceCode[sources.indexOf(t.file)] = t.input; return compileJoin(); } else { @@ -178,21 +186,23 @@ if (o.print) { return printLine(t.output.trim()); } else if (o.compile || o.map) { - return writeJs(base, t.file, t.output, t.sourceMap); - } else if (o.lint) { - return lint(t.file, t.output); + return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); } } - } catch (err) { + } catch (_error) { + err = _error; CoffeeScript.emit('failure', err, task); if (CoffeeScript.listeners('failure').length) { return; } + useColors = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; + message = helpers.prettyErrorMessage(err, file || '[stdin]', input, useColors); if (o.watch) { - return printLine(err.message + '\x07'); + return printLine(message + '\x07'); + } else { + printWarn(message); + return process.exit(1); } - printWarn(err instanceof Error && err.stack || ("ERROR: " + err)); - return process.exit(1); } }; @@ -227,7 +237,7 @@ }; watch = function(source, base) { - var compile, compileTimeout, prevStats, rewatch, watchErr, watcher; + var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher; prevStats = null; compileTimeout = null; watchErr = function(e) { @@ -238,7 +248,8 @@ try { rewatch(); return compile(); - } catch (e) { + } catch (_error) { + e = _error; removeSource(source, base, true); return compileJoin(); } @@ -269,7 +280,8 @@ }; try { watcher = fs.watch(source, compile); - } catch (e) { + } catch (_error) { + e = _error; watchErr(e); } return rewatch = function() { @@ -281,7 +293,7 @@ }; watchDir = function(source, base) { - var readdirTimeout, watcher; + var e, readdirTimeout, watcher; readdirTimeout = null; try { return watcher = fs.watch(source, function() { @@ -316,7 +328,8 @@ }); }); }); - } catch (e) { + } catch (_error) { + e = _error; if (e.code !== 'ENOENT') { throw e; } @@ -374,19 +387,18 @@ if (extension == null) { extension = ".js"; } - basename = helpers.baseFileName(source, true); + basename = helpers.baseFileName(source, true, useWinPathSep); srcDir = path.dirname(source); baseDir = base === '.' ? srcDir : srcDir.substring(base.length); dir = opts.output ? path.join(opts.output, baseDir) : srcDir; return path.join(dir, basename + extension); }; - writeJs = function(base, sourcePath, js, generatedSourceMap) { - var compile, jsDir, jsPath, sourceMapPath; + writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { + var compile, jsDir, sourceMapPath; if (generatedSourceMap == null) { generatedSourceMap = null; } - jsPath = outputPath(sourcePath, base); sourceMapPath = outputPath(sourcePath, base, ".map"); jsDir = path.dirname(jsPath); compile = function() { @@ -395,7 +407,7 @@ js = ' '; } if (generatedSourceMap) { - js = "//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath)) + "\n" + js; + js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n"; } fs.writeFile(jsPath, js, function(err) { if (err) { @@ -430,19 +442,6 @@ return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message); }; - lint = function(file, js) { - var conf, jsl, printIt; - printIt = function(buffer) { - return printLine(file + ':\t' + buffer.toString().trim()); - }; - conf = __dirname + '/../../extras/jsl.conf'; - jsl = spawn('jsl', ['-nologo', '-stdin', '-conf', conf]); - jsl.stdout.on('data', printIt); - jsl.stderr.on('data', printIt); - jsl.stdin.write(js); - return jsl.stdin.end(); - }; - printTokens = function(tokens) { var strings, tag, token, value; strings = (function() { @@ -464,7 +463,7 @@ optionParser = new optparse.OptionParser(SWITCHES, BANNER); o = opts = optionParser.parse(process.argv.slice(2)); o.compile || (o.compile = !!o.output); - o.run = !(o.compile || o.print || o.lint || o.map); + o.run = !(o.compile || o.print || o.map); o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); sources = o["arguments"]; for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) { @@ -473,14 +472,35 @@ } }; - compileOptions = function(filename) { - return { + compileOptions = function(filename, base) { + var answer, cwd, jsDir, jsPath; + answer = { filename: filename, - literate: helpers.isLiterate(filename), + literate: opts.literate || helpers.isLiterate(filename), bare: opts.bare, header: opts.compile, sourceMap: opts.map }; + if (filename) { + if (base) { + cwd = process.cwd(); + jsPath = outputPath(filename, base); + jsDir = path.dirname(jsPath); + answer = helpers.merge(answer, { + jsPath: jsPath, + sourceRoot: path.relative(jsDir, cwd), + sourceFiles: [path.relative(cwd, filename)], + generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) + }); + } else { + answer = helpers.merge(answer, { + sourceRoot: "", + sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], + generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" + }); + } + } + return answer; }; forkNode = function() { diff --git a/lib/coffee-script/grammar.js b/lib/coffee-script/grammar.js index 4a76743315..24d5bacce8 100644 --- a/lib/coffee-script/grammar.js +++ b/lib/coffee-script/grammar.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; @@ -350,6 +350,8 @@ return [$2, $3]; }), o('CATCH Object Block', function() { return [LOC(2)(new Value($2)), $3]; + }), o('CATCH Block', function() { + return [null, $2]; }) ], Throw: [ diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js index d7bac3b313..352dc366e3 100644 --- a/lib/coffee-script/helpers.js +++ b/lib/coffee-script/helpers.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var buildLocationData, extend, flatten, _ref; + var buildLocationData, extend, flatten, last, repeat, _ref; exports.starts = function(string, literal, start) { return literal === string.substr(start, literal.length); @@ -12,6 +12,19 @@ return literal === string.substr(string.length - len - (back || 0), len); }; + exports.repeat = repeat = function(str, n) { + var res; + res = ''; + while (n > 0) { + if (n & 1) { + res += str; + } + n >>>= 1; + str += str; + } + return res; + }; + exports.compact = function(array) { var item, _i, _len, _results; _results = []; @@ -70,7 +83,7 @@ return val; }; - exports.last = function(array, back) { + exports.last = last = function(array, back) { return array[array.length - (back || 0) - 1]; }; @@ -85,6 +98,28 @@ return false; }; + exports.invertLiterate = function(code) { + var line, lines, maybe_code; + maybe_code = true; + lines = (function() { + var _i, _len, _ref1, _results; + _ref1 = code.split('\n'); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + line = _ref1[_i]; + if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { + _results.push(line); + } else if (maybe_code = /^\s*$/.test(line)) { + _results.push(line); + } else { + _results.push('# ' + line); + } + } + return _results; + })(); + return lines.join('\n'); + }; + buildLocationData = function(first, last) { if (!last) { return first; @@ -121,19 +156,23 @@ } }; - exports.baseFileName = function(file, stripExt) { - var parts; + exports.baseFileName = function(file, stripExt, useWinPathSep) { + var parts, pathSep; if (stripExt == null) { stripExt = false; } - parts = file.split('/'); + if (useWinPathSep == null) { + useWinPathSep = false; + } + pathSep = useWinPathSep ? /\\|\// : /\//; + parts = file.split(pathSep); file = parts[parts.length - 1]; if (!stripExt) { return file; } parts = file.split('.'); parts.pop(); - if (parts[parts.length - 1] === 'coffee') { + if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { parts.pop(); } return parts.join('.'); @@ -147,4 +186,38 @@ return /\.(litcoffee|coffee\.md)$/.test(file); }; + exports.throwSyntaxError = function(message, location) { + var error; + if (location.last_line == null) { + location.last_line = location.first_line; + } + if (location.last_column == null) { + location.last_column = location.first_column; + } + error = new SyntaxError(message); + error.location = location; + throw error; + }; + + exports.prettyErrorMessage = function(error, fileName, code, useColors) { + var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1; + if (!error.location) { + return error.stack || ("" + error); + } + _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; + codeLine = code.split('\n')[first_line]; + start = first_column; + end = first_line === last_line ? last_column + 1 : codeLine.length; + marker = repeat(' ', start) + repeat('^', end - start); + if (useColors) { + colorize = function(str) { + return "\x1B[1;31m" + str + "\x1B[0m"; + }; + codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); + marker = colorize(marker); + } + message = "" + fileName + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker; + return message; + }; + }).call(this); diff --git a/lib/coffee-script/index.js b/lib/coffee-script/index.js index 1452b45249..68787dfddd 100644 --- a/lib/coffee-script/index.js +++ b/lib/coffee-script/index.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { var key, val, _ref; diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js index 5261242ed7..b4db45fdbb 100644 --- a/lib/coffee-script/lexer.js +++ b/lib/coffee-script/lexer.js @@ -1,14 +1,13 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LITERATE, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, locationDataToString, starts, _ref, _ref1, + var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, 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; }; _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; - _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, locationDataToString = _ref1.locationDataToString; + _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; exports.Lexer = Lexer = (function() { - function Lexer() {} Lexer.prototype.tokenize = function(code, opts) { @@ -43,7 +42,6 @@ }; Lexer.prototype.clean = function(code) { - var line, lines, match; if (code.charCodeAt(0) === BOM) { code = code.slice(1); } @@ -53,21 +51,7 @@ this.chunkLine--; } if (this.literate) { - lines = (function() { - var _i, _len, _ref2, _results; - _ref2 = code.split('\n'); - _results = []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - line = _ref2[_i]; - if (match = LITERATE.exec(line)) { - _results.push(line.slice(match[0].length)); - } else { - _results.push('# ' + line); - } - } - return _results; - })(); - code = lines.join('\n'); + code = invertLiterate(code); } return code; }; @@ -171,10 +155,10 @@ } lexedLength = number.length; if (octalLiteral = /^0o([0-7]+)/.exec(number)) { - number = '0x' + (parseInt(octalLiteral[1], 8)).toString(16); + number = '0x' + parseInt(octalLiteral[1], 8).toString(16); } if (binaryLiteral = /^0b([01]+)/.exec(number)) { - number = '0x' + (parseInt(binaryLiteral[1], 2)).toString(16); + number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); } this.token('NUMBER', number, 0, lexedLength); return lexedLength; @@ -244,7 +228,7 @@ if (here) { this.token('HERECOMMENT', this.sanitizeHeredoc(here, { herecomment: true, - indent: Array(this.indent + 1).join(' ') + indent: repeat(' ', this.indent) }), 0, comment.length); } return comment.length; @@ -363,7 +347,7 @@ return indent.length; } diff = size - this.indent + this.outdebt; - this.token('INDENT', diff, 0, indent.length); + this.token('INDENT', diff, indent.length - size, size); this.indents.push(diff); this.ends.push('OUTDENT'); this.outdebt = this.indebt = 0; @@ -527,9 +511,6 @@ if (indent) { doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); } - if (this.literate) { - doc = doc.replace(/\n# \n/g, '\n\n'); - } if (!herecomment) { doc = doc.replace(/^\n/, ''); } @@ -605,7 +586,7 @@ }; Lexer.prototype.interpolateString = function(str, options) { - var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; + var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; if (options == null) { options = {}; } @@ -695,7 +676,9 @@ } } if (interpolated) { - this.token(')', ')', offsetInChunk + lexedLength, 0); + rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); + rparen.stringEnd = true; + this.tokens.push(rparen); } return tokens; }; @@ -727,7 +710,7 @@ column = this.chunkColumn; if (lineCount > 0) { lines = string.split('\n'); - column = (last(lines)).length; + column = last(lines).length; } else { column += string.length; } @@ -745,7 +728,7 @@ locationData = {}; _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; lastCharacter = Math.max(0, length - 1); - _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + (length - 1)), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; + _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; token = [tag, value, locationData]; return token; }; @@ -792,7 +775,10 @@ }; Lexer.prototype.error = function(message) { - throw SyntaxError("" + message + " on line " + (this.chunkLine + 1)); + return throwSyntaxError(message, { + first_line: this.chunkLine, + first_column: this.chunkColumn + }); }; return Lexer; @@ -850,8 +836,6 @@ COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/; - LITERATE = /^([ ]{4}|\t)/; - CODE = /^[-=]>/; MULTI_DENT = /^(?:\n[^\n\S]*)+/; @@ -892,9 +876,9 @@ BOOL = ['TRUE', 'FALSE']; - NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--', ']']; + NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; - NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING'); + NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; diff --git a/lib/coffee-script/nodes.js b/lib/coffee-script/nodes.js index c274724d35..0edbcf61da 100644 --- a/lib/coffee-script/nodes.js +++ b/lib/coffee-script/nodes.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, 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, last, locationDataToString, merge, multident, some, starts, unfoldSoak, utility, _ref, _ref1, + var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, 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, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3, __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; }, __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; }, @@ -12,7 +12,7 @@ _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; - _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString; + _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; exports.extend = extend; @@ -36,7 +36,6 @@ }; exports.CodeFragment = CodeFragment = (function() { - function CodeFragment(parent, code) { var _ref2; this.code = "" + code; @@ -45,7 +44,7 @@ } CodeFragment.prototype.toString = function() { - return "" + this.code + [this.locationData ? ": " + locationDataToString(this.locationData) : void 0]; + return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); }; return CodeFragment; @@ -66,7 +65,6 @@ }; exports.Base = Base = (function() { - function Base() {} Base.prototype.compile = function(o, lvl) { @@ -89,8 +87,9 @@ }; Base.prototype.compileClosure = function(o) { - if (this.jumps()) { - throw SyntaxError('cannot use a pure statement in an expression.'); + var jumpNode; + if (jumpNode = this.jumps()) { + jumpNode.error('cannot use a pure statement in an expression'); } o.sharedScope = true; return Closure.wrap(this).compileNode(o); @@ -127,21 +126,15 @@ }; Base.prototype.contains = function(pred) { - var contains; - contains = false; - this.traverseChildren(false, function(node) { - if (pred(node)) { - contains = true; + var node; + node = void 0; + this.traverseChildren(false, function(n) { + if (pred(n)) { + node = n; return false; } }); - return contains; - }; - - Base.prototype.containsType = function(type) { - return this instanceof type || this.contains(function(node) { - return node instanceof type; - }); + return node; }; Base.prototype.lastNonComment = function(list) { @@ -156,15 +149,14 @@ }; Base.prototype.toString = function(idt, name) { - var location, tree; + var tree; if (idt == null) { idt = ''; } if (name == null) { name = this.constructor.name; } - location = this.locationData ? locationDataToString(this.locationData) : "??"; - tree = '\n' + idt + location + ": " + name; + tree = '\n' + idt + name; if (this.soak) { tree += '?'; } @@ -197,10 +189,11 @@ Base.prototype.traverseChildren = function(crossScope, func) { return this.eachChild(function(child) { - if (func(child) === false) { - return false; + var recur; + recur = func(child); + if (recur !== false) { + return child.traverseChildren(crossScope, func); } - return child.traverseChildren(crossScope, func); }); }; @@ -236,15 +229,16 @@ Base.prototype.assigns = NO; Base.prototype.updateLocationDataIfMissing = function(locationData) { - if (!this.locationData) { - this.locationData = {}; - extend(this.locationData, locationData); - } + this.locationData || (this.locationData = locationData); return this.eachChild(function(child) { return child.updateLocationDataIfMissing(locationData); }); }; + Base.prototype.error = function(message) { + return throwSyntaxError(message, this.locationData); + }; + Base.prototype.makeCode = function(code) { return new CodeFragment(this, code); }; @@ -271,7 +265,6 @@ })(); exports.Block = Block = (function(_super) { - __extends(Block, _super); function Block(nodes) { @@ -382,7 +375,7 @@ } if (top) { if (this.spaced) { - return [].concat(this.makeCode("\n"), this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); + return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); } else { return this.joinFragmentArrays(compiledNodes, '\n'); } @@ -400,19 +393,24 @@ }; Block.prototype.compileRoot = function(o) { - var exp, fragments, i, prelude, preludeExps, rest; + var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; o.indent = o.bare ? '' : TAB; - o.scope = new Scope(null, this, null); o.level = LEVEL_TOP; this.spaced = true; + o.scope = new Scope(null, this, null); + _ref2 = o.locals || []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + name = _ref2[_i]; + o.scope.parameter(name); + } prelude = []; if (!o.bare) { preludeExps = (function() { - var _i, _len, _ref2, _results; - _ref2 = this.expressions; + var _j, _len1, _ref3, _results; + _ref3 = this.expressions; _results = []; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - exp = _ref2[i]; + for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { + exp = _ref3[i]; if (!(exp.unwrap() instanceof Comment)) { break; } @@ -477,7 +475,9 @@ } fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); } - fragments.push(this.makeCode(';\n')); + fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); + } else if (fragments.length && post.length) { + fragments.push(this.makeCode("\n")); } } return fragments.concat(post); @@ -495,7 +495,6 @@ })(Base); exports.Literal = Literal = (function(_super) { - __extends(Literal, _super); function Literal(value) { @@ -550,11 +549,11 @@ })(Base); exports.Undefined = (function(_super) { - __extends(Undefined, _super); function Undefined() { - return Undefined.__super__.constructor.apply(this, arguments); + _ref2 = Undefined.__super__.constructor.apply(this, arguments); + return _ref2; } Undefined.prototype.isAssignable = NO; @@ -570,11 +569,11 @@ })(Base); exports.Null = (function(_super) { - __extends(Null, _super); function Null() { - return Null.__super__.constructor.apply(this, arguments); + _ref3 = Null.__super__.constructor.apply(this, arguments); + return _ref3; } Null.prototype.isAssignable = NO; @@ -590,7 +589,6 @@ })(Base); exports.Bool = (function(_super) { - __extends(Bool, _super); Bool.prototype.isAssignable = NO; @@ -610,7 +608,6 @@ })(Base); exports.Return = Return = (function(_super) { - __extends(Return, _super); function Return(expr) { @@ -628,8 +625,8 @@ Return.prototype.jumps = THIS; Return.prototype.compileToFragments = function(o, level) { - var expr, _ref2; - expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0; + var expr, _ref4; + expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0; if (expr && !(expr instanceof Return)) { return expr.compileToFragments(o, level); } else { @@ -640,7 +637,7 @@ Return.prototype.compileNode = function(o) { var answer; answer = []; - answer.push(this.makeCode(this.tab + ("return" + [this.expression ? " " : void 0]))); + answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); if (this.expression) { answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); } @@ -653,7 +650,6 @@ })(Base); exports.Value = Value = (function(_super) { - __extends(Value, _super); function Value(base, props, tag) { @@ -700,10 +696,10 @@ }; Value.prototype.isAtomic = function() { - var node, _i, _len, _ref2; - _ref2 = this.properties.concat(this.base); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - node = _ref2[_i]; + var node, _i, _len, _ref4; + _ref4 = this.properties.concat(this.base); + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + node = _ref4[_i]; if (node.soak || node instanceof Call) { return false; } @@ -780,17 +776,16 @@ }; Value.prototype.unfoldSoak = function(o) { - var _ref2, - _this = this; - return (_ref2 = this.unfoldedSoak) != null ? _ref2 : this.unfoldedSoak = (function() { - var fst, i, ifn, prop, ref, snd, _i, _len, _ref3, _ref4; + var _this = this; + return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() { + var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5; if (ifn = _this.base.unfoldSoak(o)) { - (_ref3 = ifn.body.properties).push.apply(_ref3, _this.properties); + (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties); return ifn; } - _ref4 = _this.properties; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - prop = _ref4[i]; + _ref5 = _this.properties; + for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) { + prop = _ref5[i]; if (!prop.soak) { continue; } @@ -815,7 +810,6 @@ })(Base); exports.Comment = Comment = (function(_super) { - __extends(Comment, _super); function Comment(comment) { @@ -828,7 +822,7 @@ Comment.prototype.compileNode = function(o, level) { var code; - code = '/*' + multident(this.comment, this.tab) + ("\n" + this.tab + "*/\n"); + code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n"; if ((level || o.level) === LEVEL_TOP) { code = o.indent + code; } @@ -840,7 +834,6 @@ })(Base); exports.Call = Call = (function(_super) { - __extends(Call, _super); function Call(variable, args, soak) { @@ -854,8 +847,8 @@ Call.prototype.children = ['variable', 'args']; Call.prototype.newInstance = function() { - var base, _ref2; - base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable; + var base, _ref4; + base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable; if (base instanceof Call && !base.isNew) { base.newInstance(); } else { @@ -877,7 +870,7 @@ } else if (method != null ? method.ctor : void 0) { return "" + method.name + ".__super__.constructor"; } else { - throw SyntaxError('cannot call super outside of an instance method.'); + return this.error('cannot call super outside of an instance method.'); } }; @@ -888,13 +881,13 @@ }; Call.prototype.unfoldSoak = function(o) { - var call, ifn, left, list, rite, _i, _len, _ref2, _ref3; + var call, ifn, left, list, rite, _i, _len, _ref4, _ref5; if (this.soak) { if (this.variable) { if (ifn = unfoldSoak(o, this, 'variable')) { return ifn; } - _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1]; + _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1]; } else { left = new Literal(this.superReference(o)); rite = new Value(left); @@ -922,9 +915,9 @@ break; } } - _ref3 = list.reverse(); - for (_i = 0, _len = _ref3.length; _i < _len; _i++) { - call = _ref3[_i]; + _ref5 = list.reverse(); + for (_i = 0, _len = _ref5.length; _i < _len; _i++) { + call = _ref5[_i]; if (ifn) { if (call.variable instanceof Call) { call.variable = ifn; @@ -938,18 +931,18 @@ }; Call.prototype.compileNode = function(o) { - var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3; - if ((_ref2 = this.variable) != null) { - _ref2.front = this.front; + var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5; + if ((_ref4 = this.variable) != null) { + _ref4.front = this.front; } compiledArray = Splat.compileSplattedArray(o, this.args, true); if (compiledArray.length) { return this.compileSplat(o, compiledArray); } compiledArgs = []; - _ref3 = this.args; - for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) { - arg = _ref3[argIndex]; + _ref5 = this.args; + for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) { + arg = _ref5[argIndex]; if (argIndex) { compiledArgs.push(this.makeCode(", ")); } @@ -1009,7 +1002,6 @@ })(Base); exports.Extends = Extends = (function(_super) { - __extends(Extends, _super); function Extends(child, parent) { @@ -1028,7 +1020,6 @@ })(Base); exports.Access = Access = (function(_super) { - __extends(Access, _super); function Access(name, tag) { @@ -1058,7 +1049,6 @@ })(Base); exports.Index = Index = (function(_super) { - __extends(Index, _super); function Index(index) { @@ -1080,7 +1070,6 @@ })(Base); exports.Range = Range = (function(_super) { - __extends(Range, _super); Range.prototype.children = ['from', 'to']; @@ -1093,23 +1082,23 @@ } Range.prototype.compileVariables = function(o) { - var step, _ref2, _ref3, _ref4, _ref5; + var step, _ref4, _ref5, _ref6, _ref7; o = merge(o, { top: true }); - _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1]; - _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1]; + _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1]; + _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1]; if (step = del(o, 'step')) { - _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1]; + _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1]; } - _ref5 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref5[0], this.toNum = _ref5[1]; + _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1]; if (this.stepVar) { return this.stepNum = this.stepVar.match(SIMPLENUM); } }; Range.prototype.compileNode = function(o) { - var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3; + var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5; if (!this.fromVar) { this.compileVariables(o); } @@ -1127,8 +1116,8 @@ if (this.step !== this.stepVar) { varPart += ", " + this.step; } - _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1]; - condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [+this.fromNum, +this.toNum], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); + _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1]; + condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; if (namedIndex) { varPart = "" + idxName + " = " + varPart; @@ -1140,11 +1129,11 @@ }; Range.prototype.compileArray = function(o) { - var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results; + var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results; if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { range = (function() { _results = []; - for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); } + for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); } return _results; }).apply(this); if (this.exclusive) { @@ -1181,7 +1170,6 @@ })(Base); exports.Slice = Slice = (function(_super) { - __extends(Slice, _super); Slice.prototype.children = ['range']; @@ -1192,8 +1180,8 @@ } Slice.prototype.compileNode = function(o) { - var compiled, compiledText, from, fromCompiled, to, toStr, _ref2; - _ref2 = this.range, to = _ref2.to, from = _ref2.from; + var compiled, compiledText, from, fromCompiled, to, toStr, _ref4; + _ref4 = this.range, to = _ref4.to, from = _ref4.from; fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; if (to) { compiled = to.compileToFragments(o, LEVEL_PAREN); @@ -1210,7 +1198,6 @@ })(Base); exports.Obj = Obj = (function(_super) { - __extends(Obj, _super); function Obj(props, generated) { @@ -1230,7 +1217,7 @@ for (_i = 0, _len = props.length; _i < _len; _i++) { node = props[_i]; if (node instanceof Value) { - throw new Error('cannot have an implicit value in an implicit object'); + node.error('cannot have an implicit value in an implicit object'); } } } @@ -1241,6 +1228,9 @@ prop = props[i]; join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; indent = prop instanceof Comment ? '' : idt; + if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { + prop.variable.error('Invalid object key'); + } if (prop instanceof Value && prop["this"]) { prop = new Assign(prop.properties[0].name, prop, 'object'); } @@ -1268,10 +1258,10 @@ }; Obj.prototype.assigns = function(name) { - var prop, _i, _len, _ref2; - _ref2 = this.properties; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - prop = _ref2[_i]; + var prop, _i, _len, _ref4; + _ref4 = this.properties; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + prop = _ref4[_i]; if (prop.assigns(name)) { return true; } @@ -1284,7 +1274,6 @@ })(Base); exports.Arr = Arr = (function(_super) { - __extends(Arr, _super); function Arr(objs) { @@ -1305,11 +1294,11 @@ } answer = []; compiledObjs = (function() { - var _i, _len, _ref2, _results; - _ref2 = this.objects; + var _i, _len, _ref4, _results; + _ref4 = this.objects; _results = []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - obj = _ref2[_i]; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + obj = _ref4[_i]; _results.push(obj.compileToFragments(o, LEVEL_LIST)); } return _results; @@ -1321,7 +1310,7 @@ } answer.push.apply(answer, fragments); } - if ((fragmentsToText(answer)).indexOf('\n') >= 0) { + if (fragmentsToText(answer).indexOf('\n') >= 0) { answer.unshift(this.makeCode("[\n" + o.indent)); answer.push(this.makeCode("\n" + this.tab + "]")); } else { @@ -1332,10 +1321,10 @@ }; Arr.prototype.assigns = function(name) { - var obj, _i, _len, _ref2; - _ref2 = this.objects; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - obj = _ref2[_i]; + var obj, _i, _len, _ref4; + _ref4 = this.objects; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + obj = _ref4[_i]; if (obj.assigns(name)) { return true; } @@ -1348,7 +1337,6 @@ })(Base); exports.Class = Class = (function(_super) { - __extends(Class, _super); function Class(variable, parent, body) { @@ -1368,7 +1356,7 @@ } decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { - throw SyntaxError("variable name may not be " + decl); + this.variable.error("class variable name may not be " + decl); } return decl && (decl = IDENTIFIER.test(decl) && decl); }; @@ -1390,18 +1378,12 @@ }; Class.prototype.addBoundFunctions = function(o) { - var body, bound, func, lhs, name, rhs, _i, _len, _ref2, _ref3; - if (this.boundFuncs.length) { - o.scope.assign('_this', 'this'); - _ref2 = this.boundFuncs; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - _ref3 = _ref2[_i], name = _ref3[0], func = _ref3[1]; - lhs = new Value(new Literal("this"), [new Access(name)]); - body = new Block([new Return(new Literal("" + this.ctor.name + ".prototype." + name.value + ".apply(_this, arguments)"))]); - rhs = new Code(func.params, body, 'boundfunc'); - bound = new Assign(lhs, rhs); - this.ctor.body.unshift(bound); - } + var bvar, lhs, _i, _len, _ref4; + _ref4 = this.boundFuncs; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + bvar = _ref4[_i]; + lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); + this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); } }; @@ -1418,10 +1400,10 @@ func = assign.value; if (base.value === 'constructor') { if (this.ctor) { - throw new Error('cannot define more than one constructor in a class'); + assign.error('cannot define more than one constructor in a class'); } if (func.bound) { - throw new Error('cannot define a constructor as a bound function'); + assign.error('cannot define a constructor as a bound function'); } if (func instanceof Code) { assign = this.ctor = func; @@ -1438,7 +1420,7 @@ } else { assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); if (func instanceof Code && func.bound) { - this.boundFuncs.push([base, func]); + this.boundFuncs.push(base); func.bound = false; } } @@ -1454,15 +1436,15 @@ Class.prototype.walkBody = function(name, o) { var _this = this; return this.traverseChildren(false, function(child) { - var cont, exps, i, node, _i, _len, _ref2; + var cont, exps, i, node, _i, _len, _ref4; cont = true; if (child instanceof Class) { return false; } if (child instanceof Block) { - _ref2 = exps = child.expressions; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - node = _ref2[i]; + _ref4 = exps = child.expressions; + for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { + node = _ref4[i]; if (node instanceof Value && node.isObject(true)) { cont = false; exps[i] = _this.addProperties(node, name, o); @@ -1484,25 +1466,37 @@ return this.directives = expressions.splice(0, index); }; - Class.prototype.ensureConstructor = function(name) { - if (!this.ctor) { - this.ctor = new Code; + Class.prototype.ensureConstructor = function(name, o) { + var missing, ref, superCall; + missing = !this.ctor; + this.ctor || (this.ctor = new Code); + this.ctor.ctor = this.ctor.name = name; + this.ctor.klass = null; + this.ctor.noReturn = true; + if (missing) { if (this.parent) { - this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)")); + superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)"); } if (this.externalCtor) { - this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)")); + superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)"); } - this.ctor.body.makeReturn(); - this.body.expressions.unshift(this.ctor); + if (superCall) { + ref = new Literal(o.scope.freeVariable('ref')); + this.ctor.body.unshift(new Assign(ref, superCall)); + } + this.addBoundFunctions(o); + if (superCall) { + this.ctor.body.push(ref); + this.ctor.body.makeReturn(); + } + return this.body.expressions.unshift(this.ctor); + } else { + return this.addBoundFunctions(o); } - this.ctor.ctor = this.ctor.name = name; - this.ctor.klass = null; - return this.ctor.noReturn = true; }; Class.prototype.compileNode = function(o) { - var call, decl, klass, lname, name, params, _ref2; + var call, decl, klass, lname, name, params, _ref4; decl = this.determineName(); name = decl || '_Class'; if (name.reserved) { @@ -1512,14 +1506,13 @@ this.hoistDirectivePrologue(); this.setContext(name); this.walkBody(name, o); - this.ensureConstructor(name); + this.ensureConstructor(name, o); this.body.spaced = true; if (!(this.ctor instanceof Code)) { this.body.expressions.unshift(this.ctor); } this.body.expressions.push(lname); - (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives); - this.addBoundFunctions(o); + (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives); call = Closure.wrap(this.body); if (this.parent) { this.superClass = new Literal(o.scope.freeVariable('super', false)); @@ -1540,19 +1533,18 @@ })(Base); exports.Assign = Assign = (function(_super) { - __extends(Assign, _super); function Assign(variable, value, context, options) { - var forbidden, name, _ref2; + var forbidden, name, _ref4; this.variable = variable; this.value = value; this.context = context; this.param = options && options.param; this.subpattern = options && options.subpattern; - forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0); + forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0); if (forbidden && this.context !== 'object') { - throw SyntaxError("variable name may not be \"" + name + "\""); + this.variable.error("variable name may not be \"" + name + "\""); } } @@ -1571,7 +1563,7 @@ }; Assign.prototype.compileNode = function(o) { - var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4, _ref5; + var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7; if (isValue = this.variable instanceof Value) { if (this.variable.isArray() || this.variable.isObject()) { return this.compilePatternMatch(o); @@ -1579,15 +1571,16 @@ if (this.variable.isSplice()) { return this.compileSplice(o); } - if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') { + if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') { return this.compileConditional(o); } } compiledName = this.variable.compileToFragments(o, LEVEL_LIST); name = fragmentsToText(compiledName); if (!this.context) { - if (!(varBase = this.variable.unwrapAll()).isAssignable()) { - throw SyntaxError("\"" + (this.variable.compile(o)) + "\" cannot be assigned."); + varBase = this.variable.unwrapAll(); + if (!varBase.isAssignable()) { + this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); } if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { if (this.param) { @@ -1601,7 +1594,7 @@ if (match[1]) { this.value.klass = match[1]; } - this.value.name = (_ref3 = (_ref4 = (_ref5 = match[2]) != null ? _ref5 : match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5]; + this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5]; } val = this.value.compileToFragments(o, LEVEL_LIST); if (this.context === 'object') { @@ -1616,7 +1609,7 @@ }; Assign.prototype.compilePatternMatch = function(o) { - var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; top = o.level === LEVEL_TOP; value = this.value; objects = this.variable.base.objects; @@ -1631,15 +1624,15 @@ isObject = this.variable.isObject(); if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { if (obj instanceof Assign) { - _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value; + _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value; } else { idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); } acc = IDENTIFIER.test(idx.unwrap().value || 0); value = new Value(value); value.properties.push(new (acc ? Access : Index)(idx)); - if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) { - throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (value.compile(o))); + if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) { + obj.error("assignment to a reserved word: " + (obj.compile(o))); } return new Assign(obj, value, null, { param: this.param @@ -1659,10 +1652,10 @@ idx = i; if (isObject) { if (obj instanceof Assign) { - _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value; + _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value; } else { if (obj.base instanceof Parens) { - _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1]; + _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1]; } else { idx = obj["this"] ? obj.properties[0].name : obj; } @@ -1683,8 +1676,7 @@ } else { name = obj.unwrap().value; if (obj instanceof Splat) { - obj = obj.name.compileToFragments(o); - throw new SyntaxError("multiple splats are disallowed in an assignment: " + obj + "..."); + obj.error("multiple splats are disallowed in an assignment"); } if (typeof idx === 'number') { idx = new Literal(splat || idx); @@ -1695,7 +1687,7 @@ val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); } if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { - throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (val.compile(o))); + obj.error("assignment to a reserved word: " + (obj.compile(o))); } assigns.push(new Assign(obj, val, null, { param: this.param, @@ -1714,10 +1706,10 @@ }; Assign.prototype.compileConditional = function(o) { - var left, right, _ref2; - _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1]; + var left, right, _ref4; + _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1]; if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { - throw new Error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been defined."); + this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); } if (__indexOf.call(this.context, "?") >= 0) { o.isExistentialEquals = true; @@ -1726,11 +1718,11 @@ }; Assign.prototype.compileSplice = function(o) { - var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4; - _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive; + var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6; + _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive; name = this.variable.compile(o); if (from) { - _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1]; + _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1]; } else { fromDecl = fromRef = '0'; } @@ -1749,7 +1741,7 @@ } else { to = "9e9"; } - _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1]; + _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1]; answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); if (o.level > LEVEL_TOP) { return this.wrapInBraces(answer); @@ -1763,7 +1755,6 @@ })(Base); exports.Code = Code = (function(_super) { - __extends(Code, _super); function Code(params, body, tag) { @@ -1784,7 +1775,7 @@ Code.prototype.jumps = NO; Code.prototype.compileNode = function(o) { - var answer, code, exprs, i, idt, lit, name, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8; + var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8; o.scope = new Scope(o.scope, this.body, this); o.scope.shared = del(o, 'sharedScope'); o.indent += TAB; @@ -1792,22 +1783,20 @@ delete o.isExistentialEquals; params = []; exprs = []; - _ref2 = this.paramNames(); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - name = _ref2[_i]; + this.eachParamName(function(name) { if (!o.scope.check(name)) { - o.scope.parameter(name); + return o.scope.parameter(name); } - } - _ref3 = this.params; - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - param = _ref3[_j]; + }); + _ref4 = this.params; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + param = _ref4[_i]; if (!param.splat) { continue; } - _ref4 = this.params; - for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) { - p = _ref4[_k].name; + _ref5 = this.params; + for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) { + p = _ref5[_j].name; if (p["this"]) { p = p.properties[0].name; } @@ -1816,20 +1805,20 @@ } } splats = new Assign(new Value(new Arr((function() { - var _l, _len3, _ref5, _results; - _ref5 = this.params; + var _k, _len2, _ref6, _results; + _ref6 = this.params; _results = []; - for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) { - p = _ref5[_l]; + for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { + p = _ref6[_k]; _results.push(p.asReference(o)); } return _results; }).call(this))), new Value(new Literal('arguments'))); break; } - _ref5 = this.params; - for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) { - param = _ref5[_l]; + _ref6 = this.params; + for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { + param = _ref6[_k]; if (param.isComplex()) { val = ref = param.asReference(o); if (param.value) { @@ -1855,22 +1844,20 @@ exprs.unshift(splats); } if (exprs.length) { - (_ref6 = this.body.expressions).unshift.apply(_ref6, exprs); + (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); } - for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { + for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) { p = params[i]; params[i] = p.compileToFragments(o); o.scope.parameter(fragmentsToText(params[i])); } uniqs = []; - _ref7 = this.paramNames(); - for (_n = 0, _len5 = _ref7.length; _n < _len5; _n++) { - name = _ref7[_n]; + this.eachParamName(function(name, node) { if (__indexOf.call(uniqs, name) >= 0) { - throw SyntaxError("multiple parameters named '" + name + "'"); + node.error("multiple parameters named '" + name + "'"); } - uniqs.push(name); - } + return uniqs.push(name); + }); if (!(wasEmpty || this.noReturn)) { this.body.makeReturn(); } @@ -1888,7 +1875,7 @@ } code += '('; answer = [this.makeCode(code)]; - for (i = _o = 0, _len6 = params.length; _o < _len6; i = ++_o) { + for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { p = params[i]; if (i) { answer.push(this.makeCode(", ")); @@ -1910,15 +1897,15 @@ } }; - Code.prototype.paramNames = function() { - var names, param, _i, _len, _ref2; - names = []; - _ref2 = this.params; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - param = _ref2[_i]; - names.push.apply(names, param.names()); + Code.prototype.eachParamName = function(iterator) { + var param, _i, _len, _ref4, _results; + _ref4 = this.params; + _results = []; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + param = _ref4[_i]; + _results.push(param.eachName(iterator)); } - return names; + return _results; }; Code.prototype.traverseChildren = function(crossScope, func) { @@ -1932,16 +1919,15 @@ })(Base); exports.Param = Param = (function(_super) { - __extends(Param, _super); function Param(name, value, splat) { - var _ref2; + var _ref4; this.name = name; this.value = value; this.splat = splat; - if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) { - throw SyntaxError("parameter name \"" + name + "\" is not allowed"); + if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) { + this.name.error("parameter name \"" + name + "\" is not allowed"); } } @@ -1976,47 +1962,44 @@ return this.name.isComplex(); }; - Param.prototype.names = function(name) { - var atParam, names, obj, _i, _len, _ref2; + Param.prototype.eachName = function(iterator, name) { + var atParam, node, obj, _i, _len, _ref4; if (name == null) { name = this.name; } atParam = function(obj) { - var value; - value = obj.properties[0].name.value; - if (value.reserved) { - return []; - } else { - return [value]; + var node; + node = obj.properties[0].name; + if (!node.value.reserved) { + return iterator(node.value, node); } }; if (name instanceof Literal) { - return [name.value]; + return iterator(name.value, name); } if (name instanceof Value) { return atParam(name); } - names = []; - _ref2 = name.objects; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - obj = _ref2[_i]; + _ref4 = name.objects; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + obj = _ref4[_i]; if (obj instanceof Assign) { - names.push.apply(names, this.names(obj.value.unwrap())); + this.eachName(iterator, obj.value.unwrap()); } else if (obj instanceof Splat) { - names.push(obj.name.unwrap().value); + node = obj.name.unwrap(); + iterator(node.value, node); } else if (obj instanceof Value) { if (obj.isArray() || obj.isObject()) { - names.push.apply(names, this.names(obj.base)); + this.eachName(iterator, obj.base); } else if (obj["this"]) { - names.push.apply(names, atParam(obj)); + atParam(obj); } else { - names.push(obj.base.value); + iterator(obj.base.value, obj.base); } } else { - throw SyntaxError("illegal parameter " + (obj.compile())); + obj.error("illegal parameter " + (obj.compile())); } } - return names; }; return Param; @@ -2024,7 +2007,6 @@ })(Base); exports.Splat = Splat = (function(_super) { - __extends(Splat, _super); Splat.prototype.children = ['name']; @@ -2076,11 +2058,11 @@ return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); } base = (function() { - var _j, _len1, _ref2, _results; - _ref2 = list.slice(0, index); + var _j, _len1, _ref4, _results; + _ref4 = list.slice(0, index); _results = []; - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - node = _ref2[_j]; + for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { + node = _ref4[_j]; _results.push(node.compileToFragments(o, LEVEL_LIST)); } return _results; @@ -2095,7 +2077,6 @@ })(Base); exports.While = While = (function(_super) { - __extends(While, _super); function While(condition, options) { @@ -2146,7 +2127,7 @@ set = ''; body = this.body; if (body.isEmpty()) { - body = ''; + body = this.makeCode(''); } else { if (this.returns) { body.makeReturn(rvar = o.scope.freeVariable('results')); @@ -2221,17 +2202,17 @@ }; Op.prototype.isComplex = function() { - var _ref2; - return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex(); + var _ref4; + return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex(); }; Op.prototype.isChainable = function() { - var _ref2; - return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!=='; + var _ref4; + return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!=='; }; Op.prototype.invert = function() { - var allInvertable, curr, fst, op, _ref2; + var allInvertable, curr, fst, op, _ref4; if (this.isChainable() && this.first.isChainable()) { allInvertable = true; curr = this; @@ -2257,7 +2238,7 @@ return this; } else if (this.second) { return new Parens(this).invert(); - } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) { + } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) { return fst; } else { return new Op('!', this); @@ -2265,17 +2246,17 @@ }; Op.prototype.unfoldSoak = function(o) { - var _ref2; - return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first'); + var _ref4; + return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first'); }; Op.prototype.generateDo = function(exp) { - var call, func, param, passedParams, ref, _i, _len, _ref2; + var call, func, param, passedParams, ref, _i, _len, _ref4; passedParams = []; func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; - _ref2 = func.params || []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - param = _ref2[_i]; + _ref4 = func.params || []; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + param = _ref4[_i]; if (param.value) { passedParams.push(param.value); delete param.value; @@ -2289,16 +2270,16 @@ }; Op.prototype.compileNode = function(o) { - var answer, isChain, _ref2, _ref3; + var answer, isChain, _ref4, _ref5; isChain = this.isChainable() && this.first.isChainable(); if (!isChain) { this.first.front = this.front; } if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { - throw SyntaxError('delete operand may not be argument or var'); + this.error('delete operand may not be argument or var'); } - if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) { - throw SyntaxError('prefix increment/decrement may not have eval or arguments operand'); + if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) { + this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); } if (this.isUnary()) { return this.compileUnary(o); @@ -2318,8 +2299,8 @@ }; Op.prototype.compileChain = function(o) { - var fragments, fst, shared, _ref2; - _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1]; + var fragments, fst, shared, _ref4; + _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1]; fst = this.first.compileToFragments(o, LEVEL_OP); fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); return this.wrapInBraces(fragments); @@ -2327,7 +2308,7 @@ Op.prototype.compileExistence = function(o) { var fst, ref; - if (this.first.isComplex()) { + if (!o.isExistentialEquals && this.first.isComplex()) { ref = new Literal(o.scope.freeVariable('ref')); fst = new Parens(new Assign(ref, this.first)); } else { @@ -2374,7 +2355,6 @@ })(Base); exports.In = In = (function(_super) { - __extends(In, _super); function In(object, array) { @@ -2387,11 +2367,11 @@ In.prototype.invert = NEGATE; In.prototype.compileNode = function(o) { - var hasSplat, obj, _i, _len, _ref2; + var hasSplat, obj, _i, _len, _ref4; if (this.array instanceof Value && this.array.isArray()) { - _ref2 = this.array.base.objects; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - obj = _ref2[_i]; + _ref4 = this.array.base.objects; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + obj = _ref4[_i]; if (!(obj instanceof Splat)) { continue; } @@ -2406,16 +2386,16 @@ }; In.prototype.compileOrTest = function(o) { - var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4; + var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6; if (this.array.base.objects.length === 0) { return [this.makeCode("" + (!!this.negated))]; } - _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1]; - _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1]; + _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1]; + _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1]; tests = []; - _ref4 = this.array.base.objects; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - item = _ref4[i]; + _ref6 = this.array.base.objects; + for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) { + item = _ref6[i]; if (i) { tests.push(this.makeCode(cnj)); } @@ -2429,10 +2409,10 @@ }; In.prototype.compileLoopTest = function(o) { - var fragments, ref, sub, _ref2; - _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1]; + var fragments, ref, sub, _ref4; + _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1]; fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); - if ((fragmentsToText(sub)) === (fragmentsToText(ref))) { + if (fragmentsToText(sub) === fragmentsToText(ref)) { return fragments; } fragments = sub.concat(this.makeCode(', '), fragments); @@ -2452,12 +2432,11 @@ })(Base); exports.Try = Try = (function(_super) { - __extends(Try, _super); - function Try(attempt, error, recovery, ensure) { + function Try(attempt, errorVariable, recovery, ensure) { this.attempt = attempt; - this.error = error; + this.errorVariable = errorVariable; this.recovery = recovery; this.ensure = ensure; } @@ -2467,8 +2446,8 @@ Try.prototype.isStatement = YES; Try.prototype.jumps = function(o) { - var _ref2; - return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0); + var _ref4; + return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0); }; Try.prototype.makeReturn = function(res) { @@ -2485,27 +2464,7 @@ var catchPart, ensurePart, placeholder, tryPart; o.indent += TAB; tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); - catchPart = (function() { - var _base, _ref2; - if (this.recovery) { - if (typeof (_base = this.error).isObject === "function" ? _base.isObject() : void 0) { - placeholder = new Literal('_error'); - this.recovery.unshift(new Assign(this.error, placeholder)); - this.error = placeholder; - } - if (_ref2 = this.error.value, __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) { - throw SyntaxError("catch variable may not be \"" + this.error.value + "\""); - } - if (!o.scope.check(this.error.value)) { - o.scope.add(this.error.value, 'param'); - } - return [].concat(this.makeCode(" catch ("), this.error.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); - } else if (!(this.ensure || this.recovery)) { - return [this.makeCode(' catch (_error) {}')]; - } else { - return []; - } - }).call(this); + catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); }; @@ -2515,7 +2474,6 @@ })(Base); exports.Throw = Throw = (function(_super) { - __extends(Throw, _super); function Throw(expression) { @@ -2539,7 +2497,6 @@ })(Base); exports.Existence = Existence = (function(_super) { - __extends(Existence, _super); function Existence(expression) { @@ -2551,11 +2508,11 @@ Existence.prototype.invert = NEGATE; Existence.prototype.compileNode = function(o) { - var cmp, cnj, code, _ref2; + var cmp, cnj, code, _ref4; this.expression.front = this.front; code = this.expression.compile(o, LEVEL_OP); if (IDENTIFIER.test(code) && !o.scope.check(code)) { - _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1]; + _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1]; code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; } else { code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; @@ -2568,7 +2525,6 @@ })(Base); exports.Parens = Parens = (function(_super) { - __extends(Parens, _super); function Parens(body) { @@ -2606,28 +2562,30 @@ })(Base); exports.For = For = (function(_super) { - __extends(For, _super); function For(body, source) { - var _ref2; + var _ref4; this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; this.body = Block.wrap([body]); this.own = !!source.own; this.object = !!source.object; if (this.object) { - _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1]; + _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1]; } if (this.index instanceof Value) { - throw SyntaxError('index cannot be a pattern matching expression'); + this.index.error('index cannot be a pattern matching expression'); } this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; this.pattern = this.name instanceof Value; if (this.range && this.index) { - throw SyntaxError('indexes do not apply to range loops'); + this.index.error('indexes do not apply to range loops'); } if (this.range && this.pattern) { - throw SyntaxError('cannot pattern match over range loops'); + this.name.error('cannot pattern match over range loops'); + } + if (this.own && !this.object) { + this.index.error('cannot use own with for-in'); } this.returns = false; } @@ -2635,9 +2593,9 @@ For.prototype.children = ['body', 'source', 'guard', 'step']; For.prototype.compileNode = function(o) { - var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3; + var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5; body = Block.wrap([this.body]); - lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0; + lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0; if (lastJumps && lastJumps instanceof Return) { this.returns = false; } @@ -2658,7 +2616,7 @@ kvar = (this.range && name) || index || ivar; kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; if (this.step && !this.range) { - _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1]; + _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1]; stepNum = stepVar.match(SIMPLENUM); } if (this.pattern) { @@ -2748,24 +2706,24 @@ }; For.prototype.pluckDirectCall = function(o, body) { - var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; defs = []; - _ref2 = body.expressions; - for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) { - expr = _ref2[idx]; + _ref4 = body.expressions; + for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) { + expr = _ref4[idx]; expr = expr.unwrapAll(); if (!(expr instanceof Call)) { continue; } val = expr.variable.unwrapAll(); - if (!((val instanceof Code) || (val instanceof Value && ((_ref3 = val.base) != null ? _ref3.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref4 = (_ref5 = val.properties[0].name) != null ? _ref5.value : void 0) === 'call' || _ref4 === 'apply')))) { + if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) { continue; } - fn = ((_ref6 = val.base) != null ? _ref6.unwrapAll() : void 0) || val; + fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val; ref = new Literal(o.scope.freeVariable('fn')); base = new Value(ref); if (val.base) { - _ref7 = [base, val], val.base = _ref7[0], base = _ref7[1]; + _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1]; } body.expressions[idx] = new Call(base, expr.args); defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); @@ -2778,7 +2736,6 @@ })(While); exports.Switch = Switch = (function(_super) { - __extends(Switch, _super); function Switch(subject, cases, otherwise) { @@ -2792,49 +2749,49 @@ Switch.prototype.isStatement = YES; Switch.prototype.jumps = function(o) { - var block, conds, _i, _len, _ref2, _ref3, _ref4; + var block, conds, _i, _len, _ref4, _ref5, _ref6; if (o == null) { o = { block: true }; } - _ref2 = this.cases; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1]; + _ref4 = this.cases; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1]; if (block.jumps(o)) { return block; } } - return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0; + return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0; }; Switch.prototype.makeReturn = function(res) { - var pair, _i, _len, _ref2, _ref3; - _ref2 = this.cases; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - pair = _ref2[_i]; + var pair, _i, _len, _ref4, _ref5; + _ref4 = this.cases; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + pair = _ref4[_i]; pair[1].makeReturn(res); } if (res) { this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); } - if ((_ref3 = this.otherwise) != null) { - _ref3.makeReturn(res); + if ((_ref5 = this.otherwise) != null) { + _ref5.makeReturn(res); } return this; }; Switch.prototype.compileNode = function(o) { - var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4; + var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6; idt1 = o.indent + TAB; idt2 = o.indent = idt1 + TAB; fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); - _ref2 = this.cases; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1]; - _ref4 = flatten([conditions]); - for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { - cond = _ref4[_j]; + _ref4 = this.cases; + for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { + _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1]; + _ref6 = flatten([conditions]); + for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { + cond = _ref6[_j]; if (!this.subject) { cond = cond.invert(); } @@ -2864,7 +2821,6 @@ })(Base); exports.If = If = (function(_super) { - __extends(If, _super); function If(condition, body, options) { @@ -2881,13 +2837,13 @@ If.prototype.children = ['condition', 'body', 'elseBody']; If.prototype.bodyNode = function() { - var _ref2; - return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0; + var _ref4; + return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0; }; If.prototype.elseBodyNode = function() { - var _ref2; - return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0; + var _ref4; + return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0; }; If.prototype.addElse = function(elseBody) { @@ -2901,13 +2857,13 @@ }; If.prototype.isStatement = function(o) { - var _ref2; - return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0); + var _ref4; + return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0); }; If.prototype.jumps = function(o) { - var _ref2; - return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0); + var _ref4; + return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0); }; If.prototype.compileNode = function(o) { @@ -2991,19 +2947,20 @@ Closure = { wrap: function(expressions, statement, noReturn) { - var args, call, func, mentionsArgs, meth; + var args, argumentsNode, call, func, meth; if (expressions.jumps()) { return expressions; } func = new Code([], Block.wrap([expressions])); args = []; - if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) { - if (mentionsArgs && expressions.classBody) { - throw SyntaxError("Class bodies shouldn't reference arguments"); - } - meth = new Literal(mentionsArgs ? 'apply' : 'call'); + argumentsNode = expressions.contains(this.isLiteralArguments); + if (argumentsNode && expressions.classBody) { + argumentsNode.error("Class bodies shouldn't reference arguments"); + } + if (argumentsNode || expressions.contains(this.isLiteralThis)) { + meth = new Literal(argumentsNode ? 'apply' : 'call'); args = [new Literal('this')]; - if (mentionsArgs) { + if (argumentsNode) { args.push(new Literal('arguments')); } func = new Value(func, [new Access(meth)]); @@ -3016,10 +2973,10 @@ return call; } }, - literalArgs: function(node) { + isLiteralArguments: function(node) { return node instanceof Literal && node.value === 'arguments' && !node.asKey; }, - literalThis: function(node) { + isLiteralThis: function(node) { return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); } }; @@ -3038,6 +2995,9 @@ "extends": function() { return "function(child, parent) { for (var key in parent) { if (" + (utility('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; }"; }, + 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; }"; }, diff --git a/lib/coffee-script/optparse.js b/lib/coffee-script/optparse.js index f650fdd19e..0f19ae7dce 100644 --- a/lib/coffee-script/optparse.js +++ b/lib/coffee-script/optparse.js @@ -1,9 +1,10 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments; + var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; - exports.OptionParser = OptionParser = (function() { + repeat = require('./helpers').repeat; + exports.OptionParser = OptionParser = (function() { function OptionParser(rules, banner) { this.banner = banner; this.rules = buildRules(rules); @@ -67,7 +68,7 @@ for (_i = 0, _len = _ref.length; _i < _len; _i++) { rule = _ref[_i]; spaces = 15 - rule.longFlag.length; - spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; + spaces = spaces > 0 ? repeat(' ', spaces) : ''; letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); } diff --git a/lib/coffee-script/parser.js b/lib/coffee-script/parser.js index dde2e61fad..9f23cc473a 100755 --- a/lib/coffee-script/parser.js +++ b/lib/coffee-script/parser.js @@ -4,7 +4,7 @@ var parser = {trace: function trace() { }, yy: {}, symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":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,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, terminals_: {2:"error",6:"TERMINATOR",12:"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",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, -productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,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],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,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],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,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],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], +productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,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],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,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],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,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],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { var $0 = $$.length - 1; @@ -287,171 +287,171 @@ case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); break; case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); break; -case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); +case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); break; -case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); +case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); break; -case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); +case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); break; -case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); +case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); break; -case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { +case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); +break; +case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { guard: $$[$0] })); break; -case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { +case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { invert: true })); break; -case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { +case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { invert: true, guard: $$[$0] })); break; -case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); -break; -case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); break; case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); break; -case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); +case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); break; -case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); +case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); break; -case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); +case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); break; -case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); break; case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); break; -case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); +case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); break; -case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ +case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) }); break; -case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { +case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { $$[$0].own = $$[$0-1].own; $$[$0].name = $$[$0-1][0]; $$[$0].index = $$[$0-1][1]; return $$[$0]; }())); break; -case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); +case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); break; -case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { +case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { $$[$0].own = true; return $$[$0]; }())); break; -case 159:this.$ = $$[$0]; -break; case 160:this.$ = $$[$0]; break; -case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +case 161:this.$ = $$[$0]; break; case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; -case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); break; -case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); +case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); break; -case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ +case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: $$[$0] }); break; -case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ +case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: $$[$0], object: true }); break; -case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ +case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], guard: $$[$0] }); break; -case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ +case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], guard: $$[$0], object: true }); break; -case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ +case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], step: $$[$0] }); break; -case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ +case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ source: $$[$0-4], guard: $$[$0-2], step: $$[$0] }); break; -case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ +case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ source: $$[$0-4], step: $$[$0-2], guard: $$[$0] }); break; -case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); +case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); break; -case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); +case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); break; -case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); +case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); break; -case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); +case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); break; -case 176:this.$ = $$[$0]; +case 177:this.$ = $$[$0]; break; -case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); +case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); break; -case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); +case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); break; -case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); +case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); break; -case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { +case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { type: $$[$0-2] })); break; -case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { +case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { type: $$[$0-2] }))); break; -case 182:this.$ = $$[$0]; +case 183:this.$ = $$[$0]; break; -case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); +case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); break; -case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { +case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { type: $$[$0-1], statement: true })); break; -case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { +case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { type: $$[$0-1], statement: true })); break; -case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); +case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); break; -case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); +case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); break; -case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); +case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); break; -case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); +case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); break; -case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); +case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); break; -case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); +case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); break; -case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); +case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); break; -case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); +case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); break; -case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); +case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); break; -case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); -break; -case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); break; case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; @@ -459,7 +459,9 @@ case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[ break; case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; -case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { +case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { if ($$[$0-1].charAt(0) === '!') { return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); } else { @@ -467,17 +469,17 @@ case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { } }())); break; -case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); +case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); break; -case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); +case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); break; -case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); +case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); break; -case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); +case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); break; } }, -table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,130],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[2,186],105:[2,186],106:[2,186],109:88,110:[2,186],111:69,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,78],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,189],74:[2,72],78:[2,189],84:[2,72],85:[2,72],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:87,104:[2,139],105:[2,139],106:[2,139],109:88,110:[2,139],111:69,118:[2,139],126:[2,139],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,142],126:[2,142],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:87,104:[1,65],105:[2,151],106:[1,66],109:88,110:[1,68],111:69,118:[2,151],126:[2,151],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:87,104:[2,194],105:[2,194],106:[2,194],109:88,110:[2,194],111:69,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,78],133:[1,81],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,198],136:[2,198],137:[1,85]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:87,104:[1,65],105:[2,184],106:[1,66],109:88,110:[1,68],111:69,118:[2,184],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{27:258,28:[1,73],59:259,76:[1,70]},{120:260,122:219,123:[1,220]},{26:[1,261],121:[1,262],122:263,123:[1,220]},{26:[2,176],121:[2,176],123:[2,176]},{8:265,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:264,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:266,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:267,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,74],26:[1,268]},{8:269,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,271],25:[1,272],91:[1,270]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:273,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:274,54:[1,229]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{8:275,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:277},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:87,104:[2,165],105:[1,278],106:[2,165],109:88,110:[2,165],111:69,118:[1,279],126:[2,165],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,280],106:[2,166],109:88,110:[2,166],111:69,118:[2,166],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,282],25:[1,283],78:[1,281]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:284,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:285,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,286],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:287,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,288],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],86:[1,289]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:290,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:291,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:292,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,293],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:87,104:[2,203],105:[2,203],106:[2,203],109:88,110:[2,203],111:69,118:[2,203],126:[2,203],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:294,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:296,25:[1,5]},{5:297,25:[1,5]},{26:[1,298],121:[1,299],122:263,123:[1,220]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{5:300,25:[1,5]},{26:[2,177],121:[2,177],123:[2,177]},{5:301,25:[1,5],54:[1,302]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:303,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,304]},{91:[1,305],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:306,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:307,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,271],25:[1,272],26:[1,308]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[2,143],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[2,145],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,164],117:[2,164]},{8:309,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:312,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:313,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:314,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:315,54:[1,204]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{5:316,25:[1,5]},{26:[1,317]},{6:[1,318],26:[2,178],121:[2,178],123:[2,178]},{8:319,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:320,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[2,167],106:[2,167],109:88,110:[2,167],111:69,118:[1,321],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[1,322],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[2,168],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:323,54:[1,239]},{26:[1,324],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,325]},{26:[1,326]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],26:[1,327]},{8:328,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,282],25:[1,283],26:[1,330]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[2,170],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], +table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]}, parseError: function parseError(str, hash) { throw new Error(str); diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js index 37894a9bfa..6c79291365 100644 --- a/lib/coffee-script/repl.js +++ b/lib/coffee-script/repl.js @@ -1,6 +1,10 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var CoffeeScript, addMultilineHandler, merge, nodeREPL, replDefaults, vm; + var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref; + + fs = require('fs'); + + path = require('path'); vm = require('vm'); @@ -8,25 +12,28 @@ CoffeeScript = require('./coffee-script'); - merge = require('./helpers').merge; + _ref = require('./helpers'), merge = _ref.merge, prettyErrorMessage = _ref.prettyErrorMessage; replDefaults = { prompt: 'coffee> ', + historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, + historyMaxInputSize: 10240, "eval": function(input, context, filename, cb) { - var js; + var Assign, Block, Literal, Value, ast, err, js, _ref1; input = input.replace(/\uFF00/g, '\n'); - input = input.replace(/(^|[\r\n]+)(\s*)##?(?:[^#\r\n][^\r\n]*|)($|[\r\n])/, '$1$2$3'); - if (/^(\s*|\(\s*\))$/.test(input)) { - return cb(null); - } + input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); + _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal; try { - js = CoffeeScript.compile("_=(" + input + "\n)", { - filename: filename, - bare: true + ast = CoffeeScript.nodes(input); + ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); + js = ast.compile({ + bare: true, + locals: Object.keys(context) }); return cb(null, vm.runInContext(js, context, filename)); - } catch (err) { - return cb(err); + } catch (_error) { + err = _error; + return cb(prettyErrorMessage(err, filename, input, true)); } } }; @@ -85,18 +92,66 @@ }); }; + addHistory = function(repl, filename, maxSize) { + var buffer, fd, lastLine, readFd, size, stat; + lastLine = null; + try { + stat = fs.statSync(filename); + size = Math.min(maxSize, stat.size); + readFd = fs.openSync(filename, 'r'); + buffer = new Buffer(size); + fs.readSync(readFd, buffer, 0, size, stat.size - size); + repl.rli.history = buffer.toString().split('\n').reverse(); + if (stat.size > maxSize) { + repl.rli.history.pop(); + } + if (repl.rli.history[0] === '') { + repl.rli.history.shift(); + } + repl.rli.historyIndex = -1; + lastLine = repl.rli.history[0]; + } catch (_error) {} + fd = fs.openSync(filename, 'a'); + repl.rli.addListener('line', function(code) { + if (code && code.length && code !== '.history' && lastLine !== code) { + fs.write(fd, "" + code + "\n"); + return lastLine = code; + } + }); + repl.rli.on('exit', function() { + return fs.close(fd); + }); + return repl.commands['.history'] = { + help: 'Show command history', + action: function() { + repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); + return repl.displayPrompt(); + } + }; + }; + module.exports = { start: function(opts) { - var repl; + var build, major, minor, repl, _ref1; if (opts == null) { opts = {}; } + _ref1 = process.versions.node.split('.').map(function(n) { + return parseInt(n); + }), major = _ref1[0], minor = _ref1[1], build = _ref1[2]; + if (major === 0 && minor < 8) { + console.warn("Node 0.8.0+ required for CoffeeScript REPL"); + process.exit(1); + } opts = merge(replDefaults, opts); repl = nodeREPL.start(opts); repl.on('exit', function() { return repl.outputStream.write('\n'); }); addMultilineHandler(repl); + if (opts.historyFile) { + addHistory(repl, opts.historyFile, opts.historyMaxInputSize); + } return repl; } }; diff --git a/lib/coffee-script/rewriter.js b/lib/coffee-script/rewriter.js index b582bb295a..11f36a3e96 100644 --- a/lib/coffee-script/rewriter.js +++ b/lib/coffee-script/rewriter.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, + var BALANCED_PAIRS, 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; }, __slice = [].slice; @@ -12,7 +12,6 @@ }; exports.Rewriter = (function() { - function Rewriter() {} Rewriter.prototype.rewrite = function(tokens) { @@ -267,14 +266,14 @@ } stack.pop(); } - if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { + if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { if (tag === '?') { tag = token[0] = 'FUNC_EXIST'; } startImplicitCall(i + 1); return forward(2); } - if (this.matchTags(i, IMPLICIT_FUNC, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { + if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { startImplicitCall(i + 1); stack.push(['INDENT', i + 2]); return forward(3); @@ -331,22 +330,25 @@ Rewriter.prototype.addLocationDataToGeneratedTokens = function() { return this.scanTokens(function(token, i, tokens) { - var last_column, last_line, _ref, _ref1, _ref2; + var column, line, nextLocation, prevLocation, _ref, _ref1; if (token[2]) { return 1; } if (!(token.generated || token.explicit)) { return 1; } - _ref2 = (_ref = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) != null ? _ref : { - last_line: 0, - last_column: 0 - }, last_line = _ref2.last_line, last_column = _ref2.last_column; + if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { + line = nextLocation.first_line, column = nextLocation.first_column; + } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { + line = prevLocation.last_line, column = prevLocation.last_column; + } else { + line = column = 0; + } token[2] = { - first_line: last_line, - first_column: last_column, - last_line: last_line, - last_column: last_column + first_line: line, + first_column: column, + last_line: line, + last_column: column }; return 1; }); @@ -356,30 +358,35 @@ var action, condition, indent, outdent, starter; starter = indent = outdent = null; condition = function(token, i) { - var _ref; - return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN')); + var _ref, _ref1; + return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>')); }; action = function(token, i) { return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); }; return this.scanTokens(function(token, i, tokens) { - var tag, _ref, _ref1; + var j, tag, _i, _ref, _ref1; tag = token[0]; if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { tokens.splice(i, 1); return 0; } if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { - tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation(token)))); + tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation()))); return 2; } - if (tag === 'CATCH' && ((_ref = this.tag(i + 2)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { - tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation(token)))); - return 4; + if (tag === 'CATCH') { + for (j = _i = 1; _i <= 2; j = ++_i) { + if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { + continue; + } + tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); + return 2 + j; + } } if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { starter = tag; - _ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1]; + _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1]; if (starter === 'THEN') { indent.fromThen = true; } @@ -398,8 +405,10 @@ var action, condition, original; original = null; condition = function(token, i) { - var _ref; - return (_ref = token[0]) === 'TERMINATOR' || _ref === 'INDENT'; + var prevTag, tag; + tag = token[0]; + prevTag = this.tokens[i - 1][0]; + return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); }; action = function(token, i) { if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { @@ -416,7 +425,7 @@ }); }; - Rewriter.prototype.indentation = function(token, implicit) { + Rewriter.prototype.indentation = function(implicit) { var indent, outdent; if (implicit == null) { implicit = false; @@ -461,12 +470,10 @@ IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; - IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++']; + IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; IMPLICIT_UNSPACED_CALL = ['+', '-']; - IMPLICIT_BLOCK = ['->', '=>', '{', '[', ',']; - IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; diff --git a/lib/coffee-script/scope.js b/lib/coffee-script/scope.js index 41281734f9..a09ba97050 100644 --- a/lib/coffee-script/scope.js +++ b/lib/coffee-script/scope.js @@ -1,11 +1,10 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { var Scope, extend, last, _ref; _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; exports.Scope = Scope = (function() { - Scope.root = null; function Scope(parent, expressions, method) { diff --git a/lib/coffee-script/sourcemap.js b/lib/coffee-script/sourcemap.js index 245da945d8..4bb6f2589e 100644 --- a/lib/coffee-script/sourcemap.js +++ b/lib/coffee-script/sourcemap.js @@ -1,237 +1,161 @@ -// Generated by CoffeeScript 1.6.1 +// Generated by CoffeeScript 1.6.3 (function() { - var BASE64_CHARS, LineMapping, MAX_BASE64_VALUE, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK, decodeBase64Char, encodeBase64Char; + var LineMap, SourceMap; - LineMapping = (function() { - - function LineMapping(generatedLine) { - this.generatedLine = generatedLine; - this.columnMap = {}; - this.columnMappings = []; + LineMap = (function() { + function LineMap(line) { + this.line = line; + this.columns = []; } - LineMapping.prototype.addMapping = function(generatedColumn, _arg, options) { + LineMap.prototype.add = function(column, _arg, options) { var sourceColumn, sourceLine; sourceLine = _arg[0], sourceColumn = _arg[1]; if (options == null) { options = {}; } - if (this.columnMap[generatedColumn] && options.noReplace) { + if (this.columns[column] && options.noReplace) { return; } - this.columnMap[generatedColumn] = { - generatedLine: this.generatedLine, - generatedColumn: generatedColumn, + return this.columns[column] = { + line: this.line, + column: column, sourceLine: sourceLine, sourceColumn: sourceColumn }; - this.columnMappings.push(this.columnMap[generatedColumn]); - return this.columnMappings.sort(function(a, b) { - return a.generatedColumn - b.generatedColumn; - }); }; - LineMapping.prototype.getSourcePosition = function(generatedColumn) { - var answer, columnMapping, lastColumnMapping, _i, _len, _ref; - answer = null; - lastColumnMapping = null; - _ref = this.columnMappings; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - columnMapping = _ref[_i]; - if (columnMapping.generatedColumn > generatedColumn) { - break; - } else { - lastColumnMapping = columnMapping; - } - } - if (lastColumnMapping) { - return answer = [lastColumnMapping.sourceLine, lastColumnMapping.sourceColumn]; + LineMap.prototype.sourceLocation = function(column) { + var mapping; + while (!((mapping = this.columns[column]) || (column <= 0))) { + column--; } + return mapping && [mapping.sourceLine, mapping.sourceColumn]; }; - return LineMapping; + return LineMap; })(); - exports.SourceMap = (function() { + SourceMap = (function() { + var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; function SourceMap() { - this.generatedLines = []; + this.lines = []; } - SourceMap.prototype.addMapping = function(sourceLocation, generatedLocation, options) { - var generatedColumn, generatedLine, lineMapping; + SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { + var column, line, lineMap, _base; if (options == null) { options = {}; } - generatedLine = generatedLocation[0], generatedColumn = generatedLocation[1]; - lineMapping = this.generatedLines[generatedLine]; - if (!lineMapping) { - lineMapping = this.generatedLines[generatedLine] = new LineMapping(generatedLine); - } - return lineMapping.addMapping(generatedColumn, sourceLocation, options); + line = generatedLocation[0], column = generatedLocation[1]; + lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); + return lineMap.add(column, sourceLocation, options); }; - SourceMap.prototype.getSourcePosition = function(_arg) { - var answer, generatedColumn, generatedLine, lineMapping; - generatedLine = _arg[0], generatedColumn = _arg[1]; - answer = null; - lineMapping = this.generatedLines[generatedLine]; - if (!lineMapping) { - - } else { - answer = lineMapping.getSourcePosition(generatedColumn); + SourceMap.prototype.sourceLocation = function(_arg) { + var column, line, lineMap; + line = _arg[0], column = _arg[1]; + while (!((lineMap = this.lines[line]) || (line <= 0))) { + line--; } - return answer; + return lineMap && lineMap.sourceLocation(column); }; - SourceMap.prototype.forEachMapping = function(fn) { - var columnMapping, generatedLineNumber, lineMapping, _i, _len, _ref, _results; - _ref = this.generatedLines; - _results = []; - for (generatedLineNumber = _i = 0, _len = _ref.length; _i < _len; generatedLineNumber = ++_i) { - lineMapping = _ref[generatedLineNumber]; - if (lineMapping) { - _results.push((function() { - var _j, _len1, _ref1, _results1; - _ref1 = lineMapping.columnMappings; - _results1 = []; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - columnMapping = _ref1[_j]; - _results1.push(fn(columnMapping)); + SourceMap.prototype.generate = function(options, code) { + var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; + if (options == null) { + options = {}; + } + if (code == null) { + code = null; + } + writingline = 0; + lastColumn = 0; + lastSourceLine = 0; + lastSourceColumn = 0; + needComma = false; + buffer = ""; + _ref = this.lines; + for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { + lineMap = _ref[lineNumber]; + if (lineMap) { + _ref1 = lineMap.columns; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + mapping = _ref1[_j]; + if (!(mapping)) { + continue; } - return _results1; - })()); - } else { - _results.push(void 0); + while (writingline < mapping.line) { + lastColumn = 0; + needComma = false; + buffer += ";"; + writingline++; + } + if (needComma) { + buffer += ","; + needComma = false; + } + buffer += this.encodeVlq(mapping.column - lastColumn); + lastColumn = mapping.column; + buffer += this.encodeVlq(0); + buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); + lastSourceLine = mapping.sourceLine; + buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); + lastSourceColumn = mapping.sourceColumn; + needComma = true; + } } } - return _results; - }; - - return SourceMap; - - })(); - - exports.generateV3SourceMap = function(sourceMap, sourceFile, generatedFile) { - var answer, lastGeneratedColumnWritten, lastSourceColumnWritten, lastSourceLineWritten, mappings, needComma, writingGeneratedLine; - if (sourceFile == null) { - sourceFile = null; - } - if (generatedFile == null) { - generatedFile = null; - } - writingGeneratedLine = 0; - lastGeneratedColumnWritten = 0; - lastSourceLineWritten = 0; - lastSourceColumnWritten = 0; - needComma = false; - mappings = ""; - sourceMap.forEachMapping(function(mapping) { - while (writingGeneratedLine < mapping.generatedLine) { - lastGeneratedColumnWritten = 0; - needComma = false; - mappings += ";"; - writingGeneratedLine++; - } - if (needComma) { - mappings += ","; - needComma = false; + v3 = { + version: 3, + file: options.generatedFile || '', + sourceRoot: options.sourceRoot || '', + sources: options.sourceFiles || [''], + names: [], + mappings: buffer + }; + if (options.inline) { + v3.sourcesContent = [code]; } - mappings += exports.vlqEncodeValue(mapping.generatedColumn - lastGeneratedColumnWritten); - lastGeneratedColumnWritten = mapping.generatedColumn; - mappings += exports.vlqEncodeValue(0); - mappings += exports.vlqEncodeValue(mapping.sourceLine - lastSourceLineWritten); - lastSourceLineWritten = mapping.sourceLine; - mappings += exports.vlqEncodeValue(mapping.sourceColumn - lastSourceColumnWritten); - lastSourceColumnWritten = mapping.sourceColumn; - return needComma = true; - }); - answer = { - version: 3, - file: generatedFile, - sourceRoot: "", - sources: sourceFile ? [sourceFile] : [], - names: [], - mappings: mappings + return JSON.stringify(v3, null, 2); }; - return JSON.stringify(answer, null, 2); - }; - exports.loadV3SourceMap = function(sourceMap) { - return todo(); - }; + VLQ_SHIFT = 5; - BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; - MAX_BASE64_VALUE = BASE64_CHARS.length - 1; + VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; - encodeBase64Char = function(value) { - if (value > MAX_BASE64_VALUE) { - throw new Error("Cannot encode value " + value + " > " + MAX_BASE64_VALUE); - } else if (value < 0) { - throw new Error("Cannot encode value " + value + " < 0"); - } - return BASE64_CHARS[value]; - }; - - decodeBase64Char = function(char) { - var value; - value = BASE64_CHARS.indexOf(char); - if (value === -1) { - throw new Error("Invalid Base 64 character: " + char); - } - return value; - }; + SourceMap.prototype.encodeVlq = function(value) { + var answer, nextChunk, signBit, valueToEncode; + answer = ''; + signBit = value < 0 ? 1 : 0; + valueToEncode = (Math.abs(value) << 1) + signBit; + while (valueToEncode || !answer) { + nextChunk = valueToEncode & VLQ_VALUE_MASK; + valueToEncode = valueToEncode >> VLQ_SHIFT; + if (valueToEncode) { + nextChunk |= VLQ_CONTINUATION_BIT; + } + answer += this.encodeBase64(nextChunk); + } + return answer; + }; - VLQ_SHIFT = 5; + BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; + SourceMap.prototype.encodeBase64 = function(value) { + return BASE64_CHARS[value] || (function() { + throw new Error("Cannot Base64 encode value: " + value); + })(); + }; - VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; + return SourceMap; - exports.vlqEncodeValue = function(value) { - var answer, nextVlqChunk, signBit, valueToEncode; - signBit = value < 0 ? 1 : 0; - valueToEncode = (Math.abs(value) << 1) + signBit; - answer = ""; - while (valueToEncode || !answer) { - nextVlqChunk = valueToEncode & VLQ_VALUE_MASK; - valueToEncode = valueToEncode >> VLQ_SHIFT; - if (valueToEncode) { - nextVlqChunk |= VLQ_CONTINUATION_BIT; - } - answer += encodeBase64Char(nextVlqChunk); - } - return answer; - }; + })(); - exports.vlqDecodeValue = function(str, offset) { - var consumed, continuationShift, done, nextChunkValue, nextVlqChunk, position, signBit, value; - if (offset == null) { - offset = 0; - } - position = offset; - done = false; - value = 0; - continuationShift = 0; - while (!done) { - nextVlqChunk = decodeBase64Char(str[position]); - position += 1; - nextChunkValue = nextVlqChunk & VLQ_VALUE_MASK; - value += nextChunkValue << continuationShift; - if (!(nextVlqChunk & VLQ_CONTINUATION_BIT)) { - done = true; - } - continuationShift += VLQ_SHIFT; - } - consumed = position - offset; - signBit = value & 1; - value = value >> 1; - if (signBit) { - value = -value; - } - return [value, consumed]; - }; + module.exports = SourceMap; }).call(this); diff --git a/package.json b/package.json index 0cd134d94d..5a1eff496a 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,13 @@ "description": "Unfancy JavaScript", "keywords": ["javascript", "language", "coffeescript", "compiler"], "author": "Jeremy Ashkenas", - "version": "1.6.1", + "version": "1.6.3", "licenses": [{ "type": "MIT", "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE" }], "engines": { - "node": ">=0.4.0" + "node": ">=0.8.0" }, "directories" : { "lib" : "./lib/coffee-script" diff --git a/src/browser.coffee b/src/browser.coffee index da208d47e8..2b3d887715 100644 --- a/src/browser.coffee +++ b/src/browser.coffee @@ -1,27 +1,43 @@ -# Override exported methods for non-Node.js engines. +# This **Browser** compatibility layer extends core CoffeeScript functions +# to make things work smoothly when compiling code directly in the browser. +# We add support for loading remote Coffee scripts via **XHR**, and +# `text/coffeescript` script tags, source maps via data-URLs, and so on. CoffeeScript = require './coffee-script' CoffeeScript.require = require +compile = CoffeeScript.compile # Use standard JavaScript `eval` to eval code. CoffeeScript.eval = (code, options = {}) -> options.bare ?= on - eval CoffeeScript.compile code, options + eval compile code, options # Running code does not provide access to this scope. CoffeeScript.run = (code, options = {}) -> options.bare = on - Function(CoffeeScript.compile code, options)() + options.shiftLine = on + Function(compile code, options)() # If we're not in a browser environment, we're finished with the public API. return unless window? +# Include source maps where possible. If we've got a base64 encoder, a +# JSON serializer, and tools for escaping unicode characters, we're good to go. +# Ported from https://developer.mozilla.org/en-US/docs/DOM/window.btoa +if btoa? and JSON? and unescape? and encodeURIComponent? + compile = (code, options = {}) -> + options.sourceMap = true + options.inline = true + {js, v3SourceMap} = CoffeeScript.compile code, options + "#{js}\n//@ sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//@ sourceURL=coffeescript" + # Load a remote script from the current domain via XHR. CoffeeScript.load = (url, callback, options = {}) -> + options.sourceFiles = [url] xhr = if window.ActiveXObject new window.ActiveXObject('Microsoft.XMLHTTP') else - new XMLHttpRequest() + new window.XMLHttpRequest() xhr.open 'GET', url, true xhr.overrideMimeType 'text/plain' if 'overrideMimeType' of xhr xhr.onreadystatechange = -> @@ -37,7 +53,7 @@ CoffeeScript.load = (url, callback, options = {}) -> # all script tags with a content-type of `text/coffeescript`. # This happens on page load. runScripts = -> - scripts = document.getElementsByTagName 'script' + scripts = window.document.getElementsByTagName 'script' coffeetypes = ['text/coffeescript', 'text/literate-coffeescript'] coffees = (s for s in scripts when s.type in coffeetypes) index = 0 @@ -50,12 +66,13 @@ runScripts = -> if script.src CoffeeScript.load script.src, execute, options else + options.sourceFiles = ['embedded'] CoffeeScript.run script.innerHTML, options execute() null -# Listen for window load, both in browsers and in IE. +# Listen for window load, both in decent browsers and in IE. if window.addEventListener - addEventListener 'DOMContentLoaded', runScripts, no + window.addEventListener 'DOMContentLoaded', runScripts, no else - attachEvent 'onload', runScripts + window.attachEvent 'onload', runScripts diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee index 11eae944c6..11e639b054 100644 --- a/src/coffee-script.coffee +++ b/src/coffee-script.coffee @@ -1,77 +1,59 @@ # CoffeeScript can be used both on the server, as a command-line compiler based -# on Node.js/V8, or to run CoffeeScripts directly in the browser. This module +# on Node.js/V8, or to run CoffeeScript directly in the browser. This module # contains the main entry functions for tokenizing, parsing, and compiling # source CoffeeScript into JavaScript. -# -# If included on a webpage, it will automatically sniff out, compile, and -# execute all scripts present in `text/coffeescript` tags. - -fs = require 'fs' -path = require 'path' -{Lexer} = require './lexer' -{parser} = require './parser' -helpers = require './helpers' -vm = require 'vm' -sourcemap = require './sourcemap' - -# Load and run a CoffeeScript file for Node, stripping any `BOM`s. -loadFile = (module, filename) -> - raw = fs.readFileSync filename, 'utf8' - stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw - module._compile compile(stripped, {filename, literate: helpers.isLiterate filename}), filename -if require.extensions - for ext in ['.coffee', '.litcoffee', '.md', '.coffee.md'] - require.extensions[ext] = loadFile +fs = require 'fs' +vm = require 'vm' +path = require 'path' +child_process = require 'child_process' +{Lexer} = require './lexer' +{parser} = require './parser' +helpers = require './helpers' +SourceMap = require './sourcemap' # The current CoffeeScript version number. -exports.VERSION = '1.6.1' +exports.VERSION = '1.6.3' # Expose helpers for testing. exports.helpers = helpers # Compile CoffeeScript code to JavaScript, using the Coffee/Jison compiler. # -# If `options.sourceMap` is specified, then `options.filename` must also be specified. +# If `options.sourceMap` is specified, then `options.filename` must also be specified. All +# options that can be passed to `SourceMap#generate` may also be passed here. # # This returns a javascript string, unless `options.sourceMap` is passed, -# in which case this returns a `{js, v3SourceMap, sourceMap} +# in which case this returns a `{js, v3SourceMap, sourceMap}` # object, where sourceMap is a sourcemap.coffee#SourceMap object, handy for doing programatic # lookups. exports.compile = compile = (code, options = {}) -> - {merge} = exports.helpers - try + {merge} = helpers + + if options.sourceMap + map = new SourceMap + fragments = parser.parse(lexer.tokenize code, options).compileToFragments options + + currentLine = 0 + currentLine += 1 if options.header + currentLine += 1 if options.shiftLine + currentColumn = 0 + js = "" + for fragment in fragments + # Update the sourcemap with data from each fragment if options.sourceMap - coffeeFile = helpers.baseFileName options.filename - jsFile = helpers.baseFileName(options.filename, yes) + ".js" - sourceMap = new sourcemap.SourceMap() - - fragments = (parser.parse lexer.tokenize(code, options)).compileToFragments options - - currentLine = 0 - currentLine += 1 if options.header - currentLine += 1 if options.sourceMap - currentColumn = 0 - js = "" - for fragment in fragments - # Update the sourcemap with data from each fragment - if sourceMap - if fragment.locationData - sourceMap.addMapping( - [fragment.locationData.first_line, fragment.locationData.first_column], - [currentLine, currentColumn], - {noReplace: true}) - newLines = helpers.count fragment.code, "\n" - currentLine += newLines - currentColumn = fragment.code.length - (if newLines then fragment.code.lastIndexOf "\n" else 0) - - # Copy the code from each fragment into the final JavaScript. - js += fragment.code - - catch err - err.message = "In #{options.filename}, #{err.message}" if options.filename - throw err + if fragment.locationData + map.add( + [fragment.locationData.first_line, fragment.locationData.first_column] + [currentLine, currentColumn] + {noReplace: true}) + newLines = helpers.count fragment.code, "\n" + currentLine += newLines + currentColumn = fragment.code.length - (if newLines then fragment.code.lastIndexOf "\n" else 0) + + # Copy the code from each fragment into the final JavaScript. + js += fragment.code if options.header header = "Generated by CoffeeScript #{@VERSION}" @@ -79,9 +61,8 @@ exports.compile = compile = (code, options = {}) -> if options.sourceMap answer = {js} - if sourceMap - answer.sourceMap = sourceMap - answer.v3SourceMap = sourcemap.generateV3SourceMap sourceMap, coffeeFile, jsFile + answer.sourceMap = map + answer.v3SourceMap = map.generate(options, code) answer else js @@ -103,20 +84,25 @@ exports.nodes = (source, options) -> # setting `__filename`, `__dirname`, and relative `require()`. exports.run = (code, options = {}) -> mainModule = require.main - + options.sourceMap ?= true # Set the filename. mainModule.filename = process.argv[1] = - if options.filename then fs.realpathSync(options.filename) else '.' + if options.filename then fs.realpathSync(options.filename) else '.' # Clear the module cache. mainModule.moduleCache and= {} # Assign paths for node_modules loading - mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename + mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename or '.' # Compile. if not helpers.isCoffee(mainModule.filename) or require.extensions - mainModule._compile compile(code, options), mainModule.filename + answer = compile(code, options) + # Attach sourceMap object to sourceMaps[options.filename] so that + # it is accessible by Error.prepareStackTrace. + do patchStackTrace + sourceMaps[mainModule.filename] = answer.sourceMap + mainModule._compile answer.js, mainModule.filename else mainModule._compile code, mainModule.filename @@ -156,6 +142,55 @@ exports.eval = (code, options = {}) -> else vm.runInContext js, sandbox +# Load and run a CoffeeScript file for Node, stripping any `BOM`s. +loadFile = (module, filename) -> + raw = fs.readFileSync filename, 'utf8' + stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw + answer = compile(stripped, {filename, sourceMap: true, literate: helpers.isLiterate filename}) + sourceMaps[filename] = answer.sourceMap + module._compile answer.js, filename + +# If the installed version of Node supports `require.extensions`, register +# CoffeeScript as an extension. +if require.extensions + for ext in ['.coffee', '.litcoffee', '.coffee.md'] + require.extensions[ext] = loadFile + + # Patch Node's module loader to be able to handle mult-dot extensions. + # This is a horrible thing that should not be required. Perhaps, one day, + # when a truly benevolent dictator comes to rule over the Republik of Node, + # it won't be. + Module = require 'module' + + findExtension = (filename) -> + extensions = path.basename(filename).split '.' + # Remove the initial dot from dotfiles. + extensions.shift() if extensions[0] is '' + # Start with the longest possible extension and work our way shortwards. + while extensions.shift() + curExtension = '.' + extensions.join '.' + return curExtension if Module._extensions[curExtension] + '.js' + + Module::load = (filename) -> + @filename = filename + @paths = Module._nodeModulePaths path.dirname filename + extension = findExtension filename + Module._extensions[extension](this, filename) + @loaded = true + +# If we're on Node, patch `child_process.fork` so that Coffee scripts are able +# to fork both CoffeeScript files, and JavaScript files, directly. +if child_process + {fork} = child_process + child_process.fork = (path, args = [], options = {}) -> + execPath = if helpers.isCoffee(path) then 'coffee' else null + if not Array.isArray args + args = [] + options = args or {} + options.execPath or= execPath + fork path, args, options + # Instantiate a Lexer for our use here. lexer = new Lexer @@ -177,4 +212,103 @@ parser.lexer = upcomingInput: -> "" +# Make all the AST nodes visible to the parser. parser.yy = require './nodes' + +# Override Jison's default error handling function. +parser.yy.parseError = (message, {token}) -> + # Disregard Jison's message, it contains redundant line numer information. + message = "unexpected #{if token is 1 then 'end of input' else token}" + # The second argument has a `loc` property, which should have the location + # data for this token. Unfortunately, Jison seems to send an outdated `loc` + # (from the previous token), so we take the location information directly + # from the lexer. + helpers.throwSyntaxError message, parser.lexer.yylloc + +# Based on [michaelficarra/CoffeeScriptRedux](http://goo.gl/ZTx1p) +# NodeJS / V8 have no support for transforming positions in stack traces using +# sourceMap, so we must monkey-patch Error to display CoffeeScript source +# positions. + +patched = false + +# Map of filenames -> sourceMap object. +sourceMaps = {} + +patchStackTrace = -> + return if patched + patched = true + mainModule = require.main + + # (Assigning to a property of the Module object in the normal module cache is + # unsuitable, because node deletes those objects from the cache if an + # exception is thrown in the module body.) + + Error.prepareStackTrace = (err, stack) -> + sourceFiles = {} + + getSourceMapping = (filename, line, column) -> + sourceMap = sourceMaps[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 + " at #{formatSourcePosition frame, getSourceMapping}" + + "#{err.name}: #{err.message ? ''}\n#{frames.join '\n'}\n" + +# Based on http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js +# Modified to handle sourceMap +formatSourcePosition = (frame, getSourceMapping) -> + fileName = undefined + fileLocation = '' + + if frame.isNative() + fileLocation = "native" + else + if frame.isEval() + fileName = frame.getScriptNameOrSourceURL() + fileLocation = "#{frame.getEvalOrigin()}, " unless fileName + else + fileName = frame.getFileName() + + fileName or= "" + + line = frame.getLineNumber() + column = frame.getColumnNumber() + + # Check for a sourceMap position + source = getSourceMapping fileName, line, column + fileLocation = + if source + "#{fileName}:#{source[0]}:#{source[1]}, :#{line}:#{column}" + else + "#{fileName}:#{line}:#{column}" + + + functionName = frame.getFunctionName() + isConstructor = frame.isConstructor() + isMethodCall = not (frame.isToplevel() or isConstructor) + + if isMethodCall + methodName = frame.getMethodName() + typeName = frame.getTypeName() + + if functionName + tp = as = '' + if typeName and functionName.indexOf typeName + tp = "#{typeName}." + if methodName and functionName.indexOf(".#{methodName}") isnt functionName.length - methodName.length - 1 + as = " [as #{methodName}]" + + "#{tp}#{functionName}#{as} (#{fileLocation})" + else + "#{typeName}.#{methodName or ''} (#{fileLocation})" + else if isConstructor + "new #{functionName or ''} (#{fileLocation})" + else if functionName + "#{functionName} (#{fileLocation})" + else + fileLocation + diff --git a/src/command.coffee b/src/command.coffee index 50ad8bb94d..f7399f7ff2 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -1,7 +1,7 @@ # The `coffee` utility. Handles command-line compilation of CoffeeScript -# into various forms: saved into `.js` files or printed to stdout, piped to -# [JavaScript Lint](http://javascriptlint.com/) or recompiled every time the source is -# saved, printed as a token stream or as the syntax tree, or launch an +# into various forms: saved into `.js` files or printed to stdout +# or recompiled every time the source is saved, +# printed as a token stream or as the syntax tree, or launch an # interactive REPL. # External dependencies. @@ -14,6 +14,7 @@ CoffeeScript = require './coffee-script' {EventEmitter} = require 'events' exists = fs.exists or path.exists +useWinPathSep = path.sep is '\\' # Allow CoffeeScript to emit Node.js events. helpers.extend CoffeeScript, new EventEmitter @@ -38,13 +39,13 @@ SWITCHES = [ ['-h', '--help', 'display this help message'] ['-i', '--interactive', 'run an interactive CoffeeScript REPL'] ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'] - ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'] ['-m', '--map', 'generate source map and save as .map files'] ['-n', '--nodes', 'print out the parse tree that the parser produces'] [ '--nodejs [ARGS]', 'pass options directly to the "node" binary'] ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'] ['-p', '--print', 'print out the compiled JavaScript'] ['-s', '--stdio', 'listen for and compile scripts over stdio'] + ['-l', '--literate', 'treat stdio as literate style coffee-script'] ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'] ['-v', '--version', 'display the version number'] ['-w', '--watch', 'watch scripts for changes and rerun commands'] @@ -67,7 +68,7 @@ exports.run = -> return usage() if opts.help return version() if opts.version return require('./repl').start() if opts.interactive - if opts.watch and !fs.watch + if opts.watch and not fs.watch return printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}." return compileStdio() if opts.stdio return compileScript null, sources[0] if opts.eval @@ -112,9 +113,9 @@ compilePath = (source, topLevel, base) -> # Compile a single source script, containing the given code, according to the # requested options. If evaluating the script directly sets `__filename`, # `__dirname` and `module.filename` to be correct relative to the script's path. -compileScript = (file, input, base) -> +compileScript = (file, input, base=null) -> o = opts - options = compileOptions file + options = compileOptions file, base try t = task = {file, input, options} CoffeeScript.emit 'compile', task @@ -122,6 +123,7 @@ compileScript = (file, input, base) -> else if o.nodes then printLine CoffeeScript.nodes(t.input, t.options).toString().trim() else if o.run then CoffeeScript.run t.input, t.options else if o.join and t.file isnt o.join + t.input = helpers.invertLiterate t.input if helpers.isLiterate file sourceCode[sources.indexOf(t.file)] = t.input compileJoin() else @@ -134,16 +136,18 @@ compileScript = (file, input, base) -> CoffeeScript.emit 'success', task if o.print printLine t.output.trim() - else if o.compile || o.map - writeJs base, t.file, t.output, t.sourceMap - else if o.lint - lint t.file, t.output + else if o.compile or o.map + writeJs base, t.file, t.output, options.jsPath, t.sourceMap catch err CoffeeScript.emit 'failure', err, task return if CoffeeScript.listeners('failure').length - return printLine err.message + '\x07' if o.watch - printWarn err instanceof Error and err.stack or "ERROR: #{err}" - process.exit 1 + useColors = process.stdout.isTTY and not process.env.NODE_DISABLE_COLORS + message = helpers.prettyErrorMessage err, file or '[stdin]', input, useColors + if o.watch + printLine message + '\x07' + else + printWarn message + process.exit 1 # Attach the appropriate listeners to compile scripts incoming over **stdin**, # and write them back to **stdout**. @@ -167,7 +171,7 @@ compileJoin = -> # Watch a source CoffeeScript file using `fs.watch`, recompiling it every # time the file is updated. May be used in combination with other options, -# such as `--lint` or `--print`. +# such as `--print`. watch = (source, base) -> prevStats = null @@ -251,7 +255,7 @@ removeSource = (source, base, removeJs) -> # Get the corresponding output JavaScript path for a source file. outputPath = (source, base, extension=".js") -> - basename = helpers.baseFileName source, yes + basename = helpers.baseFileName source, yes, useWinPathSep srcDir = path.dirname source baseDir = if base is '.' then srcDir else srcDir.substring base.length dir = if opts.output then path.join opts.output, baseDir else srcDir @@ -263,14 +267,13 @@ outputPath = (source, base, extension=".js") -> # # If `generatedSourceMap` is provided, this will write a `.map` file into the # same directory as the `.js` file. -writeJs = (base, sourcePath, js, generatedSourceMap = null) -> - jsPath = outputPath sourcePath, base +writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) -> sourceMapPath = outputPath sourcePath, base, ".map" jsDir = path.dirname jsPath compile = -> if opts.compile js = ' ' if js.length <= 0 - if generatedSourceMap then js = "//@ sourceMappingURL=#{helpers.baseFileName sourceMapPath}\n#{js}" + if generatedSourceMap then js = "#{js}\n/*\n//@ sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n*/\n" fs.writeFile jsPath, js, (err) -> if err printLine err.message @@ -290,17 +293,6 @@ wait = (milliseconds, func) -> setTimeout func, milliseconds timeLog = (message) -> console.log "#{(new Date).toLocaleTimeString()} - #{message}" -# Pipe compiled JS through JSLint (requires a working `jsl` command), printing -# any errors or warnings that arise. -lint = (file, js) -> - printIt = (buffer) -> printLine file + ':\t' + buffer.toString().trim() - conf = __dirname + '/../../extras/jsl.conf' - jsl = spawn 'jsl', ['-nologo', '-stdin', '-conf', conf] - jsl.stdout.on 'data', printIt - jsl.stderr.on 'data', printIt - jsl.stdin.write js - jsl.stdin.end() - # Pretty-print a stream of tokens, sans location data. printTokens = (tokens) -> strings = for token in tokens @@ -315,21 +307,38 @@ parseOptions = -> optionParser = new optparse.OptionParser SWITCHES, BANNER o = opts = optionParser.parse process.argv[2..] o.compile or= !!o.output - o.run = not (o.compile or o.print or o.lint or o.map) + o.run = not (o.compile or o.print or o.map) o.print = !! (o.print or (o.eval or o.stdio and o.compile)) sources = o.arguments sourceCode[i] = null for source, i in sources return # The compile-time options to pass to the CoffeeScript compiler. -compileOptions = (filename) -> - { +compileOptions = (filename, base) -> + answer = { filename - literate: helpers.isLiterate(filename) + literate: opts.literate or helpers.isLiterate(filename) bare: opts.bare header: opts.compile sourceMap: opts.map } + if filename + if base + cwd = process.cwd() + jsPath = outputPath filename, base + jsDir = path.dirname jsPath + answer = helpers.merge answer, { + jsPath + sourceRoot: path.relative jsDir, cwd + sourceFiles: [path.relative cwd, filename] + generatedFile: helpers.baseFileName(jsPath, no, useWinPathSep) + } + else + answer = helpers.merge answer, + sourceRoot: "" + sourceFiles: [helpers.baseFileName filename, no, useWinPathSep] + generatedFile: helpers.baseFileName(filename, yes, useWinPathSep) + ".js" + answer # Start up a new Node.js instance with the arguments in `--nodejs` passed to # the `node` binary, preserving the other options. diff --git a/src/grammar.coffee b/src/grammar.coffee index 645e5fcc70..a6af1e34cf 100644 --- a/src/grammar.coffee +++ b/src/grammar.coffee @@ -401,6 +401,7 @@ grammar = Catch: [ o 'CATCH Identifier Block', -> [$2, $3] o 'CATCH Object Block', -> [LOC(2)(new Value($2)), $3] + o 'CATCH Block', -> [null, $2] ] # Throw an exception object. diff --git a/src/helpers.coffee b/src/helpers.coffee index d38f6fb155..a534b924fc 100644 --- a/src/helpers.coffee +++ b/src/helpers.coffee @@ -11,6 +11,16 @@ exports.ends = (string, literal, back) -> len = literal.length literal is string.substr string.length - len - (back or 0), len +# Repeat a string `n` times. +exports.repeat = repeat = (str, n) -> + # Use clever algorithm to have O(log(n)) string concatenation operations. + res = '' + while n > 0 + res += str if n & 1 + n >>>= 1 + str += str + res + # Trim out all falsy values from an array. exports.compact = (array) -> item for item in array when item @@ -53,13 +63,27 @@ exports.del = (obj, key) -> val # Gets the last item of an array(-like) object. -exports.last = (array, back) -> array[array.length - (back or 0) - 1] +exports.last = last = (array, back) -> array[array.length - (back or 0) - 1] # Typical Array::some exports.some = Array::some ? (fn) -> return true for e in this when fn e false +# Simple function for inverting Literate CoffeeScript code by putting the +# documentation in comments, producing a string of CoffeeScript code that +# can be compiled "normally". +exports.invertLiterate = (code) -> + maybe_code = true + lines = for line in code.split('\n') + if maybe_code and /^([ ]{4}|[ ]{0,3}\t)/.test line + line + else if maybe_code = /^\s*$/.test line + line + else + '# ' + line + lines.join '\n' + # Merge two jison-style location data objects together. # If `last` is not provided, this will simply return `first`. buildLocationData = (first, last) -> @@ -71,8 +95,9 @@ buildLocationData = (first, last) -> last_line: last.last_line last_column: last.last_column -# This returns a function which takes an object as a parameter, and if that object is an AST node, -# updates that object's locationData. The object is returned either way. +# This returns a function which takes an object as a parameter, and if that +# object is an AST node, updates that object's locationData. +# The object is returned either way. exports.addLocationDataFn = (first, last) -> (obj) -> if ((typeof obj) is 'object') and (!!obj['updateLocationDataIfMissing']) @@ -93,13 +118,14 @@ exports.locationDataToString = (obj) -> "No location data" # A `.coffee.md` compatible version of `basename`, that returns the file sans-extension. -exports.baseFileName = (file, stripExt = no) -> - parts = file.split('/') +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 parts = file.split('.') parts.pop() - parts.pop() if parts[parts.length - 1] is 'coffee' + parts.pop() if parts[parts.length - 1] is 'coffee' and parts.length > 1 parts.join('.') # Determine if a filename represents a CoffeeScript file. @@ -108,4 +134,40 @@ exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file # Determine if a filename represents a Literate CoffeeScript file. exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file - +# Throws a SyntaxError with a source file location data attached to it in a +# property called `location`. +exports.throwSyntaxError = (message, location) -> + location.last_line ?= location.first_line + location.last_column ?= location.first_column + error = new SyntaxError message + error.location = location + throw error + +# Creates a nice error message like, following the "standard" format +# ::: plus the line with the error and a marker +# showing where the error is. +exports.prettyErrorMessage = (error, fileName, code, useColors) -> + return error.stack or "#{error}" unless error.location + + {first_line, first_column, last_line, last_column} = error.location + codeLine = code.split('\n')[first_line] + start = first_column + # Show only the first line on multi-line errors. + end = if first_line is last_line then last_column + 1 else codeLine.length + marker = repeat(' ', start) + repeat('^', end - start) + + if useColors + colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m" + codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..] + marker = colorize marker + + message = """ + #{fileName}:#{first_line + 1}:#{first_column + 1}: error: #{error.message} + #{codeLine} + #{marker} + """ + + # Uncomment to add stacktrace. + #message += "\n#{error.stack}" + + message diff --git a/src/lexer.coffee b/src/lexer.coffee index d89bfdd699..6392dd6945 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -12,7 +12,8 @@ {Rewriter, INVERSES} = require './rewriter' # Import the helpers we need. -{count, starts, compact, last, locationDataToString} = require './helpers' +{count, starts, compact, last, repeat, invertLiterate, +locationDataToString, throwSyntaxError} = require './helpers' # The Lexer Class # --------------- @@ -40,7 +41,7 @@ exports.Lexer = class Lexer @outdebt = 0 # The under-outdentation at the current level. @indents = [] # The stack of all current indentation levels. @ends = [] # The stack for pairing up tokens. - @tokens = [] # Stream of parsed tokens in the form `['TYPE', value, line]`. + @tokens = [] # Stream of parsed tokens in the form `['TYPE', value, location data]`. @chunkLine = opts.line or 0 # The start line for the current @chunk. @@ -84,13 +85,7 @@ exports.Lexer = class Lexer if WHITESPACE.test code code = "\n#{code}" @chunkLine-- - if @literate - lines = for line in code.split('\n') - if match = LITERATE.exec line - line[match[0].length..] - else - '# ' + line - code = lines.join '\n' + code = invertLiterate code if @literate code # Tokenizers @@ -181,9 +176,9 @@ exports.Lexer = class Lexer @error "octal literal '#{number}' must be prefixed with '0o'" lexedLength = number.length if octalLiteral = /^0o([0-7]+)/.exec number - number = '0x' + (parseInt octalLiteral[1], 8).toString 16 + number = '0x' + parseInt(octalLiteral[1], 8).toString 16 if binaryLiteral = /^0b([01]+)/.exec number - number = '0x' + (parseInt binaryLiteral[1], 2).toString 16 + number = '0x' + parseInt(binaryLiteral[1], 2).toString 16 @token 'NUMBER', number, 0, lexedLength lexedLength @@ -227,7 +222,7 @@ exports.Lexer = class Lexer if here @token 'HERECOMMENT', (@sanitizeHeredoc here, - herecomment: true, indent: Array(@indent + 1).join(' ')), + herecomment: true, indent: repeat ' ', @indent), 0, comment.length comment.length @@ -328,7 +323,7 @@ exports.Lexer = class Lexer @suppressNewlines() return indent.length diff = size - @indent + @outdebt - @token 'INDENT', diff, 0, indent.length + @token 'INDENT', diff, indent.length - size, size @indents.push diff @ends.push 'OUTDENT' @outdebt = @indebt = 0 @@ -443,7 +438,6 @@ exports.Lexer = class Lexer 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# \n/g, '\n\n' if @literate doc = doc.replace /^\n/, '' unless herecomment doc @@ -595,7 +589,10 @@ exports.Lexer = class Lexer @tokens.push token else @error "Unexpected #{tag}" - @token ')', ')', offsetInChunk + lexedLength, 0 if interpolated + 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 @@ -633,7 +630,7 @@ exports.Lexer = class Lexer column = @chunkColumn if lineCount > 0 lines = string.split '\n' - column = (last lines).length + column = last(lines).length else column += string.length @@ -650,7 +647,7 @@ exports.Lexer = class Lexer # so if last_column == first_column, then we're looking at a character of length 1. lastCharacter = Math.max 0, length - 1 [locationData.last_line, locationData.last_column] = - @getLineAndColumnFromChunk offsetInChunk + (length - 1) + @getLineAndColumnFromChunk offsetInChunk + lastCharacter token = [tag, value, locationData] @@ -693,11 +690,11 @@ exports.Lexer = class Lexer body = body.replace /// #{quote} ///g, '\\$&' quote + @escapeLines(body, heredoc) + quote - # Throws a syntax error on the current `@line`. + # Throws a compiler error on the current position. error: (message) -> # TODO: Are there some cases we could improve the error line number by # passing the offset in the chunk where the error happened? - throw SyntaxError "#{message} on line #{ @chunkLine + 1 }" + throwSyntaxError message, first_line: @chunkLine, first_column: @chunkColumn # Constants # --------- @@ -779,8 +776,6 @@ WHITESPACE = /^[^\n\S]+/ COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/ -LITERATE = /^([ ]{4}|\t)/ - CODE = /^[-=]>/ MULTI_DENT = /^(?:\n[^\n\S]*)+/ @@ -851,11 +846,11 @@ BOOL = ['TRUE', 'FALSE'] # 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', '++', '--', ']'] +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' +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 diff --git a/src/nodes.coffee b/src/nodes.coffee index c9dd19e85a..3259a01009 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -9,7 +9,8 @@ Error.stackTraceLimit = Infinity {RESERVED, STRICT_PROSCRIBED} = require './lexer' # Import the helpers we plan to use. -{compact, flatten, extend, merge, del, starts, ends, last, some, addLocationDataFn, locationDataToString} = require './helpers' +{compact, flatten, extend, merge, del, starts, ends, last, some, +addLocationDataFn, locationDataToString, throwSyntaxError} = require './helpers' # Functions required by parser exports.extend = extend @@ -33,8 +34,8 @@ exports.CodeFragment = class CodeFragment @locationData = parent?.locationData @type = parent?.constructor?.name or 'unknown' - toString: () -> - "#{@code}#{[if @locationData then ": " + locationDataToString(@locationData)]}" + toString: -> + "#{@code}#{if @locationData then ": " + locationDataToString(@locationData) else ''}" # Convert an array of CodeFragments into a string. fragmentsToText = (fragments) -> @@ -75,8 +76,8 @@ exports.Base = class Base # Statements converted into expressions via closure-wrapping share a scope # object with their parent closure, to preserve the expected lexical scope. compileClosure: (o) -> - if @jumps() - throw SyntaxError 'cannot use a pure statement in an expression.' + if jumpNode = @jumps() + jumpNode.error 'cannot use a pure statement in an expression' o.sharedScope = yes Closure.wrap(this).compileNode o @@ -110,20 +111,16 @@ exports.Base = class Base new Return me # Does this node, or any of its children, contain a node of a certain kind? - # Recursively traverses down the *children* of the nodes, yielding to a block - # and returning true when the block finds a match. `contains` does not cross + # Recursively traverses down the *children* nodes and returns the first one + # that verifies `pred`. Otherwise return undefined. `contains` does not cross # scope boundaries. contains: (pred) -> - contains = no - @traverseChildren no, (node) -> - if pred node - contains = yes + node = undefined + @traverseChildren no, (n) -> + if pred n + node = n return no - contains - - # Is this node of a certain type, or does it contain the type? - containsType: (type) -> - this instanceof type or @contains (node) -> node instanceof type + node # Pull out the last non-comment node of a node list. lastNonComment: (list) -> @@ -134,8 +131,7 @@ exports.Base = class Base # `toString` representation of the node, for inspecting the parse tree. # This is what `coffee --nodes` prints out. toString: (idt = '', name = @constructor.name) -> - location = if @locationData then locationDataToString @locationData else "??" - tree = '\n' + idt + location + ": " + name + tree = '\n' + idt + name tree += '?' if @soak @eachChild (node) -> tree += node.toString idt + TAB tree @@ -150,8 +146,8 @@ exports.Base = class Base traverseChildren: (crossScope, func) -> @eachChild (child) -> - return false if func(child) is false - child.traverseChildren crossScope, func + recur = func(child) + child.traverseChildren(crossScope, func) unless recur is no invert: -> new Op '!', this @@ -177,16 +173,18 @@ exports.Base = class Base # Is this node used to assign a certain variable? assigns: NO - # For this node and all descendents, set the location data to `locationData` if the location - # data is not already set. + # For this node and all descendents, set the location data to `locationData` + # if the location data is not already set. updateLocationDataIfMissing: (locationData) -> - if not @locationData - @locationData = {} - extend @locationData, locationData + @locationData or= locationData @eachChild (child) -> child.updateLocationDataIfMissing locationData + # Throw a SyntaxError associated with this node's location. + error: (message) -> + throwSyntaxError message, @locationData + makeCode: (code) -> new CodeFragment this, code @@ -290,7 +288,7 @@ exports.Block = class Block extends Base compiledNodes.push node.compileToFragments o, LEVEL_LIST if top if @spaced - return [].concat @makeCode("\n"), @joinFragmentArrays(compiledNodes, '\n\n'), @makeCode("\n") + return [].concat @joinFragmentArrays(compiledNodes, '\n\n'), @makeCode("\n") else return @joinFragmentArrays(compiledNodes, '\n') if compiledNodes.length @@ -305,9 +303,12 @@ exports.Block = class Block extends Base # clean up obvious double-parentheses. compileRoot: (o) -> o.indent = if o.bare then '' else TAB - o.scope = new Scope null, this, null o.level = LEVEL_TOP @spaced = yes + o.scope = new Scope null, this, null + # Mark given local variables in the root scope as parameters so they don't + # end up being declared on this block. + o.scope.parameter name for name in o.locals or [] prelude = [] unless o.bare preludeExps = for exp, i in @expressions @@ -335,7 +336,7 @@ exports.Block = class Block extends Base if i rest = @expressions.splice i, 9e9 [spaced, @spaced] = [@spaced, no] - [fragments, @spaced] = [(@compileNode o), spaced] + [fragments, @spaced] = [@compileNode(o), spaced] @expressions = rest post = @compileNode o {scope} = o @@ -346,11 +347,13 @@ exports.Block = class Block extends Base fragments.push @makeCode '\n' if i fragments.push @makeCode "#{@tab}var " if declars - fragments.push @makeCode(scope.declaredVariables().join ', ') + fragments.push @makeCode scope.declaredVariables().join(', ') if assigns fragments.push @makeCode ",\n#{@tab + TAB}" if declars - fragments.push @makeCode (scope.assignedVariables().join ",\n#{@tab + TAB}") - fragments.push @makeCode ';\n' + fragments.push @makeCode scope.assignedVariables().join(",\n#{@tab + TAB}") + fragments.push @makeCode ";\n#{if @spaced then '\n' else ''}" + else if fragments.length and post.length + fragments.push @makeCode "\n" fragments.concat post # Wrap up the given nodes as a **Block**, unless it already happens @@ -436,9 +439,9 @@ exports.Return = class Return extends Base compileNode: (o) -> answer = [] # TODO: If we call expression.compile() here twice, we'll sometimes get back different results! - answer.push @makeCode(@tab + "return#{[" " if @expression]}") + answer.push @makeCode @tab + "return#{if @expression then " " else ""}" if @expression - answer = answer.concat @expression.compileToFragments(o, LEVEL_PAREN) + answer = answer.concat @expression.compileToFragments o, LEVEL_PAREN answer.push @makeCode ";" return answer @@ -552,7 +555,7 @@ exports.Comment = class Comment extends Base makeReturn: THIS compileNode: (o, level) -> - code = '/*' + multident(@comment, @tab) + "\n#{@tab}*/\n" + code = "/*#{multident @comment, @tab}#{if '\n' in @comment then "\n#{@tab}" else ''}*/\n" code = o.indent + code if (level or o.level) is LEVEL_TOP [@makeCode code] @@ -589,7 +592,7 @@ exports.Call = class Call extends Base else if method?.ctor "#{method.name}.__super__.constructor" else - throw SyntaxError 'cannot call super outside of an instance method.' + @error 'cannot call super outside of an instance method.' # The appropriate `this` value for a `super` call. superThis : (o) -> @@ -646,7 +649,7 @@ exports.Call = class Call extends Base fragments.push @makeCode preface else if @isNew then fragments.push @makeCode 'new ' - fragments.push (@variable.compileToFragments(o, LEVEL_ACCESS))... + fragments.push @variable.compileToFragments(o, LEVEL_ACCESS)... fragments.push @makeCode "(" fragments.push compiledArgs... fragments.push @makeCode ")" @@ -738,7 +741,7 @@ exports.Index = class Index extends Base children: ['index'] compileToFragments: (o) -> - [].concat @makeCode("["), (@index.compileToFragments o, LEVEL_PAREN), @makeCode("]") + [].concat @makeCode("["), @index.compileToFragments(o, LEVEL_PAREN), @makeCode("]") isComplex: -> @index.isComplex() @@ -883,7 +886,7 @@ exports.Obj = class Obj extends Base return [@makeCode(if @front then '({})' else '{}')] unless props.length if @generated for node in props when node instanceof Value - throw new Error 'cannot have an implicit value in an implicit object' + node.error 'cannot have an implicit value in an implicit object' idt = o.indent += TAB lastNoncom = @lastNonComment @properties answer = [] @@ -895,6 +898,8 @@ exports.Obj = class Obj extends Base else ',\n' indent = if prop instanceof Comment then '' else idt + if prop instanceof Assign and prop.variable instanceof Value and prop.variable.hasProperties() + prop.variable.error 'Invalid object key' if prop instanceof Value and prop.this prop = new Assign prop.properties[0].name, prop, 'object' if prop not instanceof Comment @@ -933,7 +938,7 @@ exports.Arr = class Arr extends Base if index answer.push @makeCode ", " answer.push fragments... - if (fragmentsToText answer).indexOf('\n') >= 0 + if fragmentsToText(answer).indexOf('\n') >= 0 answer.unshift @makeCode "[\n#{o.indent}" answer.push @makeCode "\n#{@tab}]" else @@ -965,7 +970,7 @@ exports.Class = class Class extends Base else @variable.base.value if decl in STRICT_PROSCRIBED - throw SyntaxError "variable name may not be #{decl}" + @variable.error "class variable name may not be #{decl}" decl and= IDENTIFIER.test(decl) and decl # For all `this`-references and bound functions in the class definition, @@ -982,22 +987,9 @@ exports.Class = class Class extends Base # Ensure that all functions bound to the instance are proxied in the # constructor. addBoundFunctions: (o) -> - if @boundFuncs.length - o.scope.assign '_this', 'this' - for [name, func] in @boundFuncs - lhs = new Value (new Literal "this"), [new Access name] - body = new Block [new Return new Literal "#{@ctor.name}.prototype.#{name.value}.apply(_this, arguments)"] - rhs = new Code func.params, body, 'boundfunc' - bound = new Assign lhs, rhs - - @ctor.body.unshift bound - - # {base} = assign.variable - # lhs = (new Value (new Literal "this"), [new Access base]).compile o - # @ctor.body.unshift new Literal """#{lhs} = function() { - # #{o.indent} return #{@ctor.name}.prototype.#{base.value}.apply(_this, arguments); - # #{o.indent}}\n - # """ + 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)" return # Merge the properties from a top-level object as prototypal properties @@ -1011,9 +1003,9 @@ exports.Class = class Class extends Base func = assign.value if base.value is 'constructor' if @ctor - throw new Error 'cannot define more than one constructor in a class' + assign.error 'cannot define more than one constructor in a class' if func.bound - throw new Error 'cannot define a constructor as a bound function' + assign.error 'cannot define a constructor as a bound function' if func instanceof Code assign = @ctor = func else @@ -1025,9 +1017,9 @@ exports.Class = class Class extends Base if func.bound func.context = name else - assign.variable = new Value(new Literal(name), [(new Access new Literal 'prototype'), new Access base ]) + assign.variable = new Value(new Literal(name), [(new Access new Literal 'prototype'), new Access base]) if func instanceof Code and func.bound - @boundFuncs.push [base, func] + @boundFuncs.push base func.bound = no assign compact exprs @@ -1057,16 +1049,26 @@ exports.Class = class Class extends Base # Make sure that a constructor is defined for the class, and properly # configured. - ensureConstructor: (name) -> - if not @ctor - @ctor = new Code - @ctor.body.push new Literal "#{name}.__super__.constructor.apply(this, arguments)" if @parent - @ctor.body.push new Literal "#{@externalCtor}.apply(this, arguments)" if @externalCtor - @ctor.body.makeReturn() - @body.expressions.unshift @ctor - @ctor.ctor = @ctor.name = name - @ctor.klass = null + ensureConstructor: (name, o) -> + missing = not @ctor + @ctor or= new Code + @ctor.ctor = @ctor.name = name + @ctor.klass = null @ctor.noReturn = yes + if missing + superCall = new Literal "#{name}.__super__.constructor.apply(this, arguments)" if @parent + superCall = new Literal "#{@externalCtor}.apply(this, arguments)" if @externalCtor + if superCall + ref = new Literal o.scope.freeVariable 'ref' + @ctor.body.unshift new Assign ref, superCall + @addBoundFunctions o + if superCall + @ctor.body.push ref + @ctor.body.makeReturn() + @body.expressions.unshift @ctor + else + @addBoundFunctions o + # Instead of generating the JavaScript string directly, we build up the # equivalent syntax tree and compile that, in pieces. You can see the @@ -1080,12 +1082,11 @@ exports.Class = class Class extends Base @hoistDirectivePrologue() @setContext name @walkBody name, o - @ensureConstructor name + @ensureConstructor name, o @body.spaced = yes @body.expressions.unshift @ctor unless @ctor instanceof Code @body.expressions.push lname @body.expressions.unshift @directives... - @addBoundFunctions o call = Closure.wrap @body @@ -1110,7 +1111,7 @@ exports.Assign = class Assign extends Base @subpattern = options and options.subpattern forbidden = (name = @variable.unwrapAll().value) in STRICT_PROSCRIBED if forbidden and @context isnt 'object' - throw SyntaxError "variable name may not be \"#{name}\"" + @variable.error "variable name may not be \"#{name}\"" children: ['variable', 'value'] @@ -1135,8 +1136,9 @@ exports.Assign = class Assign extends Base compiledName = @variable.compileToFragments o, LEVEL_LIST name = fragmentsToText compiledName unless @context - unless (varBase = @variable.unwrapAll()).isAssignable() - throw SyntaxError "\"#{ @variable.compile o }\" cannot be assigned." + varBase = @variable.unwrapAll() + unless varBase.isAssignable() + @variable.error "\"#{@variable.compile o}\" cannot be assigned" unless varBase.hasProperties?() if @param o.scope.add name, 'var' @@ -1175,7 +1177,7 @@ exports.Assign = class Assign extends Base value = new Value value value.properties.push new (if acc then Access else Index) idx if obj.unwrap().value in RESERVED - throw new SyntaxError "assignment to a reserved word: #{obj.compile o} = #{value.compile o}" + obj.error "assignment to a reserved word: #{obj.compile o}" return new Assign(obj, value, null, param: @param).compileToFragments o, LEVEL_TOP vvar = value.compileToFragments o, LEVEL_LIST vvarText = fragmentsToText vvar @@ -1213,9 +1215,7 @@ exports.Assign = class Assign extends Base else name = obj.unwrap().value if obj instanceof Splat - obj = obj.name.compileToFragments o - throw new SyntaxError \ - "multiple splats are disallowed in an assignment: #{obj}..." + obj.error "multiple splats are disallowed in an assignment" if typeof idx is 'number' idx = new Literal splat or idx acc = no @@ -1223,7 +1223,7 @@ exports.Assign = class Assign extends Base acc = isObject and IDENTIFIER.test idx.unwrap().value or 0 val = new Value new Literal(vvarText), [new (if acc then Access else Index) idx] if name? and name in RESERVED - throw new SyntaxError "assignment to a reserved word: #{obj.compile o} = #{val.compile o}" + obj.error "assignment to a reserved word: #{obj.compile o}" assigns.push new Assign(obj, val, null, param: @param, subpattern: yes).compileToFragments o, LEVEL_LIST assigns.push vvar unless top or @subpattern fragments = @joinFragmentArrays assigns, ', ' @@ -1237,9 +1237,9 @@ exports.Assign = class Assign extends Base # Disallow conditional assignment of undefined variables. if not left.properties.length and left.base instanceof Literal and left.base.value != "this" and not o.scope.check left.base.value - throw new Error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been defined." + @variable.error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been declared before" if "?" in @context then o.isExistentialEquals = true - new Op(@context[...-1], left, new Assign(right, @value, '=') ).compileToFragments o + new Op(@context[...-1], left, new Assign(right, @value, '=')).compileToFragments o # Compile the assignment from an array splice literal, using JavaScript's # `Array#splice` method. @@ -1294,7 +1294,7 @@ exports.Code = class Code extends Base delete o.isExistentialEquals params = [] exprs = [] - for name in @paramNames() # this step must be performed before the others + @eachParamName (name) -> # this step must be performed before the others unless o.scope.check name then o.scope.parameter name for param in @params when param.splat for {name: p} in @params @@ -1322,8 +1322,8 @@ exports.Code = class Code extends Base params[i] = p.compileToFragments o o.scope.parameter fragmentsToText params[i] uniqs = [] - for name in @paramNames() - throw SyntaxError "multiple parameters named '#{name}'" if name in uniqs + @eachParamName (name, node) -> + node.error "multiple parameters named '#{name}'" if name in uniqs uniqs.push name @body.makeReturn() unless wasEmpty or @noReturn if @bound @@ -1346,11 +1346,8 @@ exports.Code = class Code extends Base return [@makeCode(@tab), answer...] if @ctor if @front or (o.level >= LEVEL_ACCESS) then @wrapInBraces answer else answer - # A list of parameter names, excluding those generated by the compiler. - paramNames: -> - names = [] - names.push param.names()... for param in @params - names + eachParamName: (iterator) -> + param.eachName iterator for param in @params # Short-circuit `traverseChildren` method to prevent it from crossing scope boundaries # unless `crossScope` is `true`. @@ -1365,7 +1362,7 @@ exports.Code = class Code extends Base exports.Param = class Param extends Base constructor: (@name, @value, @splat) -> if (name = @name.unwrapAll().value) in STRICT_PROSCRIBED - throw SyntaxError "parameter name \"#{name}\" is not allowed" + @name.error "parameter name \"#{name}\" is not allowed" children: ['name', 'value'] @@ -1388,41 +1385,40 @@ exports.Param = class Param extends Base isComplex: -> @name.isComplex() - # Finds the name or names of a `Param`; useful for detecting duplicates. - # In a sense, a destructured parameter represents multiple JS parameters, - # thus this method returns an `Array` of names. - # Reserved words used as param names, as well as the Object and Array - # literals used for destructured params, get a compiler generated name - # during the `Code` compilation step, so this is necessarily an incomplete - # list of a parameter's names. - names: (name = @name)-> + # Iterates the name or names of a `Param`. + # In a sense, a destructured parameter represents multiple JS parameters. This + # method allows to iterate them all. + # The `iterator` function will be called as `iterator(name, node)` where + # `name` is the name of the parameter and `node` is the AST node corresponding + # to that name. + eachName: (iterator, name = @name)-> atParam = (obj) -> - {value} = obj.properties[0].name - return if value.reserved then [] else [value] + node = obj.properties[0].name + iterator node.value, node unless node.value.reserved # * simple literals `foo` - return [name.value] if name instanceof Literal + return iterator name.value, name if name instanceof Literal # * at-params `@foo` - return atParam(name) if name instanceof Value - names = [] + return atParam name if name instanceof Value for obj in name.objects # * assignments within destructured parameters `{foo:bar}` if obj instanceof Assign - names.push @names(obj.value.unwrap())... + @eachName iterator, obj.value.unwrap() # * splats within destructured parameters `[xs...]` else if obj instanceof Splat - names.push obj.name.unwrap().value + node = obj.name.unwrap() + iterator node.value, node else if obj instanceof Value # * destructured parameters within destructured parameters `[{a}]` if obj.isArray() or obj.isObject() - names.push @names(obj.base)... + @eachName iterator, obj.base # * at-params within destructured parameters `{@foo}` else if obj.this - names.push atParam(obj)... + atParam obj # * simple destructured parameters {foo} - else names.push obj.base.value + else iterator obj.base.value, obj.base else - throw SyntaxError "illegal parameter #{obj.compile()}" - names + obj.error "illegal parameter #{obj.compile()}" + return #### Splat @@ -1510,7 +1506,7 @@ exports.While = class While extends Base set = '' {body} = this if body.isEmpty() - body = '' + body = @makeCode '' else if @returns body.makeReturn rvar = o.scope.freeVariable 'results' @@ -1564,7 +1560,7 @@ exports.Op = class Op extends Base not @second isComplex: -> - not (@isUnary() and (@operator in ['+', '-'])) or @first.isComplex() + not (@isUnary() and @operator in ['+', '-']) or @first.isComplex() # Am I capable of # [Python-style comparison chaining](http://docs.python.org/reference/expressions.html#notin)? @@ -1623,9 +1619,9 @@ exports.Op = class Op extends Base # as the chained expression is wrapped. @first.front = @front unless isChain if @operator is 'delete' and o.scope.check(@first.unwrapAll().value) - throw SyntaxError 'delete operand may not be argument or var' + @error 'delete operand may not be argument or var' if @operator in ['--', '++'] and @first.unwrapAll().value in STRICT_PROSCRIBED - throw SyntaxError 'prefix increment/decrement may not have eval or arguments operand' + @error "cannot increment/decrement \"#{@first.unwrapAll().value}\"" return @compileUnary o if @isUnary() return @compileChain o if isChain return @compileExistence o if @operator is '?' @@ -1645,8 +1641,9 @@ exports.Op = class Op extends Base (shared.compileToFragments o), @makeCode(" #{@operator} "), (@second.compileToFragments o, LEVEL_OP) @wrapInBraces fragments + # Keep reference to the left expression, unless this an existential assignment compileExistence: (o) -> - if @first.isComplex() + if !o.isExistentialEquals and @first.isComplex() ref = new Literal o.scope.freeVariable 'ref' fst = new Parens new Assign ref, @first else @@ -1667,7 +1664,7 @@ exports.Op = class Op extends Base plusMinus = op in ['+', '-'] parts.push [@makeCode(' ')] if op in ['new', 'typeof', 'delete'] or plusMinus and @first instanceof Op and @first.operator is op - if (plusMinus && @first instanceof Op) or (op is 'new' and @first.isStatement o) + if (plusMinus and @first instanceof Op) or (op is 'new' and @first.isStatement o) @first = new Parens @first parts.push @first.compileToFragments o, LEVEL_OP parts.reverse() if @flip @@ -1707,7 +1704,7 @@ exports.In = class In extends Base [sub, ref] = @object.cache o, LEVEL_LIST fragments = [].concat @makeCode(utility('indexOf') + ".call("), @array.compileToFragments(o, LEVEL_LIST), @makeCode(", "), ref, @makeCode(") " + if @negated then '< 0' else '>= 0') - return fragments if (fragmentsToText sub) is (fragmentsToText ref) + return fragments if fragmentsToText(sub) is fragmentsToText(ref) fragments = sub.concat @makeCode(', '), fragments if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments @@ -1718,7 +1715,7 @@ exports.In = class In extends Base # A classic *try/catch/finally* block. exports.Try = class Try extends Base - constructor: (@attempt, @error, @recovery, @ensure) -> + constructor: (@attempt, @errorVariable, @recovery, @ensure) -> children: ['attempt', 'recovery', 'ensure'] @@ -1738,21 +1735,17 @@ exports.Try = class Try extends Base tryPart = @attempt.compileToFragments o, LEVEL_TOP catchPart = if @recovery - if @error.isObject?() - placeholder = new Literal '_error' - @recovery.unshift new Assign @error, placeholder - @error = placeholder - if @error.value in STRICT_PROSCRIBED - throw SyntaxError "catch variable may not be \"#{@error.value}\"" - o.scope.add @error.value, 'param' unless o.scope.check @error.value - [].concat @makeCode(" catch ("), @error.compileToFragments(o), @makeCode(") {\n"), + placeholder = new Literal '_error' + @recovery.unshift new Assign @errorVariable, placeholder if @errorVariable + [].concat @makeCode(" catch ("), placeholder.compileToFragments(o), @makeCode(") {\n"), @recovery.compileToFragments(o, LEVEL_TOP), @makeCode("\n#{@tab}}") else unless @ensure or @recovery [@makeCode(' catch (_error) {}')] else [] - ensurePart = if @ensure then ([].concat @makeCode(" finally {\n"), (@ensure.compileToFragments o, LEVEL_TOP), @makeCode("\n#{@tab}}")) else [] + ensurePart = if @ensure then ([].concat @makeCode(" finally {\n"), @ensure.compileToFragments(o, LEVEL_TOP), + @makeCode("\n#{@tab}}")) else [] [].concat @makeCode("#{@tab}try {\n"), tryPart, @@ -1773,7 +1766,7 @@ exports.Throw = class Throw extends Base makeReturn: THIS compileNode: (o) -> - [].concat @makeCode(@tab + "throw "), (@expression.compileToFragments o), @makeCode(";") + [].concat @makeCode(@tab + "throw "), @expression.compileToFragments(o), @makeCode(";") #### Existence @@ -1839,11 +1832,12 @@ exports.For = class For extends While @own = !!source.own @object = !!source.object [@name, @index] = [@index, @name] if @object - throw SyntaxError 'index cannot be a pattern matching expression' if @index instanceof Value + @index.error 'index cannot be a pattern matching expression' if @index instanceof Value @range = @source instanceof Value and @source.base instanceof Range and not @source.properties.length @pattern = @name instanceof Value - throw SyntaxError 'indexes do not apply to range loops' if @range and @index - throw SyntaxError 'cannot pattern match over range loops' if @range and @pattern + @index.error 'indexes do not apply to range loops' if @range and @index + @name.error 'cannot pattern match over range loops' if @range and @pattern + @index.error 'cannot use own with for-in' if @own and not @object @returns = false children: ['body', 'source', 'guard', 'step'] @@ -1970,7 +1964,7 @@ exports.Switch = class Switch extends Base idt1 = o.indent + TAB idt2 = o.indent = idt1 + TAB fragments = [].concat @makeCode(@tab + "switch ("), - (if @subject then @subject.compileToFragments(o, LEVEL_PAREN) else @makeCode("false")), + (if @subject then @subject.compileToFragments(o, LEVEL_PAREN) else @makeCode "false"), @makeCode(") {\n") for [conditions, block], i in @cases for cond in flatten [conditions] @@ -2085,21 +2079,22 @@ Closure = return expressions if expressions.jumps() func = new Code [], Block.wrap [expressions] args = [] - if (mentionsArgs = expressions.contains @literalArgs) or expressions.contains @literalThis - if mentionsArgs and expressions.classBody - throw SyntaxError "Class bodies shouldn't reference arguments" - meth = new Literal if mentionsArgs then 'apply' else 'call' + argumentsNode = expressions.contains @isLiteralArguments + if argumentsNode and expressions.classBody + argumentsNode.error "Class bodies shouldn't reference arguments" + if argumentsNode or expressions.contains @isLiteralThis + meth = new Literal if argumentsNode then 'apply' else 'call' args = [new Literal 'this'] - args.push new Literal 'arguments' if mentionsArgs + args.push new Literal 'arguments' if argumentsNode func = new Value func, [new Access meth] func.noReturn = noReturn call = new Call func, args if statement then Block.wrap [call] else call - literalArgs: (node) -> + isLiteralArguments: (node) -> node instanceof Literal and node.value is 'arguments' and not node.asKey - literalThis: (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) @@ -2122,6 +2117,11 @@ UTILITIES = function(child, parent) { for (var key in parent) { if (#{utility '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; } """ + # Create a function bound to the current value of "this". + bind: -> ''' + function(fn, me){ return function(){ return fn.apply(me, arguments); }; } + ''' + # Discover if an item is in an array. 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/src/optparse.coffee b/src/optparse.coffee index 3bed118c41..b89d20e072 100644 --- a/src/optparse.coffee +++ b/src/optparse.coffee @@ -1,3 +1,5 @@ +{repeat} = require './helpers' + # A simple **OptionParser** class to parse option flags from the command-line. # Use it like so: # @@ -62,7 +64,7 @@ exports.OptionParser = class OptionParser lines.unshift "#{@banner}\n" if @banner for rule in @rules spaces = 15 - rule.longFlag.length - spaces = if spaces > 0 then Array(spaces + 1).join(' ') else '' + spaces = if spaces > 0 then repeat ' ', spaces else '' letPart = if rule.shortFlag then rule.shortFlag + ', ' else ' ' lines.push ' ' + letPart + rule.longFlag + spaces + rule.description "\n#{ lines.join('\n') }\n" diff --git a/src/repl.coffee b/src/repl.coffee index 2d8b873c00..2f0ec585f8 100644 --- a/src/repl.coffee +++ b/src/repl.coffee @@ -1,31 +1,43 @@ +fs = require 'fs' +path = require 'path' vm = require 'vm' nodeREPL = require 'repl' CoffeeScript = require './coffee-script' -{merge} = require './helpers' +{merge, prettyErrorMessage} = require './helpers' replDefaults = prompt: 'coffee> ', + historyFile: path.join process.env.HOME, '.coffee_history' if process.env.HOME + historyMaxInputSize: 10240 eval: (input, context, filename, cb) -> - # XXX: multiline hack + # XXX: multiline hack. input = input.replace /\uFF00/g, '\n' - # strip single-line comments - input = input.replace /(^|[\r\n]+)(\s*)##?(?:[^#\r\n][^\r\n]*|)($|[\r\n])/, '$1$2$3' - # empty command - return cb null if /^(\s*|\(\s*\))$/.test input - # TODO: fix #1829: pass in-scope vars and avoid accidentally shadowing them by omitting those declarations + # Node's REPL sends the input ending with a newline and then wrapped in + # parens. Unwrap all that. + input = input.replace /^\(([\s\S]*)\n\)$/m, '$1' + + # Require AST nodes to do some AST manipulation. + {Block, Assign, Value, Literal} = require './nodes' + try - js = CoffeeScript.compile "_=(#{input}\n)", {filename, bare: yes} + # Generate the AST of the clean input. + ast = CoffeeScript.nodes input + # 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) cb null, vm.runInContext(js, context, filename) catch err - cb err + cb prettyErrorMessage(err, filename, input, yes) addMultilineHandler = (repl) -> {rli, inputStream, outputStream} = repl multiline = enabled: off - initialPrompt: repl.prompt.replace(/^[^> ]*/, (x) -> x.replace /./g, '-') - prompt: repl.prompt.replace(/^[^> ]*>?/, (x) -> x.replace /./g, '.') + initialPrompt: repl.prompt.replace /^[^> ]*/, (x) -> x.replace /./g, '-' + prompt: repl.prompt.replace /^[^> ]*>?/, (x) -> x.replace /./g, '.' buffer: '' # Proxy node's line listener @@ -68,10 +80,54 @@ addMultilineHandler = (repl) -> rli.prompt true return +# Store and load command history from a file +addHistory = (repl, filename, maxSize) -> + lastLine = null + try + # Get file info and at most maxSize of command history + stat = fs.statSync filename + size = Math.min maxSize, stat.size + # Read last `size` bytes from the file + readFd = fs.openSync filename, 'r' + buffer = new Buffer(size) + fs.readSync readFd, buffer, 0, size, stat.size - size + # Set the history on the interpreter + repl.rli.history = buffer.toString().split('\n').reverse() + # If the history file was truncated we should pop off a potential partial line + repl.rli.history.pop() if stat.size > maxSize + # Shift off the final blank newline + repl.rli.history.shift() if repl.rli.history[0] is '' + repl.rli.historyIndex = -1 + lastLine = repl.rli.history[0] + + fd = fs.openSync filename, 'a' + + repl.rli.addListener 'line', (code) -> + if code and code.length and code isnt '.history' and lastLine isnt code + # Save the latest command in the file + fs.write fd, "#{code}\n" + lastLine = code + + repl.rli.on 'exit', -> fs.close fd + + # Add a command to show the history stack + repl.commands['.history'] = + help: 'Show command history' + action: -> + repl.outputStream.write "#{repl.rli.history[..].reverse().join '\n'}\n" + repl.displayPrompt() + module.exports = start: (opts = {}) -> + [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" + process.exit 1 + opts = merge replDefaults, opts repl = nodeREPL.start opts repl.on 'exit', -> repl.outputStream.write '\n' addMultilineHandler repl + addHistory repl, opts.historyFile, opts.historyMaxInputSize if opts.historyFile repl diff --git a/src/rewriter.coffee b/src/rewriter.coffee index 29bcd5a5f2..dc598f1082 100644 --- a/src/rewriter.coffee +++ b/src/rewriter.coffee @@ -16,6 +16,7 @@ generate = (tag, value) -> class exports.Rewriter # Helpful snippet for debugging: + # # console.log (t[0] + '/' + t[1] for t in @tokens).join ' ' # Rewrite the token stream in multiple passes, one logical filter at @@ -186,9 +187,12 @@ class exports.Rewriter return forward(1) if tag is 'INDENT' and inImplicit() - # An INDENT closes an implicit call unless - # 1. We have seen a CONTROL argument on the line. - # 2. The last token before the indent is part of the list below + + # An `INDENT` closes an implicit call unless + # + # 1. We have seen a `CONTROL` argument on the line. + # 2. The last token before the indent is part of the list below + # if prevTag not in ['=>', '->', '[', '(', ',', '{', 'TRY', 'ELSE', '='] endImplicitCall() while inImplicitCall() stack.pop() if inImplicitControl() @@ -213,7 +217,7 @@ class exports.Rewriter # Recognize standard implicit calls like # f a, f() b, f? c, h[0] d etc. - if (tag in IMPLICIT_FUNC and token.spaced or + if (tag in IMPLICIT_FUNC and token.spaced and not token.stringEnd or tag is '?' and i > 0 and not tokens[i - 1].spaced) and (nextTag in IMPLICIT_CALL or nextTag in IMPLICIT_UNSPACED_CALL and @@ -223,24 +227,31 @@ class exports.Rewriter return forward(2) # Implicit call taking an implicit indented object as first argument. - # f - # a: b - # c: d + # + # f + # a: b + # c: d + # # and - # f - # 1 - # a: b - # b: c + # + # f + # 1 + # a: b + # b: c + # # Don't accept implicit calls of this type, when on the same line # as the control strucutures below as that may misinterpret constructs like: - # if f - # a: 1 + # + # if f + # a: 1 # as - # if f(a: 1) + # + # if f(a: 1) + # # which is probably always unintended. # Furthermore don't allow this in literal arrays, as # that creates grammatical ambiguities. - if @matchTags(i, IMPLICIT_FUNC, 'INDENT', null, ':') and + if tag in IMPLICIT_FUNC and @matchTags(i + 1, 'INDENT', null, ':') and not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL']) startImplicitCall i + 1 @@ -266,11 +277,13 @@ class exports.Rewriter # End implicit calls when chaining method calls # like e.g.: - # f -> - # a - # .g b, -> - # c - # .h a + # + # f -> + # a + # .g b, -> + # c + # .h a + # if prevTag is 'OUTDENT' and inImplicitCall() and tag in ['.', '?.', '::', '?::'] endImplicitCall() return forward(1) @@ -299,14 +312,16 @@ class exports.Rewriter # Close implicit object if comma is the last character # and what comes after doesn't look like it belongs. # This is used for trailing commas and calls, like: - # x = - # a: b, - # c: d, - # e = 2 + # + # x = + # a: b, + # c: d, + # e = 2 # # and # - # f a, b: c, d: e, f, g: h: i, j + # f a, b: c, d: e, f, g: h: i, j + # if tag is ',' and not @looksObjectish(i + 1) and inImplicitObject() and (nextTag isnt 'TERMINATOR' or not @looksObjectish(i + 2)) # When nextTag is OUTDENT the comma is insignificant and @@ -325,13 +340,18 @@ class exports.Rewriter @scanTokens (token, i, tokens) -> return 1 if token[2] return 1 unless token.generated or token.explicit - {last_line, last_column} = tokens[i - 1]?[2] ? last_line: 0, last_column: 0 + if token[0] is '{' and nextLocation=tokens[i + 1]?[2] + {first_line: line, first_column: column} = nextLocation + else if prevLocation = tokens[i - 1]?[2] + {last_line: line, last_column: column} = prevLocation + else + line = column = 0 token[2] = - first_line: last_line - first_column: last_column - last_line: last_line - last_column: last_column - 1 + first_line: line + first_column: column + last_line: line + last_column: column + return 1 # Because our grammar is LALR(1), it can't handle some single-line # expressions that lack ending delimiters. The **Rewriter** adds the implicit @@ -342,7 +362,8 @@ class exports.Rewriter condition = (token, i) -> token[1] isnt ';' and token[0] in SINGLE_CLOSERS and - not (token[0] is 'ELSE' and starter not in ['IF', 'THEN']) + not (token[0] is 'ELSE' and starter isnt 'THEN') and + not (token[0] in ['CATCH', 'FINALLY'] and starter in ['->', '=>']) action = (token, i) -> @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent @@ -353,15 +374,16 @@ class exports.Rewriter tokens.splice i, 1 return 0 if tag is 'ELSE' and @tag(i - 1) isnt 'OUTDENT' - tokens.splice i, 0, @indentation(token)... + tokens.splice i, 0, @indentation()... return 2 - if tag is 'CATCH' and @tag(i + 2) in ['OUTDENT', 'TERMINATOR', 'FINALLY'] - tokens.splice i + 2, 0, @indentation(token)... - return 4 + if tag is 'CATCH' + for j in [1..2] when @tag(i + j) in ['OUTDENT', 'TERMINATOR', 'FINALLY'] + tokens.splice i + j, 0, @indentation()... + return 2 + j if tag in SINGLE_LINERS and @tag(i + 1) isnt 'INDENT' and not (tag is 'ELSE' and @tag(i + 1) is 'IF') starter = tag - [indent, outdent] = @indentation token, yes + [indent, outdent] = @indentation yes indent.fromThen = true if starter is 'THEN' tokens.splice i + 1, 0, indent @detectEnd i + 2, condition, action @@ -376,7 +398,9 @@ class exports.Rewriter original = null condition = (token, i) -> - token[0] in ['TERMINATOR', 'INDENT'] + [tag] = token + [prevTag] = @tokens[i - 1] + tag is 'TERMINATOR' or (tag is 'INDENT' and prevTag not in SINGLE_LINERS) action = (token, i) -> if token[0] isnt 'INDENT' or (token.generated and not token.fromThen) @@ -386,10 +410,10 @@ class exports.Rewriter return 1 unless token[0] is 'IF' original = token @detectEnd i + 1, condition, action - 1 + return 1 # Generate the indentation tokens, based on another token on the same line. - indentation: (token, implicit = no) -> + indentation: (implicit = no) -> indent = ['INDENT', 2] outdent = ['OUTDENT', 2] indent.generated = outdent.generated = yes if implicit @@ -437,14 +461,11 @@ IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@ IMPLICIT_CALL = [ 'IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS' 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER' - '@', '->', '=>', '[', '(', '{', '--', '++' + 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++' ] IMPLICIT_UNSPACED_CALL = ['+', '-'] -# Tokens indicating that the implicit call must enclose a block of expressions. -IMPLICIT_BLOCK = ['->', '=>', '{', '[', ','] - # Tokens that always mark the end of an implicit call for single-liners. IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'] diff --git a/src/sourcemap.coffee b/src/sourcemap.coffee deleted file mode 100644 index 52614b2619..0000000000 --- a/src/sourcemap.coffee +++ /dev/null @@ -1,246 +0,0 @@ -#### LineMapping - -# Hold data about mappings for one line of generated source code. - -class LineMapping - constructor: (@generatedLine) -> - # columnMap keeps track of which columns we've already mapped. - @columnMap = {} - - # columnMappings is an array of all column mappings, sorted by generated-column. - @columnMappings = [] - - addMapping: (generatedColumn, [sourceLine, sourceColumn], options={}) -> - if @columnMap[generatedColumn] and options.noReplace - # We already have a mapping for this column. - return - - @columnMap[generatedColumn] = { - generatedLine: @generatedLine - generatedColumn - sourceLine - sourceColumn - } - - @columnMappings.push @columnMap[generatedColumn] - @columnMappings.sort (a,b) -> a.generatedColumn - b.generatedColumn - - getSourcePosition: (generatedColumn) -> - answer = null - lastColumnMapping = null - for columnMapping in @columnMappings - if columnMapping.generatedColumn > generatedColumn - break - else - lastColumnMapping = columnMapping - if lastColumnMapping - answer = [lastColumnMapping.sourceLine, lastColumnMapping.sourceColumn] - -#### SourceMap - -# Maps locations in a generated source file back to locations in the original source file. -# -# This is intentionally agnostic towards how a source map might be represented on disk. A -# SourceMap can be converted to a "v3" style sourcemap with `#generateV3SourceMap()`, for example -# but the SourceMap class itself knows nothing about v3 source maps. - -class exports.SourceMap - constructor: () -> - # `generatedLines` is an array of LineMappings, one per generated line. - @generatedLines = [] - - # Adds a mapping to this SourceMap. - # - # `sourceLocation` and `generatedLocation` are both [line, column] arrays. - # - # If `options.noReplace` is true, then if there is already a mapping for - # the specified `generatedLine` and `generatedColumn`, this will have no effect. - addMapping: (sourceLocation, generatedLocation, options={}) -> - [generatedLine, generatedColumn] = generatedLocation - - lineMapping = @generatedLines[generatedLine] - if not lineMapping - lineMapping = @generatedLines[generatedLine] = new LineMapping(generatedLine) - - lineMapping.addMapping generatedColumn, sourceLocation, options - - # Returns [sourceLine, sourceColumn], or null if no mapping could be found. - getSourcePosition: ([generatedLine, generatedColumn]) -> - answer = null - lineMapping = @generatedLines[generatedLine] - if not lineMapping - # TODO: Search backwards for the line? - else - answer = lineMapping.getSourcePosition generatedColumn - - answer - - - # `fn` will be called once for every recorded mapping, in the order in - # which they occur in the generated source. `fn` will be passed an object - # with four properties: sourceLine, sourceColumn, generatedLine, and - # generatedColumn. - forEachMapping: (fn) -> - for lineMapping, generatedLineNumber in @generatedLines - if lineMapping - for columnMapping in lineMapping.columnMappings - fn(columnMapping) - - -#### generateV3SourceMap - -# Builds a V3 source map from a SourceMap object. -# Returns the generated JSON as a string. - -exports.generateV3SourceMap = (sourceMap, sourceFile=null, generatedFile=null) -> - writingGeneratedLine = 0 - lastGeneratedColumnWritten = 0 - lastSourceLineWritten = 0 - lastSourceColumnWritten = 0 - needComma = no - - mappings = "" - - sourceMap.forEachMapping (mapping) -> - while writingGeneratedLine < mapping.generatedLine - lastGeneratedColumnWritten = 0 - needComma = no - mappings += ";" - writingGeneratedLine++ - - # Write a comma if we've already written a segment on this line. - if needComma - mappings += "," - needComma = no - - # Write the next segment. - # Segments can be 1, 4, or 5 values. If just one, then it is a generated column which - # doesn't match anything in the source code. - # - # Fields are all zero-based, and relative to the previous occurence unless otherwise noted: - # * starting-column in generated source, relative to previous occurence for the current line. - # * index into the "sources" list - # * starting line in the original source - # * starting column in the original source - # * index into the "names" list associated with this segment. - - # Add the generated start-column - mappings += exports.vlqEncodeValue(mapping.generatedColumn - lastGeneratedColumnWritten) - lastGeneratedColumnWritten = mapping.generatedColumn - - # Add the index into the sources list - mappings += exports.vlqEncodeValue(0) - - # Add the source start-line - mappings += exports.vlqEncodeValue(mapping.sourceLine - lastSourceLineWritten) - lastSourceLineWritten = mapping.sourceLine - - # Add the source start-column - mappings += exports.vlqEncodeValue(mapping.sourceColumn - lastSourceColumnWritten) - lastSourceColumnWritten = mapping.sourceColumn - - # TODO: Do we care about symbol names for CoffeeScript? Probably not. - - needComma = yes - - answer = { - version: 3 - file: generatedFile - sourceRoot: "" - sources: if sourceFile then [sourceFile] else [] - names: [] - mappings - } - - return JSON.stringify answer, null, 2 - -# Load a SourceMap from a JSON string. Returns the SourceMap object. -exports.loadV3SourceMap = (sourceMap) -> - todo() - -#### Base64 encoding helpers - -BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -MAX_BASE64_VALUE = BASE64_CHARS.length - 1 - -encodeBase64Char = (value) -> - if value > MAX_BASE64_VALUE - throw new Error "Cannot encode value #{value} > #{MAX_BASE64_VALUE}" - else if value < 0 - throw new Error "Cannot encode value #{value} < 0" - BASE64_CHARS[value] - -decodeBase64Char = (char) -> - value = BASE64_CHARS.indexOf char - if value == -1 - throw new Error "Invalid Base 64 character: #{char}" - value - -#### Base 64 VLQ encoding/decoding helpers - -# Note that SourceMap VLQ encoding is "backwards". MIDI style VLQ encoding puts the -# most-significant-bit (MSB) from the original value into the MSB of the VLQ encoded value -# (see http://en.wikipedia.org/wiki/File:Uintvar_coding.svg). SourceMap VLQ does things -# the other way around, with the least significat four bits of the original value encoded -# into the first byte of the VLQ encoded value. - -VLQ_SHIFT = 5 -VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT # 0010 0000 -VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1 # 0001 1111 - -# Encode a value as Base 64 VLQ. -exports.vlqEncodeValue = (value) -> - # Least significant bit represents the sign. - signBit = if value < 0 then 1 else 0 - - # Next bits are the actual value - valueToEncode = (Math.abs(value) << 1) + signBit - - answer = "" - # Make sure we encode at least one character, even if valueToEncode is 0. - while valueToEncode || !answer - nextVlqChunk = valueToEncode & VLQ_VALUE_MASK - valueToEncode = valueToEncode >> VLQ_SHIFT - - if valueToEncode - nextVlqChunk |= VLQ_CONTINUATION_BIT - - answer += encodeBase64Char(nextVlqChunk) - - return answer - -# Decode a Base 64 VLQ value. -# -# Returns `[value, consumed]` where `value` is the decoded value, and `consumed` is the number -# of characters consumed from `str`. -exports.vlqDecodeValue = (str, offset=0) -> - position = offset - done = false - - value = 0 - continuationShift = 0 - - while !done - nextVlqChunk = decodeBase64Char(str[position]) - position += 1 - - nextChunkValue = nextVlqChunk & VLQ_VALUE_MASK - value += (nextChunkValue << continuationShift) - - if !(nextVlqChunk & VLQ_CONTINUATION_BIT) - # We'll be done after this character. - done = true - - # Bits are encoded least-significant first (opposite of MIDI VLQ). Increase the - # continuationShift, so the next byte will end up where it should in the value. - continuationShift += VLQ_SHIFT - - consumed = position - offset - - # Least significant bit represents the sign. - signBit = value & 1 - value = value >> 1 - - if signBit then value = -value - - return [value, consumed] \ No newline at end of file diff --git a/src/sourcemap.litcoffee b/src/sourcemap.litcoffee new file mode 100644 index 0000000000..1fba4a4384 --- /dev/null +++ b/src/sourcemap.litcoffee @@ -0,0 +1,180 @@ +Source maps allow JavaScript runtimes to match running JavaScript back to +the original source code that corresponds to it. This can be minified +JavaScript, but in our case, we're concerned with mapping pretty-printed +JavaScript back to CoffeeScript. + +In order to produce maps, we must keep track of positions (line number, column number) +that originated every node in the syntax tree, and be able to generate a +[map file](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit) +— which is a compact, VLQ-encoded representation of the JSON serialization +of this information — to write out alongside the generated JavaScript. + + +LineMap +------- + +A **LineMap** object keeps track of information about original line and column +positions for a single line of output JavaScript code. +**SourceMaps** are implemented in terms of **LineMaps**. + + class LineMap + constructor: (@line) -> + @columns = [] + + add: (column, [sourceLine, sourceColumn], options={}) -> + return if @columns[column] and options.noReplace + @columns[column] = {line: @line, column, sourceLine, sourceColumn} + + sourceLocation: (column) -> + column-- until (mapping = @columns[column]) or (column <= 0) + mapping and [mapping.sourceLine, mapping.sourceColumn] + + +SourceMap +--------- + +Maps locations in a single generated JavaScript file back to locations in +the original CoffeeScript source file. + +This is intentionally agnostic towards how a source map might be represented on +disk. Once the compiler is ready to produce a "v3"-style source map, we can walk +through the arrays of line and column buffer to produce it. + + class SourceMap + constructor: -> + @lines = [] + +Adds a mapping to this SourceMap. `sourceLocation` and `generatedLocation` +are both `[line, column]` arrays. If `options.noReplace` is true, then if there +is already a mapping for the specified `line` and `column`, this will have no +effect. + + add: (sourceLocation, generatedLocation, options = {}) -> + [line, column] = generatedLocation + lineMap = (@lines[line] or= new LineMap(line)) + lineMap.add column, sourceLocation, options + +Look up the original position of a given `line` and `column` in the generated +code. + + sourceLocation: ([line, column]) -> + line-- until (lineMap = @lines[line]) or (line <= 0) + lineMap and lineMap.sourceLocation column + + +V3 SourceMap Generation +----------------------- + +Builds up a V3 source map, returning the generated JSON as a string. +`options.sourceRoot` may be used to specify the sourceRoot written to the source +map. Also, `options.sourceFiles` and `options.generatedFile` may be passed to +set "sources" and "file", respectively. + + generate: (options = {}, code = null) -> + writingline = 0 + lastColumn = 0 + lastSourceLine = 0 + lastSourceColumn = 0 + needComma = no + buffer = "" + + for lineMap, lineNumber in @lines when lineMap + for mapping in lineMap.columns when mapping + while writingline < mapping.line + lastColumn = 0 + needComma = no + buffer += ";" + writingline++ + +Write a comma if we've already written a segment on this line. + + if needComma + buffer += "," + needComma = no + +Write the next segment. Segments can be 1, 4, or 5 values. If just one, then it +is a generated column which doesn't match anything in the source code. + +The starting column in the generated source, relative to any previous recorded +column for the current line: + + buffer += @encodeVlq mapping.column - lastColumn + lastColumn = mapping.column + +The index into the list of sources: + + buffer += @encodeVlq 0 + +The starting line in the original source, relative to the previous source line. + + buffer += @encodeVlq mapping.sourceLine - lastSourceLine + lastSourceLine = mapping.sourceLine + +The starting column in the original source, relative to the previous column. + + buffer += @encodeVlq mapping.sourceColumn - lastSourceColumn + lastSourceColumn = mapping.sourceColumn + needComma = yes + +Produce the canonical JSON object format for a "v3" source map. + + v3 = + version: 3 + file: options.generatedFile or '' + sourceRoot: options.sourceRoot or '' + sources: options.sourceFiles or [''] + names: [] + mappings: buffer + + v3.sourcesContent = [code] if options.inline + + JSON.stringify v3, null, 2 + + +Base64 VLQ Encoding +------------------- + +Note that SourceMap VLQ encoding is "backwards". MIDI-style VLQ encoding puts +the most-significant-bit (MSB) from the original value into the MSB of the VLQ +encoded value (see [Wikipedia](http://en.wikipedia.org/wiki/File:Uintvar_coding.svg)). +SourceMap VLQ does things the other way around, with the least significat four +bits of the original value encoded into the first byte of the VLQ encoded value. + + VLQ_SHIFT = 5 + VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT # 0010 0000 + VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1 # 0001 1111 + + encodeVlq: (value) -> + answer = '' + + # Least significant bit represents the sign. + signBit = if value < 0 then 1 else 0 + + # The next bits are the actual value. + valueToEncode = (Math.abs(value) << 1) + signBit + + # Make sure we encode at least one character, even if valueToEncode is 0. + while valueToEncode or not answer + nextChunk = valueToEncode & VLQ_VALUE_MASK + valueToEncode = valueToEncode >> VLQ_SHIFT + nextChunk |= VLQ_CONTINUATION_BIT if valueToEncode + answer += @encodeBase64 nextChunk + + answer + + +Regular Base64 Encoding +----------------------- + + BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + + encodeBase64: (value) -> + BASE64_CHARS[value] or throw new Error "Cannot Base64 encode value: #{value}" + + +Our API for source maps is just the `SourceMap` class. + + module.exports = SourceMap + + + diff --git a/test/classes.coffee b/test/classes.coffee index ad3d673fff..a8cdebf242 100644 --- a/test/classes.coffee +++ b/test/classes.coffee @@ -337,6 +337,18 @@ test "#2502: parenthesizing inner object values", -> eq (new A).sections.default, 0 +test "conditional prototype property assignment", -> + debug = false + + class Person + if debug + age: -> 10 + else + age: -> 20 + + eq (new Person).age(), 20 + + test "mild metaprogramming", -> class Base @@ -730,13 +742,52 @@ test "#2359: extending native objects that use other typed constructors requires eq 'yes!', workingArray.method() -test "#2489: removing __bind", -> +test "#2782: non-alphanumeric-named bound functions", -> + class A + 'b:c': => + 'd' + + eq (new A)['b:c'](), 'd' + + +test "#2781: overriding bound functions", -> + class A + a: -> + @b() + b: => + 1 + + class B extends A + b: => + 2 + + b = (new A).b + eq b(), 1 + + b = (new B).b + eq b(), 2 + + +test "#2791: bound function with destructured argument", -> + class Foo + method: ({a}) => 'Bar' + + eq (new Foo).method({a: 'Bar'}), 'Bar' - class Thing - foo: (a, b, c) -> - bar: (a, b, c) => - thing = new Thing +test "#2796: ditto, ditto, ditto", -> + answer = null + + outsideMethod = (func) -> + func.call message: 'wrong!' + + class Base + constructor: -> + @message = 'right!' + outsideMethod @echo + + echo: => + answer = @message - eq thing.foo.length, 3 - eq thing.bar.length, 3 + new Base + eq answer, 'right!' diff --git a/test/cluster.coffee b/test/cluster.coffee new file mode 100644 index 0000000000..82d4faed96 --- /dev/null +++ b/test/cluster.coffee @@ -0,0 +1,15 @@ +# Cluster Module +# --------- + +return if testingBrowser? + +cluster = require 'cluster' + +if cluster.isMaster + test "#2737 - cluster module can spawn workers from a coffeescript process", -> + cluster.once 'exit', (worker, code) -> + eq code, 0 + + cluster.fork() +else + process.exit 0 diff --git a/test/comments.coffee b/test/comments.coffee index d3f8aec785..bd1ac912e2 100644 --- a/test/comments.coffee +++ b/test/comments.coffee @@ -205,3 +205,9 @@ test "block comments inside class bodies", -> test "#2037: herecomments shouldn't imply line terminators", -> do (-> ### ###; fail) + +test "#2916: block comment before implicit call with implicit object", -> + fn = (obj) -> ok obj.a + ### ### + fn + a: yes diff --git a/test/compilation.coffee b/test/compilation.coffee index 4b8397ae07..6d63a91409 100644 --- a/test/compilation.coffee +++ b/test/compilation.coffee @@ -70,3 +70,18 @@ test "#1106: __proto__ compilation", -> test "reference named hasOwnProperty", -> CoffeeScript.compile 'hasOwnProperty = 0; a = 1' + +test "#1055: invalid keys in real (but not work-product) objects", -> + cantCompile "@key: value" + +test "#1066: interpolated strings are not implicit functions", -> + cantCompile '"int#{er}polated" arg' + +test "#2846: while with empty body", -> + CoffeeScript.compile 'while 1 then', {sourceMap: true} + +test "#2944: implicit call with a regex argument", -> + CoffeeScript.compile 'o[key] /regex/' + +test "#3001: `own` shouldn't be allowed in a `for`-`in` loop", -> + cantCompile "a for own b in c" \ No newline at end of file diff --git a/test/comprehensions.coffee b/test/comprehensions.coffee index 20bf81eb52..d8007d0022 100644 --- a/test/comprehensions.coffee +++ b/test/comprehensions.coffee @@ -473,7 +473,7 @@ test "#1910: loop index should be mutable within a loop iteration and immutable arr = ([v, v + 1] for v in [0..5]) iterations = 0 - for own [v0, v1], k in arr when v0 + for [v0, v1], k in arr when v0 k += 3 ++iterations eq 6, k diff --git a/test/control_flow.coffee b/test/control_flow.coffee index f2b04eaad5..4cc1033369 100644 --- a/test/control_flow.coffee +++ b/test/control_flow.coffee @@ -427,3 +427,18 @@ test "Throw should be usable as an expression.", -> throw new Error 'failed' catch e ok e is 'up' + + +test "#2555, strange function if bodies", -> + success = -> ok true + failure = -> ok false + + success() if do -> + yes + + failure() if try + false + +test "#1057: `catch` or `finally` in single-line functions", -> + ok do -> try throw 'up' catch then yes + ok do -> try yes finally 'nothing' diff --git a/test/error_messages.coffee b/test/error_messages.coffee new file mode 100644 index 0000000000..6c1f6fab0d --- /dev/null +++ b/test/error_messages.coffee @@ -0,0 +1,44 @@ +# Error Formating +# --------------- + +# Ensure that errors of different kinds (lexer, parser and compiler) are shown +# in a consistent way. + +{prettyErrorMessage} = CoffeeScript.helpers + +assertErrorFormat = (code, expectedErrorFormat) -> + throws (-> CoffeeScript.compile code), (err) -> + message = prettyErrorMessage err, 'test.coffee', code + eq expectedErrorFormat, message + yes + +test "lexer errors formating", -> + assertErrorFormat ''' + normalObject = {} + insideOutObject = }{ + ''', + ''' + test.coffee:2:19: error: unmatched } + insideOutObject = }{ + ^ + ''' + +test "parser error formating", -> + assertErrorFormat ''' + foo in bar or in baz + ''', + ''' + test.coffee:1:15: error: unexpected RELATION + foo in bar or in baz + ^^ + ''' + +test "compiler error formatting", -> + assertErrorFormat ''' + evil = (foo, eval, bar) -> + ''', + ''' + test.coffee:1:14: error: parameter name "eval" is not allowed + evil = (foo, eval, bar) -> + ^^^^ + ''' \ No newline at end of file diff --git a/test/exception_handling.coffee b/test/exception_handling.coffee index 3c525fb18a..3c3240b778 100644 --- a/test/exception_handling.coffee +++ b/test/exception_handling.coffee @@ -129,3 +129,14 @@ test "Try catch finally as implicit arguments", -> bar = yes catch e eq bar, yes + +# Catch Should Not Require Param: #2900 +test "parameter-less catch clause", -> + try + throw new Error 'failed' + catch + ok true + + try throw new Error 'failed' catch finally ok true + + ok try throw new Error 'failed' catch then true diff --git a/test/formatting.coffee b/test/formatting.coffee index 6f52aa2608..99cc15f48f 100644 --- a/test/formatting.coffee +++ b/test/formatting.coffee @@ -143,4 +143,4 @@ test "#1299: Disallow token misnesting", -> ''' ok no catch e - eq 'unmatched ] on line 2', e.message + eq 'unmatched ]', e.message diff --git a/test/helpers.coffee b/test/helpers.coffee index 6681908409..5588ab9149 100644 --- a/test/helpers.coffee +++ b/test/helpers.coffee @@ -2,7 +2,7 @@ # ------- # pull the helpers from `CoffeeScript.helpers` into local variables -{starts, ends, compact, count, merge, extend, flatten, del, last} = CoffeeScript.helpers +{starts, ends, repeat, compact, count, merge, extend, flatten, del, last, baseFileName} = CoffeeScript.helpers # `starts` @@ -27,6 +27,15 @@ test "the `ends` helper can take an optional offset", -> ok not ends('01234', '234', 6) +# `repeat` + +test "the `repeat` helper concatenates a given number of times", -> + eq 'asdasdasd', repeat('asd', 3) + +test "`repeat`ing a string 0 times always returns the empty string", -> + eq '', repeat('whatever', 0) + + # `compact` test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> @@ -94,3 +103,33 @@ test "the `last` helper returns the last item of an array-like object", -> test "the `last` helper allows one to specify an optional offset", -> ary = [0, 1, 2, 3, 4] eq 2, last(ary, 2) + +# `baseFileName` + +test "the `baseFileName` helper returns the file name to write to", -> + ext = '.js' + sourceToCompiled = + '.coffee': ext + 'a.coffee': 'a' + ext + 'b.coffee': 'b' + ext + 'coffee.coffee': 'coffee' + ext + + '.litcoffee': ext + 'a.litcoffee': 'a' + ext + 'b.litcoffee': 'b' + ext + 'coffee.litcoffee': 'coffee' + ext + + '.lit': ext + 'a.lit': 'a' + ext + 'b.lit': 'b' + ext + 'coffee.lit': 'coffee' + ext + + '.coffee.md': ext + 'a.coffee.md': 'a' + ext + 'b.coffee.md': 'b' + ext + 'coffee.coffee.md': 'coffee' + ext + + for sourceFileName, expectedFileName of sourceToCompiled + name = baseFileName sourceFileName, yes + filename = name + ext + eq filename, expectedFileName diff --git a/test/importing.coffee b/test/importing.coffee index 4bd8f40b64..91d56d4102 100644 --- a/test/importing.coffee +++ b/test/importing.coffee @@ -16,3 +16,19 @@ unless window? or testingBrowser? if require?.extensions? ok require(__filename).method() is magicValue delete global[magicKey] + + test "javascript modules can be imported", -> + magicVal = 1 + for module in 'test.js test2 .test2 test.extension.js test.unknownextension .coffee .coffee.md'.split ' ' + ok require("./importing/#{module}").value?() is magicVal, module + + test "coffeescript modules can be imported", -> + magicVal = 2 + for module in '.test.coffee test.coffee test.extension.coffee'.split ' ' + ok require("./importing/#{module}").value?() is magicVal, module + + test "literate coffeescript modules can be imported", -> + magicVal = 3 + # Leading space intentional to check for index.coffee.md + for module in ' .test.coffee.md test.coffee.md test.litcoffee test.extension.coffee.md'.split ' ' + ok require("./importing/#{module}").value?() is magicVal, module diff --git a/test/importing/.coffee b/test/importing/.coffee new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/.coffee @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/.coffee.md b/test/importing/.coffee.md new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/.coffee.md @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/.test.coffee b/test/importing/.test.coffee new file mode 100644 index 0000000000..ff8ad83182 --- /dev/null +++ b/test/importing/.test.coffee @@ -0,0 +1,2 @@ +# Required by ../importing.coffee +module.exports = {value: -> 2} diff --git a/test/importing/.test.coffee.md b/test/importing/.test.coffee.md new file mode 100644 index 0000000000..99459eb3c4 --- /dev/null +++ b/test/importing/.test.coffee.md @@ -0,0 +1,3 @@ +Required by ../importing.coffee + + module.exports = {value: -> 3} diff --git a/test/importing/.test2 b/test/importing/.test2 new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/.test2 @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/index.coffee.md b/test/importing/index.coffee.md new file mode 100644 index 0000000000..99459eb3c4 --- /dev/null +++ b/test/importing/index.coffee.md @@ -0,0 +1,3 @@ +Required by ../importing.coffee + + module.exports = {value: -> 3} diff --git a/test/importing/test.coffee.md b/test/importing/test.coffee.md new file mode 100644 index 0000000000..99459eb3c4 --- /dev/null +++ b/test/importing/test.coffee.md @@ -0,0 +1,3 @@ +Required by ../importing.coffee + + module.exports = {value: -> 3} diff --git a/test/importing/test.extension.coffee b/test/importing/test.extension.coffee new file mode 100644 index 0000000000..ff8ad83182 --- /dev/null +++ b/test/importing/test.extension.coffee @@ -0,0 +1,2 @@ +# Required by ../importing.coffee +module.exports = {value: -> 2} diff --git a/test/importing/test.extension.coffee.md b/test/importing/test.extension.coffee.md new file mode 100644 index 0000000000..99459eb3c4 --- /dev/null +++ b/test/importing/test.extension.coffee.md @@ -0,0 +1,3 @@ +Required by ../importing.coffee + + module.exports = {value: -> 3} diff --git a/test/importing/test.extension.js b/test/importing/test.extension.js new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/test.extension.js @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/test.js b/test/importing/test.js new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/test.js @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/test.unknownextension b/test/importing/test.unknownextension new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/test.unknownextension @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/importing/test2 b/test/importing/test2 new file mode 100644 index 0000000000..34f70d6982 --- /dev/null +++ b/test/importing/test2 @@ -0,0 +1,2 @@ +// Required by ../importing.coffee +module.exports = {value: function(){return 1;}}; diff --git a/test/literate.litcoffee b/test/literate.litcoffee index 75f8b76f85..c296827580 100644 --- a/test/literate.litcoffee +++ b/test/literate.litcoffee @@ -17,6 +17,15 @@ now with a... ... nested block. ok yes + +Code must be separated from text by a blank line. + + test "code blocks must be preceded by a blank line", -> + +The next line is part of the text and will not be executed. + fail() + + ok yes Code in `backticks is not parsed` and... @@ -44,5 +53,5 @@ and unordered lists, are fine: Tabs work too: - test "tabbed code", -> - ok yes + test "tabbed code", -> + ok yes diff --git a/test/repl.coffee b/test/repl.coffee index 25877cee18..084cb1d324 100644 --- a/test/repl.coffee +++ b/test/repl.coffee @@ -1,5 +1,7 @@ return if global.testingBrowser +fs = require 'fs' + # REPL # ---- Stream = require 'stream' @@ -25,16 +27,23 @@ class MockOutputStream extends Stream lastWrite: (fromEnd = -1) -> @written[@written.length - 1 + fromEnd].replace /\n$/, '' +# Create a dummy history file +historyFile = '.coffee_history_test' +fs.writeFileSync historyFile, '1 + 2\n' testRepl = (desc, fn) -> input = new MockInputStream output = new MockOutputStream - Repl.start {input, output} - test desc, -> fn input, output + repl = Repl.start {input, output, historyFile} + test desc, -> fn input, output, repl ctrlV = { ctrl: true, name: 'v'} +testRepl 'reads history file', (input, output, repl) -> + input.emitLine repl.rli.history[0] + eq '3', output.lastWrite() + testRepl "starts with coffee prompt", (input, output) -> eq 'coffee> ', output.lastWrite(0) @@ -80,3 +89,23 @@ testRepl "evaluates multiline", (input, output) -> input.emitLine ' 1 + 1' input.emit 'keypress', null, ctrlV eq '2', output.lastWrite() + +testRepl "variables in scope are preserved", (input, output) -> + input.emitLine 'a = 1' + input.emitLine 'do -> a = 2' + input.emitLine 'a' + eq '2', output.lastWrite() + +testRepl "existential assignment of previously declared variable", (input, output) -> + input.emitLine 'a = null' + input.emitLine 'a ?= 42' + eq '42', output.lastWrite() + +testRepl "keeps running after runtime error", (input, output) -> + input.emitLine 'a = b' + eq 0, output.lastWrite().indexOf 'ReferenceError: b is not defined' + input.emitLine 'a' + eq 'undefined', output.lastWrite() + +process.on 'exit', -> + fs.unlinkSync historyFile diff --git a/test/sourcemap.coffee b/test/sourcemap.coffee index 2770fb6c1b..e1054d954f 100644 --- a/test/sourcemap.coffee +++ b/test/sourcemap.coffee @@ -1,6 +1,6 @@ return if global.testingBrowser -sourcemap = require '../src/sourcemap' +SourceMap = require '../src/sourcemap' vlqEncodedValues = [ [1, "C"], @@ -12,35 +12,30 @@ vlqEncodedValues = [ [948, "o7B"] ] -test "vlqEncodeValue tests", -> +test "encodeVlq tests", -> for pair in vlqEncodedValues - eq (sourcemap.vlqEncodeValue pair[0]), pair[1] - -test "vlqDecodeValue tests", -> - for pair in vlqEncodedValues - arrayEq (sourcemap.vlqDecodeValue pair[1]), [pair[0], pair[1].length] - -test "vlqDecodeValue with offset", -> - for pair in vlqEncodedValues - # Try with an offset, and some cruft at the end. - arrayEq (sourcemap.vlqDecodeValue ("abc" + pair[1] + "efg"), 3), [pair[0], pair[1].length] + eq ((new SourceMap).encodeVlq pair[0]), pair[1] eqJson = (a, b) -> eq (JSON.stringify JSON.parse a), (JSON.stringify JSON.parse b) test "SourceMap tests", -> - map = new sourcemap.SourceMap() - map.addMapping [0, 0], [0, 0] - map.addMapping [1, 5], [2, 4] - map.addMapping [1, 6], [2, 7] - map.addMapping [1, 9], [2, 8] - map.addMapping [3, 0], [3, 4] - - eqJson (sourcemap.generateV3SourceMap map, "source.coffee", "source.js"), '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}' - eqJson (sourcemap.generateV3SourceMap map), '{"version":3,"file":null,"sourceRoot":"","sources":[],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}' + map = new SourceMap + map.add [0, 0], [0, 0] + map.add [1, 5], [2, 4] + map.add [1, 6], [2, 7] + map.add [1, 9], [2, 8] + map.add [3, 0], [3, 4] + + testWithFilenames = map.generate { + sourceRoot: "", + sourceFiles: ["source.coffee"], + generatedFile: "source.js"} + eqJson testWithFilenames, '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}' + eqJson map.generate(), '{"version":3,"file":"","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}' # Look up a generated column - should get back the original source position. - arrayEq map.getSourcePosition([2,8]), [1,9] + arrayEq map.sourceLocation([2,8]), [1,9] # Look up a point futher along on the same line - should get back the same source position. - arrayEq map.getSourcePosition([2,10]), [1,9] + arrayEq map.sourceLocation([2,10]), [1,9] diff --git a/test/test.html b/test/test.html index a09692c974..c12c434709 100644 --- a/test/test.html +++ b/test/test.html @@ -88,6 +88,7 @@

    CoffeeScript Test Suite

    'assignment' 'booleans' 'classes' + 'cluster' 'comments' 'compilation' 'comprehensions' @@ -111,6 +112,8 @@

    CoffeeScript Test Suite

    'soaks' 'strings' ] + # allow utf-8 chars in comments + # 智に働けば角が立つ、情に掉させば流される。