CoffeeScript.eval = (code, options = {}) ->
+ CoffeeScript.eval = (code, options = {}) ->
options.bare ?= on
eval compile code, options
@@ -157,8 +157,8 @@ compile = CoffeeScript.compile
diff --git a/bower.json b/bower.json index 327b2d81..06725e95 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "coffee-script", - "version": "1.10.0", + "version": "1.11.0", "main": [ "lib/coffee-script/coffee-script.js" ], diff --git a/documentation/docs/browser.html b/documentation/docs/browser.html index b3b0dd35..1903059a 100644 --- a/documentation/docs/browser.html +++ b/documentation/docs/browser.html @@ -140,7 +140,7 @@ compile = CoffeeScript.compile -
CoffeeScript.eval = (code, options = {}) ->
+ CoffeeScript.eval = (code, options = {}) ->
options.bare ?= on
eval compile code, options
@@ -157,8 +157,8 @@ compile = CoffeeScript.compile
CoffeeScript.run = (code, options = {}) ->
- options.bare = on
+ CoffeeScript.run = (code, options = {}) ->
+ options.bare = on
options.shiftLine = on
Function(compile code, options)()
@@ -192,12 +192,10 @@ Ported from h
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"
if btoa? and JSON?
+ compile = (code, options = {}) ->
+ options.inlineMap = true
+ CoffeeScript.compile code, options
CoffeeScript.load = (url, callback, options = {}, hold = false) ->
+ CoffeeScript.load = (url, callback, options = {}, hold = false) ->
options.sourceFiles = [url]
xhr = if window.ActiveXObject
new window.ActiveXObject('Microsoft.XMLHTTP')
@@ -220,7 +218,7 @@ Ported from h
new window.XMLHttpRequest()
xhr.open 'GET', url, true
xhr.overrideMimeType 'text/plain' if 'overrideMimeType' of xhr
- xhr.onreadystatechange = ->
+ xhr.onreadystatechange = ->
if xhr.readyState is 4
if xhr.status in [0, 200]
param = [xhr.responseText, options]
@@ -250,8 +248,8 @@ This happens on page load.
coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']
coffees = (s for s in scripts when s.type in coffeetypes)
index = 0
-
- execute = ->
+
+ execute = ->
param = coffees[index]
if param instanceof Array
CoffeeScript.run param...
@@ -259,8 +257,8 @@ This happens on page load.
execute()
for script, i in coffees
- do (script, i) ->
- options = literate: script.type is coffeetypes[1]
+ do (script, i) ->
+ options = literate: script.type is coffeetypes[1]
source = script.src or script.getAttribute('data-src')
if source
CoffeeScript.load source,
diff --git a/documentation/docs/cake.html b/documentation/docs/cake.html
index e68005b4..98f29fb1 100644
--- a/documentation/docs/cake.html
+++ b/documentation/docs/cake.html
@@ -205,7 +205,7 @@ and the function to run as the action itself.
- task: (name, description, action) ->
+ task: (name, description, action) ->
[action, description] = [description, action] unless action
tasks[name] = {name, description, action}
@@ -224,7 +224,7 @@ as the first argument to the action.
- option: (letter, flag, description) ->
+ option: (letter, flag, description) ->
switches.push [letter, flag, description]
@@ -240,7 +240,7 @@ as the first argument to the action.
- invoke: (name) ->
+ invoke: (name) ->
missingTask name unless tasks[name]
tasks[name].action options
@@ -260,11 +260,11 @@ original directory name, when running Cake tasks from subdirectories.
- exports.run = ->
+ exports.run = ->
global.__originalDirname = fs.realpathSync '.'
process.chdir cakefileDirectory __originalDirname
args = process.argv[2..]
- CoffeeScript.run fs.readFileSync('Cakefile').toString(), filename: 'Cakefile'
+ CoffeeScript.run fs.readFileSync('Cakefile').toString(), filename: 'Cakefile'
oparse = new optparse.OptionParser switches
return printTasks() unless args.length
try
@@ -314,8 +314,8 @@ original directory name, when running Cake tasks from subdirectories.
console.error message + '\n'
console.log 'To see a list of all tasks/options, run "cake"'
process.exit 1
-
-missingTask = (task) -> fatalError "No such task: #{task}"
+
+missingTask = (task) -> fatalError "No such task: #{task}"
diff --git a/documentation/docs/coffee-script.html b/documentation/docs/coffee-script.html
index ac4bf93c..07141a01 100644
--- a/documentation/docs/coffee-script.html
+++ b/documentation/docs/coffee-script.html
@@ -144,9 +144,9 @@ SourceMap = require exports.VERSION = '1.10.0'
+ exports.VERSION = '1.11.0'
-exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']
+exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']
@@ -161,7 +161,7 @@ SourceMap = require exports.helpers = helpers
+ exports.helpers = helpers
@@ -172,18 +172,17 @@ SourceMap = require
¶
- Function wrapper to add source file information to SyntaxErrors thrown by the
-lexer/parser/compiler.
+ Function that allows for btoa in both nodejs and the browser.
- withPrettyErrors = (fn) ->
- (code, options = {}) ->
- try
- fn.call @, code, options
- catch err
- throw err if typeof code isnt 'string' # Support `CoffeeScript.nodes(tokens)`.
- throw helpers.updateSyntaxError err, code, options.filename
+ base64encode = (src) -> switch
+ when typeof Buffer is 'function'
+ new Buffer(src).toString('base64')
+ when typeof btoa is 'function'
+ btoa(src)
+ else
+ throw new Error('Unable to base64 encode inline sourcemap.')
@@ -194,6 +193,28 @@ lexer/parser/compiler.
+ Function wrapper to add source file information to SyntaxErrors thrown by the
+lexer/parser/compiler.
+
+
withPrettyErrors = (fn) ->
+ (code, options = {}) ->
+ try
+ fn.call @, code, options
+ catch err
+ throw err if typeof code isnt 'string' # Support `CoffeeScript.nodes(tokens)`.
+ throw helpers.updateSyntaxError err, code, options.filename
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.
exports.compile = compile = withPrettyErrors (code, options) ->
+ exports.compile = compile = withPrettyErrors (code, options) ->
{merge, extend} = helpers
options = extend {}, options
+ generateSourceMap = options.sourceMap or options.inlineMap
- if options.sourceMap
+ if generateSourceMap
map = new SourceMap
tokens = lexer.tokenize code, options
@@ -216,11 +238,11 @@ lookups.
-
Pass a list of referenced variables, so that generated variables won’t get the same name.
@@ -228,8 +250,27 @@ the same name. options.referencedVars = (
- token[1] for token in tokens when token.variable
- )
+ token[1] for token in tokens when token[0] is 'IDENTIFIER'
+ )
Check for import or export; if found, force bare mode
+ + unless options.bare? and options.bare is yes
+ for token in tokens
+ if token[0] in ['IMPORT', 'EXPORT']
+ options.bare = yes
+ break
fragments = parser.parse(tokens).compileToFragments options
@@ -243,69 +284,17 @@ the same name.
-
Update the sourcemap with data from each fragment
- - if options.sourceMap
Do not include empty, whitespace, or semicolon-only fragments.
- - if fragment.locationData and not /^[;\s]*$/.test fragment.code
- map.add(
- [fragment.locationData.first_line, fragment.locationData.first_column]
- [currentLine, currentColumn]
- {noReplace: true})
- newLines = helpers.count fragment.code, "\n"
- currentLine += newLines
- if newLines
- currentColumn = fragment.code.length - (fragment.code.lastIndexOf("\n") + 1)
- else
- currentColumn += fragment.code.length
Copy the code from each fragment into the final JavaScript.
+Update the sourcemap with data from each fragment
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
if generateSourceMap
Tokenize a string of CoffeeScript code, and return the array of tokens.
+Do not include empty, whitespace, or semicolon-only fragments.
exports.tokens = withPrettyErrors (code, options) ->
- lexer.tokenize code, options
if fragment.locationData and not /^[;\s]*$/.test fragment.code
+ map.add(
+ [fragment.locationData.first_line, fragment.locationData.first_column]
+ [currentLine, currentColumn]
+ {noReplace: true})
+ newLines = helpers.count fragment.code, "\n"
+ currentLine += newLines
+ if newLines
+ currentColumn = fragment.code.length - (fragment.code.lastIndexOf("\n") + 1)
+ else
+ currentColumn += fragment.code.length
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.
Copy the code from each fragment into the final JavaScript.
exports.nodes = withPrettyErrors (source, options) ->
- if typeof source is 'string'
- parser.parse lexer.tokenize source, options
+ js += fragment.code
+
+ if options.header
+ header = "Generated by CoffeeScript #{@VERSION}"
+ js = "// #{header}\n#{js}"
+
+ if generateSourceMap
+ v3SourceMap = map.generate(options, code)
+
+ if options.inlineMap
+ encoded = base64encode JSON.stringify v3SourceMap
+ sourceMapDataURI = "//# sourceMappingURL=data:application/json;base64,#{encoded}"
+ sourceURL = "//# sourceURL=#{options.filename ? 'coffeescript'}"
+ js = "#{js}\n#{sourceMapDataURI}\n#{sourceURL}"
+
+ if options.sourceMap
+ {
+ js
+ sourceMap: map
+ v3SourceMap: JSON.stringify v3SourceMap, null, 2
+ }
else
- parser.parse source
+ js
.traverseChildren()
with a callback.
- Compile and execute a string of CoffeeScript (on the server), correctly
-setting __filename
, __dirname
, and relative require()
.
Tokenize a string of CoffeeScript code, and return the array of tokens.
exports.run = (code, options = {}) ->
- mainModule = require.main
exports.tokens = withPrettyErrors (code, options) ->
+ lexer.tokenize code, options
__filename
, __dirname
, and relative requ
+ 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 = withPrettyErrors (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.
__filename
, __dirname
, and relative requ
Clear the module cache.
@@ -395,11 +446,11 @@ setting__filename
, __dirname
, and relative requ
-
+
Assign paths for node_modules loading
@@ -414,11 +465,11 @@ setting __filename
, __dirname
, and relative requ
-
+
Compile.
@@ -433,22 +484,22 @@ setting __filename
, __dirname
, and relative requ
-
+
Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.
- exports.eval = (code, options = {}) ->
+ exports.eval = (code, options = {}) ->
return unless code = code.trim()
createContext = vm.Script.createContext ? vm.createContext
- isContext = vm.isContext ? (ctx) ->
+ isContext = vm.isContext ? (ctx) ->
options.sandbox instanceof createContext().constructor
if createContext
@@ -467,11 +518,11 @@ The CoffeeScript REPL uses this to run the input.
-
+
define module/require only if they chose not to specify their own
@@ -480,7 +531,7 @@ The CoffeeScript REPL uses this to run the input.
unless sandbox isnt global or sandbox.module or sandbox.require
Module = require 'module'
sandbox.module = _module = new Module(options.modulename || 'eval')
- sandbox.require = _require = (path) -> Module._load path, _module, true
+ sandbox.require = _require = (path) -> Module._load path, _module, true
_module.filename = sandbox.__filename
for r in Object.getOwnPropertyNames require when r not in ['paths', 'arguments', 'caller']
_require[r] = require[r]
@@ -488,66 +539,70 @@ The CoffeeScript REPL uses this to run the input.
-
-
-
-
- ¶
-
- use the same hack node currently uses for their own REPL
-
-
-
- _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
- _require.resolve = (request) -> Module._resolveFilename request, _module
- o = {}
- o[k] = v for own k, v of options
- o.bare = on # ensure return value
- js = compile code, o
- if sandbox is global
- vm.runInThisContext js
- else
- vm.runInContext js, sandbox
-
-exports.register = -> require './register'
-
-
-
-
-
-
-
-
- ¶
-
- Throw error with deprecation warning when depending upon implicit require.extensions
registration
-
-
-
- if require.extensions
- for ext in @FILE_EXTENSIONS
- require.extensions[ext] ?= ->
- throw new Error """
- Use CoffeeScript.register() or require the coffee-script/register module to require #{ext} files.
- """
-
-exports._compileFile = (filename, sourceMap = no) ->
- raw = fs.readFileSync filename, 'utf8'
- stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw
-
- try
- answer = compile(stripped, {filename, sourceMap, literate: helpers.isLiterate filename})
- catch err
-
-
-
-
+ use the same hack node currently uses for their own REPL
+
+
+
+ _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
+ _require.resolve = (request) -> Module._resolveFilename request, _module
+ o = {}
+ o[k] = v for own k, v of options
+ o.bare = on # ensure return value
+ js = compile code, o
+ if sandbox is global
+ vm.runInThisContext js
+ else
+ vm.runInContext js, sandbox
+
+exports.register = -> require './register'
+
+
+
+
+
+
+
+
+ ¶
+
+ Throw error with deprecation warning when depending upon implicit require.extensions
registration
+
+
+
+ if require.extensions
+ for ext in @FILE_EXTENSIONS then do (ext) ->
+ require.extensions[ext] ?= ->
+ throw new Error """
+ Use CoffeeScript.register() or require the coffee-script/register module to require #{ext} files.
+ """
+
+exports._compileFile = (filename, sourceMap = no, inlineMap = no) ->
+ raw = fs.readFileSync filename, 'utf8'
+ stripped = if raw.charCodeAt(0) is 0xFEFF then raw.substring 1 else raw
+
+ try
+ answer = compile stripped, {
+ filename, sourceMap, inlineMap
+ sourceFiles: [filename]
+ literate: helpers.isLiterate filename
+ }
+ catch err
+
+
+
+
+
+
+
+
+ ¶
+
As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
information to error so it can be pretty-printed later.
@@ -561,11 +616,11 @@ information to error so it can be pretty-printed later.
-
+
Instantiate a Lexer for our use here.
@@ -576,11 +631,11 @@ information to error so it can be pretty-printed later.
-
+
The real Lexer produces a generic stream of tokens. This object provides a
thin wrapper around it, compatible with the Jison API. We can then pass it
@@ -589,62 +644,62 @@ directly as a “Jison lexer”.
parser.lexer =
- lex: ->
- token = parser.tokens[@pos++]
+ lex: ->
+ token = parser.tokens[@pos++]
if token
- [tag, @yytext, @yylloc] = token
+ [tag, @yytext, @yylloc] = token
parser.errorToken = token.origin or token
- @yylineno = @yylloc.first_line
+ @yylineno = @yylloc.first_line
else
tag = ''
tag
- setInput: (tokens) ->
+ setInput: (tokens) ->
parser.tokens = tokens
- @pos = 0
- upcomingInput: ->
+ @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.
+
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 number information.
Disregard the token, we take its value directly from the lexer in case
the error is caused by a generated token which might refer to its origin.
@@ -658,7 +713,7 @@ the error is caused by a generated token which might refer to its origin.
'end of input'
when errorTag in ['INDENT', 'OUTDENT']
'indentation'
- when errorTag in ['IDENTIFIER', 'NUMBER', 'STRING', 'STRING_START', 'REGEX', 'REGEX_START']
+ when errorTag in ['IDENTIFIER', 'NUMBER', 'INFINITY', 'STRING', 'STRING_START', 'REGEX', 'REGEX_START']
errorTag.replace(/_START$/, '').toLowerCase()
else
helpers.nameWhitespaceCharacter errorText
@@ -666,11 +721,11 @@ the error is caused by a generated token which might refer to its origin.
-
+
The second argument has a loc
property, which should have the location
data for this token. Unfortunately, Jison seems to send an outdated loc
@@ -684,11 +739,11 @@ from the lexer.
-
+
Based on http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js
Modified to handle sourceMap
@@ -716,11 +771,11 @@ Modified to handle sourceMap
-
+
Check for a sourceMap position
@@ -761,11 +816,11 @@ Modified to handle sourceMap
-
+
Map of filenames -> sourceMap object.
@@ -776,11 +831,11 @@ Modified to handle sourceMap
-
+
Generates the source map for a coffee file and stores it in the local cache variable.
@@ -788,18 +843,20 @@ Modified to handle sourceMap
getSourceMap = (filename) ->
return sourceMaps[filename] if sourceMaps[filename]
- return unless path?.extname(filename) in exports.FILE_EXTENSIONS
- answer = exports._compileFile filename, true
- sourceMaps[filename] = answer.sourceMap
+ for ext in exports.FILE_EXTENSIONS
+ if helpers.ends filename, ext
+ answer = exports._compileFile filename, true
+ return sourceMaps[filename] = answer.sourceMap
+ return null
-
+
Based on michaelficarra/CoffeeScriptRedux
NodeJS / V8 have no support for transforming positions in stack traces using
@@ -808,14 +865,14 @@ positions.
- Error.prepareStackTrace = (err, stack) ->
- getSourceMapping = (filename, line, column) ->
+ Error.prepareStackTrace = (err, stack) ->
+ getSourceMapping = (filename, line, column) ->
sourceMap = getSourceMap filename
answer = sourceMap.sourceLocation [line - 1, column - 1] if sourceMap
if answer then [answer[0] + 1, answer[1] + 1] else null
frames = for frame in stack
- break if frame.getFunction() is exports.run
+ break if frame.getFunction() is exports.run
" at #{formatSourcePosition frame, getSourceMapping}"
"#{err.toString()}\n#{frames.join '\n'}\n"
diff --git a/documentation/docs/command.html b/documentation/docs/command.html
index 374b74c7..1285d848 100644
--- a/documentation/docs/command.html
+++ b/documentation/docs/command.html
@@ -160,11 +160,11 @@ useWinPathSep = path.sep is helpers.extend CoffeeScript, new EventEmitter
-
-printLine = (line) -> process.stdout.write line + '\n'
+
+printLine = (line) -> process.stdout.write line + '\n'
printWarn = (line) -> process.stderr.write line + '\n'
-
-hidden = (file) -> /^\.|~$/.test file
+
+hidden = (file) -> /^\.|~$/.test file
@@ -206,6 +206,7 @@ useWinPathSep = path.sep is '-i', '--interactive', 'run an interactive CoffeeScript REPL']
['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling']
['-m', '--map', 'generate source map and save as .js.map files']
+ ['-M', '--inline-map', 'generate source map and include it directly in output']
['-n', '--nodes', 'print out the parse tree that the parser produces']
[ '--nodejs [ARGS]', 'pass options directly to the "node" binary']
[ '--no-header', 'suppress the "Generated by" header']
@@ -254,7 +255,7 @@ Many flags cause us to divert before compiling anything. Flags passed after
- exports.run = ->
+ exports.run = ->
parseOptions()
@@ -272,7 +273,7 @@ Many flags cause us to divert before compiling anything. Flags passed after
- replCliOpts = useGlobal: yes
+ replCliOpts = useGlobal: yes
opts.prelude = makePrelude opts.require if opts.require
replCliOpts.prelude = opts.prelude
return forkNode() if opts.nodejs
@@ -306,9 +307,9 @@ Many flags cause us to divert before compiling anything. Flags passed after
for source in opts.arguments
source = path.resolve source
compilePath source, yes, source
-
-makePrelude = (requires) ->
- requires.map (module) ->
+
+makePrelude = (requires) ->
+ requires.map (module) ->
[_, name, module] = match if match = module.match(/^(.*)=(.*)$/)
name ||= helpers.baseFileName module, yes, useWinPathSep
"#{name} = require('#{module}')"
@@ -366,8 +367,8 @@ extension source files in it and all subdirectories.
compileScript(source, code.toString(), base)
else
notSources[source] = yes
-
-findDirectoryIndex = (source) ->
+
+findDirectoryIndex = (source) ->
for ext in CoffeeScript.FILE_EXTENSIONS
index = path.join source, "index#{ext}"
try
@@ -425,7 +426,7 @@ requested options. If evaluating the script directly sets __filename
catch err
CoffeeScript.emit 'failure', err, task
return if CoffeeScript.listeners('failure').length
- message = err.stack or "#{err}"
+ message = err?.stack or "#{err}"
if o.watch
printLine message + '\x07'
else
@@ -447,12 +448,12 @@ and write them back to stdout.
compileStdio = ->
- code = ''
+ buffers = []
stdin = process.openStdin()
stdin.on 'data', (buffer) ->
- code += buffer.toString() if buffer
- stdin.on 'end', ->
- compileScript null, code
+ buffers.push buffer if buffer
+ stdin.on 'end', ->
+ compileScript null, Buffer.concat(buffers).toString()
@@ -471,9 +472,9 @@ them together.
joinTimeout = null
compileJoin = ->
return unless opts.join
- unless sourceCode.some((code) -> code is null)
- clearTimeout joinTimeout
- joinTimeout = wait 100, ->
+ unless sourceCode.some((code) -> code is null)
+ clearTimeout joinTimeout
+ joinTimeout = wait 100, ->
compileScript opts.join, sourceCode.join('\n'), opts.join
@@ -495,8 +496,8 @@ such as --print
.
watcher = null
prevStats = null
compileTimeout = null
-
- watchErr = (err) ->
+
+ watchErr = (err) ->
throw err unless err.code is 'ENOENT'
return unless source in sources
try
@@ -505,10 +506,10 @@ such as --print
.
catch
removeSource source, base
compileJoin()
-
- compile = ->
+
+ compile = ->
clearTimeout compileTimeout
- compileTimeout = wait 25, ->
+ compileTimeout = wait 25, ->
fs.stat source, (err, stats) ->
return watchErr err if err
return rewatch() if prevStats and
@@ -519,15 +520,15 @@ such as --print
.
return watchErr err if err
compileScript(source, code.toString(), base)
rewatch()
-
- startWatcher = ->
+
+ startWatcher = ->
watcher = fs.watch source
.on 'change', compile
.on 'error', (err) ->
throw err unless err.code is 'EPERM'
removeSource source, base
-
- rewatch = ->
+
+ rewatch = ->
watcher?.close()
startWatcher()
@@ -552,15 +553,15 @@ such as --print
.
watchDir = (source, base) ->
watcher = null
readdirTimeout = null
-
- startWatcher = ->
+
+ startWatcher = ->
watcher = fs.watch source
.on 'error', (err) ->
throw err unless err.code is 'EPERM'
stopWatcher()
- .on 'change', ->
+ .on 'change', ->
clearTimeout readdirTimeout
- readdirTimeout = wait 25, ->
+ readdirTimeout = wait 25, ->
try
files = fs.readdirSync source
catch err
@@ -568,8 +569,8 @@ such as --print
.
return stopWatcher()
for file in files
compilePath (path.join source, file), no, base
-
- stopWatcher = ->
+
+ stopWatcher = ->
watcher.close()
removeSourceDir source, base
@@ -578,8 +579,8 @@ such as --print
.
startWatcher()
catch err
throw err unless err.code is 'ENOENT'
-
-removeSourceDir = (source, base) ->
+
+removeSourceDir = (source, base) ->
delete watchedDirs[source]
sourcesChanged = no
for file in sources when source is path.dirname file
@@ -609,8 +610,8 @@ the compiled JS version as well.
silentUnlink outputPath source, base
silentUnlink outputPath source, base, '.js.map'
timeLog "removed #{source}"
-
-silentUnlink = (path) ->
+
+silentUnlink = (path) ->
try
fs.unlinkSync path
catch err
@@ -656,12 +657,12 @@ the compiled JS version as well.
mkdirp = (dir, fn) ->
mode = 0o777 & ~process.umask()
- do mkdirs = (p = dir, fn) ->
+ do mkdirs = (p = dir, fn) ->
fs.exists p, (exists) ->
if exists
fn()
else
- mkdirs path.dirname(p), ->
+ mkdirs path.dirname(p), ->
fs.mkdir p, mode, (err) ->
return fn err if err
fn()
@@ -686,7 +687,7 @@ same directory as the .js
file.
writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
sourceMapPath = outputPath sourcePath, base, ".js.map"
jsDir = path.dirname jsPath
- compile = ->
+ compile = ->
if opts.compile
js = ' ' if js.length <= 0
if generatedSourceMap then js = "#{js}\n//# sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n"
@@ -792,10 +793,11 @@ same directory as the .js
file.
compileOptions = (filename, base) ->
answer = {
filename
- literate: opts.literate or helpers.isLiterate(filename)
- bare: opts.bare
- header: opts.compile and not opts['no-header']
- sourceMap: opts.map
+ literate: opts.literate or helpers.isLiterate(filename)
+ bare: opts.bare
+ header: opts.compile and not opts['no-header']
+ sourceMap: opts.map
+ inlineMap: opts['inline-map']
}
if filename
if base
@@ -804,15 +806,15 @@ same directory as the .js
file.
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)
+ 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"
+ sourceRoot: ""
+ sourceFiles: [helpers.baseFileName filename, no, useWinPathSep]
+ generatedFile: helpers.baseFileName(filename, yes, useWinPathSep) + ".js"
answer
@@ -834,9 +836,9 @@ the node
binary, preserving the other options.
args = process.argv[1..]
args.splice args.indexOf('--nodejs'), 2
p = spawn process.execPath, nodeArgs.concat(args),
- cwd: process.cwd()
- env: process.env
- stdio: [0, 1, 2]
+ cwd: process.cwd()
+ env: process.env
+ stdio: [0, 1, 2]
p.on 'exit', (code) -> process.exit code
diff --git a/documentation/docs/grammar.html b/documentation/docs/grammar.html
index 3a1d1825..970a433f 100644
--- a/documentation/docs/grammar.html
+++ b/documentation/docs/grammar.html
@@ -243,7 +243,7 @@ just be passed through unaffected.
- addLocationDataFn = (first, last) ->
+ addLocationDataFn = (first, last) ->
if not last
"yy.addLocationDataFn(@#{first})"
else
@@ -315,8 +315,8 @@ all parsing must end here.
- Root: [
- o '', -> new Block
+ Root: [
+ o '', -> new Block
o 'Body'
]
@@ -333,9 +333,9 @@ all parsing must end here.
- Body: [
- o 'Line', -> Block.wrap [$1]
- o 'Body TERMINATOR Line', -> $1.push $3
+ Body: [
+ o 'Line', -> Block.wrap [$1]
+ o 'Body TERMINATOR Line', -> $1.push $3
o 'Body TERMINATOR'
]
@@ -348,13 +348,16 @@ all parsing must end here.
- Block and statements, which make up a line in a body.
+ Block and statements, which make up a line in a body. YieldReturn is a
+statement, but not included in Statement because that results in an ambiguous
+grammar.
- Line: [
+ Line: [
o 'Expression'
o 'Statement'
+ o 'YieldReturn'
]
@@ -370,10 +373,12 @@ all parsing must end here.
- Statement: [
+ Statement: [
o 'Return'
o 'Comment'
- o 'STATEMENT', -> new Literal $1
+ o 'STATEMENT', -> new StatementLiteral $1
+ o 'Import'
+ o 'Export'
]
@@ -386,13 +391,13 @@ all parsing must end here.
¶
All the different types of expressions in our language. The basic unit of
-CoffeeScript is the Expression — everything that can be an expression
+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: [
+ Expression: [
o 'Value'
o 'Invocation'
o 'Code'
@@ -405,6 +410,13 @@ them somewhat circular.
o 'Switch'
o 'Class'
o 'Throw'
+ o 'Yield'
+ ]
+
+ Yield: [
+ o 'YIELD', -> new Op $1, new Value new Literal ''
+ o 'YIELD Expression', -> new Op $1, $2
+ o 'YIELD FROM Expression', -> new Op $1.concat($2), $3
]
@@ -422,9 +434,17 @@ token stream.
- Block: [
- o 'INDENT OUTDENT', -> new Block
- o 'INDENT Body OUTDENT', -> $2
+ Block: [
+ o 'INDENT OUTDENT', -> new Block
+ o 'INDENT Body OUTDENT', -> $2
+ ]
+
+ Identifier: [
+ o 'IDENTIFIER', -> new IdentifierLiteral $1
+ ]
+
+ Property: [
+ o 'PROPERTY', -> new PropertyName $1
]
@@ -436,12 +456,24 @@ token stream.
- A literal identifier, a variable name or property.
+ Alphanumerics are separated from the other Literal matchers because
+they can also serve as keys in object literals.
- Identifier: [
- o 'IDENTIFIER', -> new Literal $1
+ AlphaNumeric: [
+ o 'NUMBER', -> new NumberLiteral $1
+ o 'String'
+ ]
+
+ String: [
+ o 'STRING', -> new StringLiteral $1
+ o 'STRING_START Body STRING_END', -> new StringWithInterpolations $2
+ ]
+
+ Regex: [
+ o 'REGEX', -> new RegexLiteral $1
+ o 'REGEX_START Invocation REGEX_END', -> new RegexWithInterpolations $2.args
]
@@ -453,24 +485,20 @@ token stream.
- Alphanumerics are separated from the other Literal matchers because
-they can also serve as keys in object literals.
+ All of our immediate values. Generally these can be passed straight
+through and printed to JavaScript.
- AlphaNumeric: [
- o 'NUMBER', -> new Literal $1
- o 'String'
- ]
-
- String: [
- o 'STRING', -> new Literal $1
- o 'STRING_START Body STRING_END', -> new Parens $2
- ]
-
- Regex: [
- o 'REGEX', -> new Literal $1
- o 'REGEX_START Invocation REGEX_END', -> $2
+ Literal: [
+ o 'AlphaNumeric'
+ o 'JS', -> new PassthroughLiteral $1
+ o 'Regex'
+ o 'UNDEFINED', -> new UndefinedLiteral
+ o 'NULL', -> new NullLiteral
+ o 'BOOL', -> new BooleanLiteral $1
+ o 'INFINITY', -> new InfinityLiteral $1
+ o 'NAN', -> new NaNLiteral
]
@@ -482,19 +510,14 @@ they can also serve as keys in object literals.
- All of our immediate values. Generally these can be passed straight
-through and printed to JavaScript.
+ Assignment of a variable, property, or index to a value.
- Literal: [
- o 'AlphaNumeric'
- o 'JS', -> new Literal $1
- o 'Regex'
- o 'DEBUGGER', -> new Literal $1
- o 'UNDEFINED', -> new Undefined
- o 'NULL', -> new Null
- o 'BOOL', -> new Bool $1
+ 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
]
@@ -506,14 +529,35 @@ through and printed to JavaScript.
- Assignment of a variable, property, or index to a value.
+ Assignment when it happens within an object literal. The difference from
+the ordinary Assign is that these allow numbers and strings as keys.
- 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
+ AssignObj: [
+ o 'ObjAssignable', -> new Value $1
+ o 'ObjAssignable : Expression', -> new Assign LOC(1)(new Value $1), $3, 'object',
+ operatorToken: LOC(2)(new Literal $2)
+ o 'ObjAssignable :
+ INDENT Expression OUTDENT', -> new Assign LOC(1)(new Value $1), $4, 'object',
+ operatorToken: LOC(2)(new Literal $2)
+ o 'SimpleObjAssignable = Expression', -> new Assign LOC(1)(new Value $1), $3, null,
+ operatorToken: LOC(2)(new Literal $2)
+ o 'SimpleObjAssignable =
+ INDENT Expression OUTDENT', -> new Assign LOC(1)(new Value $1), $4, null,
+ operatorToken: LOC(2)(new Literal $2)
+ o 'Comment'
+ ]
+
+ SimpleObjAssignable: [
+ o 'Identifier'
+ o 'Property'
+ o 'ThisProperty'
+ ]
+
+ ObjAssignable: [
+ o 'SimpleObjAssignable'
+ o 'AlphaNumeric'
]
@@ -525,34 +569,18 @@ through and printed to JavaScript.
- Assignment when it happens within an object literal. The difference from
-the ordinary Assign is that these allow numbers and strings as keys.
+ A return statement from a function body.
- AssignObj: [
- o 'ObjAssignable', -> new Value $1
- o 'ObjAssignable : Expression', -> new Assign LOC(1)(new Value $1), $3, 'object',
- operatorToken: LOC(2)(new Literal $2)
- o 'ObjAssignable :
- INDENT Expression OUTDENT', -> new Assign LOC(1)(new Value $1), $4, 'object',
- operatorToken: LOC(2)(new Literal $2)
- o 'SimpleObjAssignable = Expression', -> new Assign LOC(1)(new Value $1), $3, null,
- operatorToken: LOC(2)(new Literal $2)
- o 'SimpleObjAssignable =
- INDENT Expression OUTDENT', -> new Assign LOC(1)(new Value $1), $4, null,
- operatorToken: LOC(2)(new Literal $2)
- o 'Comment'
+ Return: [
+ o 'RETURN Expression', -> new Return $2
+ o 'RETURN', -> new Return
]
- SimpleObjAssignable: [
- o 'Identifier'
- o 'ThisProperty'
- ]
-
- ObjAssignable: [
- o 'SimpleObjAssignable'
- o 'AlphaNumeric'
+ YieldReturn: [
+ o 'YIELD RETURN Expression', -> new YieldReturn $3
+ o 'YIELD RETURN', -> new YieldReturn
]
@@ -564,13 +592,12 @@ the ordinary Assign is that these allow numbers and strings as
- A return statement from a function body.
+ A block comment.
- Return: [
- o 'RETURN Expression', -> new Return $2
- o 'RETURN', -> new Return
+ Comment: [
+ o 'HERECOMMENT', -> new Comment $1
]
@@ -582,12 +609,15 @@ the ordinary Assign is that these allow numbers and strings as
- A block comment.
+ 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.
- Comment: [
- o 'HERECOMMENT', -> new Comment $1
+ Code: [
+ o 'PARAM_START ParamList PARAM_END FuncGlyph Block', -> new Code $2, $5, $4
+ o 'FuncGlyph Block', -> new Code [], $2, $1
]
@@ -599,15 +629,14 @@ the ordinary Assign is that these allow numbers and strings as
- 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.
+ CoffeeScript has two different symbols for functions. ->
is for ordinary
+functions, and =>
is for functions bound to the current value of this.
- Code: [
- o 'PARAM_START ParamList PARAM_END FuncGlyph Block', -> new Code $2, $5, $4
- o 'FuncGlyph Block', -> new Code [], $2, $1
+ FuncGlyph: [
+ o '->', -> 'func'
+ o '=>', -> 'boundfunc'
]
@@ -619,14 +648,13 @@ list.
- CoffeeScript has two different symbols for functions. ->
is for ordinary
-functions, and =>
is for functions bound to the current value of this.
+ An optional, trailing comma.
- FuncGlyph: [
- o '->', -> 'func'
- o '=>', -> 'boundfunc'
+ OptComma: [
+ o ''
+ o ','
]
@@ -638,13 +666,16 @@ functions, and =>
is for functions bound to the current value of
- An optional, trailing comma.
+ The list of parameters that a function accepts can be of any length.
- OptComma: [
- o ''
- o ','
+ 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
]
@@ -656,16 +687,16 @@ functions, and =>
is for functions bound to the current value of
- The list of parameters that a function accepts can be of any length.
+ A single parameter in a function definition can be ordinary, or a splat
+that hoovers up the remaining arguments.
- 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
+ Param: [
+ o 'ParamVar', -> new Param $1
+ o 'ParamVar ...', -> new Param $1, null, on
+ o 'ParamVar = Expression', -> new Param $1, $3
+ o '...', -> new Expansion
]
@@ -677,16 +708,15 @@ functions, and =>
is for functions bound to the current value of
- A single parameter in a function definition can be ordinary, or a splat
-that hoovers up the remaining arguments.
+ Function Parameters
- Param: [
- o 'ParamVar', -> new Param $1
- o 'ParamVar ...', -> new Param $1, null, on
- o 'ParamVar = Expression', -> new Param $1, $3
- o '...', -> new Expansion
+ ParamVar: [
+ o 'Identifier'
+ o 'ThisProperty'
+ o 'Array'
+ o 'Object'
]
@@ -698,15 +728,12 @@ that hoovers up the remaining arguments.
- Function Parameters
+ A splat that occurs outside of a parameter list.
- ParamVar: [
- o 'Identifier'
- o 'ThisProperty'
- o 'Array'
- o 'Object'
+ Splat: [
+ o 'Expression ...', -> new Splat $1
]
@@ -718,12 +745,15 @@ that hoovers up the remaining arguments.
- A splat that occurs outside of a parameter list.
+ Variables and properties that can be assigned to.
- Splat: [
- o 'Expression ...', -> new Splat $1
+ SimpleAssignable: [
+ o 'Identifier', -> new Value $1
+ o 'Value Accessor', -> $1.add $2
+ o 'Invocation Accessor', -> new Value $1, [].concat $2
+ o 'ThisProperty'
]
@@ -735,15 +765,14 @@ that hoovers up the remaining arguments.
- Variables and properties that can be assigned to.
+ Everything 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'
+ Assignable: [
+ o 'SimpleAssignable'
+ o 'Array', -> new Value $1
+ o 'Object', -> new Value $1
]
@@ -755,14 +784,17 @@ that hoovers up the remaining arguments.
- Everything that can be assigned to.
+ The types of things that can be treated as values – assigned to, invoked
+as functions, indexed into, named as a class, etc.
- Assignable: [
- o 'SimpleAssignable'
- o 'Array', -> new Value $1
- o 'Object', -> new Value $1
+ Value: [
+ o 'Assignable'
+ o 'Literal', -> new Value $1
+ o 'Parenthetical', -> new Value $1
+ o 'Range', -> new Value $1
+ o 'This'
]
@@ -774,17 +806,18 @@ that hoovers up the remaining arguments.
- The types of things that can be treated as values — assigned to, invoked
-as functions, indexed into, named as a class, etc.
+ The general group of accessors into an object, by property, by prototype
+or by array index or slice.
- Value: [
- o 'Assignable'
- o 'Literal', -> new Value $1
- o 'Parenthetical', -> new Value $1
- o 'Range', -> new Value $1
- o 'This'
+ Accessor: [
+ o '. Property', -> new Access $2
+ o '?. Property', -> new Access $2, 'soak'
+ o ':: Property', -> [LOC(1)(new Access new PropertyName('prototype')), LOC(2)(new Access $2)]
+ o '?:: Property', -> [LOC(1)(new Access new PropertyName('prototype'), 'soak'), LOC(2)(new Access $2)]
+ o '::', -> new Access new PropertyName 'prototype'
+ o 'Index'
]
@@ -796,18 +829,18 @@ as functions, indexed into, named as a class, etc.
- The general group of accessors into an object, by property, by prototype
-or by array index or slice.
+ Indexing into an object or array using bracket notation.
- 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'
+ 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
]
@@ -819,18 +852,12 @@ or by array index or slice.
- Indexing into an object or array using bracket notation.
+ In CoffeeScript, an object literal is simply a list of assignments.
- 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
+ Object: [
+ o '{ AssignList OptComma }', -> new Obj $2, $1.generated
]
@@ -842,12 +869,17 @@ or by array index or slice.
- In CoffeeScript, an object literal is simply a list of assignments.
+ Assignment of properties within an object literal can be separated by
+comma, as in JavaScript, or simply by newline.
- Object: [
- o '{ AssignList OptComma }', -> new Obj $2, $1.generated
+ 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
]
@@ -859,17 +891,80 @@ or by array index or slice.
- Assignment of properties within an object literal can be separated by
-comma, as in JavaScript, or simply by newline.
+ Class definitions have optional bodies of prototype property assignments,
+and optional references to the superclass.
- 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: [
+ 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
+ ]
+
+ Import: [
+ o 'IMPORT String', -> new ImportDeclaration null, $2
+ o 'IMPORT ImportDefaultSpecifier FROM String', -> new ImportDeclaration new ImportClause($2, null), $4
+ o 'IMPORT ImportNamespaceSpecifier FROM String', -> new ImportDeclaration new ImportClause(null, $2), $4
+ o 'IMPORT { } FROM String', -> new ImportDeclaration new ImportClause(null, new ImportSpecifierList []), $5
+ o 'IMPORT { ImportSpecifierList OptComma } FROM String', -> new ImportDeclaration new ImportClause(null, new ImportSpecifierList $3), $7
+ o 'IMPORT ImportDefaultSpecifier , ImportNamespaceSpecifier FROM String', -> new ImportDeclaration new ImportClause($2, $4), $6
+ o 'IMPORT ImportDefaultSpecifier , { ImportSpecifierList OptComma } FROM String', -> new ImportDeclaration new ImportClause($2, new ImportSpecifierList $5), $9
+ ]
+
+ ImportSpecifierList: [
+ o 'ImportSpecifier', -> [$1]
+ o 'ImportSpecifierList , ImportSpecifier', -> $1.concat $3
+ o 'ImportSpecifierList OptComma TERMINATOR ImportSpecifier', -> $1.concat $4
+ o 'INDENT ImportSpecifierList OptComma OUTDENT', -> $2
+ o 'ImportSpecifierList OptComma INDENT ImportSpecifierList OptComma OUTDENT', -> $1.concat $4
+ ]
+
+ ImportSpecifier: [
+ o 'Identifier', -> new ImportSpecifier $1
+ o 'Identifier AS Identifier', -> new ImportSpecifier $1, $3
+ ]
+
+ ImportDefaultSpecifier: [
+ o 'Identifier', -> new ImportDefaultSpecifier $1
+ ]
+
+ ImportNamespaceSpecifier: [
+ o 'IMPORT_ALL AS Identifier', -> new ImportNamespaceSpecifier new Literal($1), $3
+ ]
+
+ Export: [
+ o 'EXPORT { }', -> new ExportNamedDeclaration new ExportSpecifierList []
+ o 'EXPORT { ExportSpecifierList OptComma }', -> new ExportNamedDeclaration new ExportSpecifierList $3
+ o 'EXPORT Class', -> new ExportNamedDeclaration $2
+ o 'EXPORT Identifier = Expression', -> new ExportNamedDeclaration new Assign $2, $4, null,
+ moduleDeclaration: 'export'
+ o 'EXPORT Identifier = TERMINATOR Expression', -> new ExportNamedDeclaration new Assign $2, $5, null,
+ moduleDeclaration: 'export'
+ o 'EXPORT Identifier = INDENT Expression OUTDENT', -> new ExportNamedDeclaration new Assign $2, $5, null,
+ moduleDeclaration: 'export'
+ o 'EXPORT DEFAULT Expression', -> new ExportDefaultDeclaration $3
+ o 'EXPORT EXPORT_ALL FROM String', -> new ExportAllDeclaration new Literal($2), $4
+ o 'EXPORT { ExportSpecifierList OptComma } FROM String', -> new ExportNamedDeclaration new ExportSpecifierList($3), $7
+ ]
+
+ ExportSpecifierList: [
+ o 'ExportSpecifier', -> [$1]
+ o 'ExportSpecifierList , ExportSpecifier', -> $1.concat $3
+ o 'ExportSpecifierList OptComma TERMINATOR ExportSpecifier', -> $1.concat $4
+ o 'INDENT ExportSpecifierList OptComma OUTDENT', -> $2
+ o 'ExportSpecifierList OptComma INDENT ExportSpecifierList OptComma OUTDENT', -> $1.concat $4
+ ]
+
+ ExportSpecifier: [
+ o 'Identifier', -> new ExportSpecifier $1
+ o 'Identifier AS Identifier', -> new ExportSpecifier $1, $3
+ o 'Identifier AS DEFAULT', -> new ExportSpecifier $1, new Literal $3
]
@@ -881,20 +976,19 @@ comma, as in JavaScript, or simply by newline.
- Class definitions have optional bodies of prototype property assignments,
-and optional references to the superclass.
+ Ordinary function invocation, or a chained series of calls.
- 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
+ Invocation: [
+ o 'Value OptFuncExist Arguments', -> new Call $1, $3, $2
+ o 'Invocation OptFuncExist Arguments', -> new Call $1, $3, $2
+ o 'Super'
+ ]
+
+ Super: [
+ o 'SUPER', -> new SuperCall
+ o 'SUPER Arguments', -> new SuperCall $2
]
@@ -906,15 +1000,13 @@ and optional references to the superclass.
- Ordinary function invocation, or a chained series of calls.
+ An optional existence check on a function.
- 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
+ OptFuncExist: [
+ o '', -> no
+ o 'FUNC_EXIST', -> yes
]
@@ -926,13 +1018,13 @@ and optional references to the superclass.
- An optional existence check on a function.
+ The list of arguments to a function call.
- OptFuncExist: [
- o '', -> no
- o 'FUNC_EXIST', -> yes
+ Arguments: [
+ o 'CALL_START CALL_END', -> []
+ o 'CALL_START ArgList OptComma CALL_END', -> $2
]
@@ -944,13 +1036,13 @@ and optional references to the superclass.
- The list of arguments to a function call.
+ A reference to the this current object.
- Arguments: [
- o 'CALL_START CALL_END', -> []
- o 'CALL_START ArgList OptComma CALL_END', -> $2
+ This: [
+ o 'THIS', -> new Value new ThisLiteral
+ o '@', -> new Value new ThisLiteral
]
@@ -962,13 +1054,12 @@ and optional references to the superclass.
- A reference to the this current object.
+ A reference to a property on this.
- This: [
- o 'THIS', -> new Value new Literal 'this'
- o '@', -> new Value new Literal 'this'
+ ThisProperty: [
+ o '@ Property', -> new Value LOC(1)(new ThisLiteral), [LOC(2)(new Access($2))], 'this'
]
@@ -980,12 +1071,13 @@ and optional references to the superclass.
- A reference to a property on this.
+ The array literal.
- ThisProperty: [
- o '@ Identifier', -> new Value LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'
+ Array: [
+ o '[ ]', -> new Arr []
+ o '[ ArgList OptComma ]', -> new Arr $2
]
@@ -997,13 +1089,13 @@ and optional references to the superclass.
- The array literal.
+ Inclusive and exclusive range dots.
- Array: [
- o '[ ]', -> new Arr []
- o '[ ArgList OptComma ]', -> new Arr $2
+ RangeDots: [
+ o '..', -> 'inclusive'
+ o '...', -> 'exclusive'
]
@@ -1015,13 +1107,12 @@ and optional references to the superclass.
- Inclusive and exclusive range dots.
+ The CoffeeScript range literal.
- RangeDots: [
- o '..', -> 'inclusive'
- o '...', -> 'exclusive'
+ Range: [
+ o '[ Expression RangeDots Expression ]', -> new Range $2, $4, $3
]
@@ -1033,12 +1124,15 @@ and optional references to the superclass.
- The CoffeeScript range literal.
+ Array slice literals.
- Range: [
- o '[ Expression RangeDots Expression ]', -> new Range $2, $4, $3
+ 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
]
@@ -1050,15 +1144,18 @@ and optional references to the superclass.
- Array slice literals.
+ 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.
- 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
+ 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
]
@@ -1070,18 +1167,14 @@ and optional references to the superclass.
- 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.
+ Valid arguments are Blocks or Splats.
- 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
+ Arg: [
+ o 'Expression'
+ o 'Splat'
+ o '...', -> new Expansion
]
@@ -1093,14 +1186,15 @@ as well as the contents of an array literal
- Valid arguments are Blocks or Splats.
+ 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.
- Arg: [
+ SimpleArgs: [
o 'Expression'
- o 'Splat'
- o '...', -> new Expansion
+ o 'SimpleArgs , Expression', -> [].concat $1, $3
]
@@ -1112,15 +1206,15 @@ as well as the contents of an array literal
- 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.
+ The variants of try/catch/finally exception handling blocks.
- SimpleArgs: [
- o 'Expression'
- o 'SimpleArgs , Expression', -> [].concat $1, $3
+ 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
]
@@ -1132,15 +1226,14 @@ having the newlines wouldn’t make sense.
- The variants of try/catch/finally exception handling blocks.
+ A catch clause names its error and runs a block of code.
- 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
+ Catch: [
+ o 'CATCH Identifier Block', -> [$2, $3]
+ o 'CATCH Object Block', -> [LOC(2)(new Value($2)), $3]
+ o 'CATCH Block', -> [null, $2]
]
@@ -1152,14 +1245,12 @@ having the newlines wouldn’t make sense.
- A catch clause names its error and runs a block of code.
+ Throw an exception object.
- Catch: [
- o 'CATCH Identifier Block', -> [$2, $3]
- o 'CATCH Object Block', -> [LOC(2)(new Value($2)), $3]
- o 'CATCH Block', -> [null, $2]
+ Throw: [
+ o 'THROW Expression', -> new Throw $2
]
@@ -1171,12 +1262,16 @@ having the newlines wouldn’t make sense.
- Throw an exception object.
+ 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.
- Throw: [
- o 'THROW Expression', -> new Throw $2
+ Parenthetical: [
+ o '( Body )', -> new Parens $2
+ o '( INDENT Body OUTDENT )', -> new Parens $3
]
@@ -1188,16 +1283,15 @@ having the newlines wouldn’t make sense.
- 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.
+ The condition portion of a while loop.
- Parenthetical: [
- o '( Body )', -> new Parens $2
- o '( INDENT Body OUTDENT )', -> new Parens $3
+ 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
]
@@ -1209,15 +1303,21 @@ the trick.
- The condition portion of a while loop.
+ 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.
- 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
+ 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 BooleanLiteral 'true').addBody $2
+ o 'LOOP Expression', -> new While(LOC(1) new BooleanLiteral 'true').addBody LOC(2) Block.wrap [$2]
]
@@ -1229,21 +1329,27 @@ the trick.
- 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.
+ 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.
- 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
+ For: [
+ o 'Statement ForBody', -> new For $1, $2
+ o 'Expression ForBody', -> new For $1, $2
+ o 'ForBody Block', -> new For $2, $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]
+ ForBody: [
+ o 'FOR Range', -> source: (LOC(2) new Value($2))
+ o 'FOR Range BY Expression', -> source: (LOC(2) new Value($2)), step: $4
+ o 'ForStart ForSource', -> $2.own = $1.own; $2.name = $1[0]; $2.index = $1[1]; $2
+ ]
+
+ ForStart: [
+ o 'FOR ForVariables', -> $2
+ o 'FOR OWN ForVariables', -> $3.own = yes; $3
]
@@ -1255,27 +1361,16 @@ or postfix, with a single expression. There is no do..while.
- 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.
+ An array of all accepted values for a variable inside the loop.
+This enables support for pattern matching.
- 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 'FOR Range BY Expression', -> source: (LOC(2) new Value($2)), step: $4
- o 'ForStart ForSource', -> $2.own = $1.own; $2.name = $1[0]; $2.index = $1[1]; $2
- ]
-
- ForStart: [
- o 'FOR ForVariables', -> $2
- o 'FOR OWN ForVariables', -> $3.own = yes; $3
+ ForValue: [
+ o 'Identifier'
+ o 'ThisProperty'
+ o 'Array', -> new Value $1
+ o 'Object', -> new Value $1
]
@@ -1287,16 +1382,15 @@ or postfix, with a single expression.
- An array of all accepted values for a variable inside the loop.
-This enables support for pattern matching.
+ 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.
- ForValue: [
- o 'Identifier'
- o 'ThisProperty'
- o 'Array', -> new Value $1
- o 'Object', -> new Value $1
+ ForVariables: [
+ o 'ForValue', -> [$1]
+ o 'ForValue , ForValue', -> [$1, $3]
]
@@ -1308,15 +1402,32 @@ This enables support for pattern matching.
- 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.
+ 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.
- ForVariables: [
- o 'ForValue', -> [$1]
- o 'ForValue , ForValue', -> [$1, $3]
+ 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
]
@@ -1328,32 +1439,13 @@ of object comprehensions.
- 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.
+ An individual When clause, with action.
- 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
+ When: [
+ o 'LEADING_WHEN SimpleArgs Block', -> [[$2, $3]]
+ o 'LEADING_WHEN SimpleArgs Block TERMINATOR', -> [[$2, $3]]
]
@@ -1365,13 +1457,15 @@ in fixed-size increments.
- An individual When clause, with action.
+ 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.
- When: [
- o 'LEADING_WHEN SimpleArgs Block', -> [[$2, $3]]
- o 'LEADING_WHEN SimpleArgs Block TERMINATOR', -> [[$2, $3]]
+ IfBlock: [
+ o 'IF Expression Block', -> new If $2, $3, type: $1
+ o 'IfBlock ELSE IF Expression Block', -> $1.addElse LOC(3,5) new If $4, $5, type: $3
]
@@ -1383,15 +1477,16 @@ in fixed-size increments.
- 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.
+ The full complement of if expressions, including postfix one-liner
+if and unless.
- IfBlock: [
- o 'IF Expression Block', -> new If $2, $3, type: $1
- o 'IfBlock ELSE IF Expression Block', -> $1.addElse LOC(3,5) new If $4, $5, type: $3
+ 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
]
@@ -1403,17 +1498,25 @@ ambiguity.
- The full complement of if expressions, including postfix one-liner
-if and unless.
+ 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.
- 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
- ]
+ Operation: [
+ o 'UNARY Expression', -> new Op $1 , $2
+ o 'UNARY_MATH Expression', -> new Op $1 , $2
+ o '- Expression', (-> new Op '-', $2), prec: 'UNARY_MATH'
+ o '+ Expression', (-> new Op '+', $2), prec: 'UNARY_MATH'
+
+ o '-- SimpleAssignable', -> new Op '--', $2
+ o '++ SimpleAssignable', -> new Op '++', $2
+ o 'SimpleAssignable --', -> new Op '--', $1, null, true
+ o 'SimpleAssignable ++', -> new Op '++', $1, null, true
@@ -1424,28 +1527,34 @@ ambiguity.
- 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 'UNARY_MATH Expression', -> new Op $1 , $2
- o '- Expression', (-> new Op '-', $2), prec: 'UNARY_MATH'
- o '+ Expression', (-> new Op '+', $2), prec: 'UNARY_MATH'
- o 'YIELD Statement', -> new Op $1 , $2
- o 'YIELD Expression', -> new Op $1 , $2
- o 'YIELD FROM Expression', -> new Op $1.concat($2) , $3
+ o 'Expression ?', -> new Existence $1
- o '-- SimpleAssignable', -> new Op '--', $2
- o '++ SimpleAssignable', -> new Op '++', $2
- o 'SimpleAssignable --', -> new Op '--', $1, null, true
- o 'SimpleAssignable ++', -> new Op '++', $1, null, true
+ 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 ** 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
+ ]
@@ -1456,35 +1565,10 @@ rules are necessary.
-
+ Precedence
- 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 ** 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
- ]
-
@@ -1494,8 +1578,7 @@ rules are necessary.
- Precedence
-
+
@@ -1507,18 +1590,6 @@ rules are necessary.
-
-
-
-
-
-
-
-
-
-
- ¶
-
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)
@@ -1545,21 +1616,33 @@ down. Following these rules is what makes 2 + 3 * 4
parse as:
['right', 'YIELD']
['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS']
['right', 'FORIN', 'FOROF', 'BY', 'WHEN']
- ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS']
+ ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS', 'IMPORT', 'EXPORT']
['left', 'POST_IF']
]
+
+
+
+
+ ¶
+
+ Wrapping Up
+
+
+
+
+
+
- Wrapping Up
-
+
@@ -1571,18 +1654,6 @@ down. Following these rules is what makes 2 + 3 * 4
parse as:
-
-
-
-
-
-
-
-
-
-
- ¶
-
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)
@@ -1601,11 +1672,11 @@ as “tokens”.
-
+
Initialize the Parser with our list of terminal tokens, our grammar
rules, and the name of the root. Reverse the operators because Jison orders
@@ -1614,7 +1685,7 @@ precedence from low to high, and we have it high to low
- exports.parser = new Parser
+ exports.parser = new Parser
tokens : tokens.join ' '
bnf : grammar
operators : operators.reverse()
diff --git a/documentation/docs/helpers.html b/documentation/docs/helpers.html
index 944038c6..fd6cd37f 100644
--- a/documentation/docs/helpers.html
+++ b/documentation/docs/helpers.html
@@ -134,7 +134,7 @@ arrays, count characters, that sort of thing.
- exports.starts = (string, literal, start) ->
+ exports.starts = (string, literal, start) ->
literal is string.substr start, literal.length
@@ -150,7 +150,7 @@ arrays, count characters, that sort of thing.
- exports.ends = (string, literal, back) ->
+ exports.ends = (string, literal, back) ->
len = literal.length
literal is string.substr string.length - len - (back or 0), len
@@ -167,7 +167,7 @@ arrays, count characters, that sort of thing.
- exports.repeat = repeat = (str, n) ->
+ exports.repeat = repeat = (str, n) ->
@@ -202,7 +202,7 @@ arrays, count characters, that sort of thing.
- exports.compact = (array) ->
+ exports.compact = (array) ->
item for item in array when item
@@ -218,7 +218,7 @@ arrays, count characters, that sort of thing.
- exports.count = (string, substr) ->
+ exports.count = (string, substr) ->
num = pos = 0
return 1/0 unless substr.length
num++ while pos = 1 + string.indexOf substr, pos
@@ -239,7 +239,7 @@ options hash to propagate down the tree without polluting other branches.
- exports.merge = (options, overrides) ->
+ exports.merge = (options, overrides) ->
extend (extend {}, options), overrides
@@ -255,7 +255,7 @@ options hash to propagate down the tree without polluting other branches.
- extend = exports.extend = (object, properties) ->
+ extend = exports.extend = (object, properties) ->
for key, val of properties
object[key] = val
object
@@ -274,10 +274,10 @@ Handy for getting a list of children
from the nodes.
- exports.flatten = flatten = (array) ->
+ exports.flatten = flatten = (array) ->
flattened = []
for element in array
- if '[object Array]' is Object::toString.call element
+ if '[object Array]' is Object::toString.call element
flattened = flattened.concat flatten element
else
flattened.push element
@@ -297,7 +297,7 @@ looking for a particular method in an options hash.
- exports.del = (obj, key) ->
+ exports.del = (obj, key) ->
val = obj[key]
delete obj[key]
val
@@ -315,7 +315,7 @@ looking for a particular method in an options hash.
- exports.some = Array::some ? (fn) ->
+ exports.some = Array::some ? (fn) ->
return true for e in this when fn e
false
@@ -334,7 +334,7 @@ can be compiled “normally”.
- exports.invertLiterate = (code) ->
+ exports.invertLiterate = (code) ->
maybe_code = true
lines = for line in code.split('\n')
if maybe_code and /^([ ]{4}|[ ]{0,3}\t)/.test line
@@ -363,10 +363,10 @@ If last
is not provided, this will simply return first
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
+ first_line: first.first_line
+ first_column: first.first_column
+ last_line: last.last_line
+ last_column: last.last_column
@@ -383,8 +383,8 @@ The object is returned either way.
- exports.addLocationDataFn = (first, last) ->
- (obj) ->
+ exports.addLocationDataFn = (first, last) ->
+ (obj) ->
if ((typeof obj) is 'object') and (!!obj['updateLocationDataIfMissing'])
obj.updateLocationDataIfMissing buildLocationData(first, last)
@@ -404,7 +404,7 @@ The object is returned either way.
- exports.locationDataToString = (obj) ->
+ exports.locationDataToString = (obj) ->
if ("2" of obj) and ("first_line" of obj[2]) then locationData = obj[2]
else if "first_line" of obj then locationData = obj
@@ -427,8 +427,8 @@ The object is returned either way.
- exports.baseFileName = (file, stripExt = no, useWinPathSep = no) ->
- pathSep = if useWinPathSep then /\\|\// else /\//
+ exports.baseFileName = (file, stripExt = no, useWinPathSep = no) ->
+ pathSep = if useWinPathSep then /\\|\// else /\//
parts = file.split(pathSep)
file = parts[parts.length - 1]
return file unless stripExt and file.indexOf('.') >= 0
@@ -450,7 +450,7 @@ The object is returned either way.
- exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file
+ exports.isCoffee = (file) -> /\.((lit)?coffee|coffee\.md)$/.test file
@@ -465,7 +465,7 @@ The object is returned either way.
- exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
+ exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
@@ -483,7 +483,7 @@ marker showing where the error is.
- exports.throwSyntaxError = (message, location) ->
+ exports.throwSyntaxError = (message, location) ->
error = new SyntaxError message
error.location = location
error.toString = syntaxErrorToString
@@ -521,7 +521,7 @@ it already.
- exports.updateSyntaxError = (error, code, filename) ->
+ exports.updateSyntaxError = (error, code, filename) ->
@@ -541,16 +541,16 @@ it already.
error.filename or= filename
error.stack = error.toString()
error
+
+syntaxErrorToString = ->
+ return Error::toString.call @ unless @code and @location
-syntaxErrorToString = ->
- return Error::toString.call @ unless @code and @location
-
- {first_line, first_column, last_line, last_column} = @location
+ {first_line, first_column, last_line, last_column} = @location
last_line ?= first_line
last_column ?= first_column
- filename = @filename or '[stdin]'
- codeLine = @code.split('\n')[first_line]
+ filename = @filename or '[stdin]'
+ codeLine = @code.split('\n')[first_line]
start = first_column
@@ -585,18 +585,18 @@ it already.
if process?
colorsEnabled = process.stdout?.isTTY and not process.env?.NODE_DISABLE_COLORS
- if @colorful ? colorsEnabled
- colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m"
+ if @colorful ? colorsEnabled
+ colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m"
codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..]
marker = colorize marker
"""
- #{filename}:#{first_line + 1}:#{first_column + 1}: error: #{@message}
+ #{filename}:#{first_line + 1}:#{first_column + 1}: error: #{@message}
#{codeLine}
#{marker}
"""
-exports.nameWhitespaceCharacter = (string) ->
+exports.nameWhitespaceCharacter = (string) ->
switch string
when ' ' then 'space'
when '\n' then 'newline'
diff --git a/documentation/docs/index.html b/documentation/docs/index.html
index dc584cda..9c9821c5 100644
--- a/documentation/docs/index.html
+++ b/documentation/docs/index.html
@@ -119,7 +119,7 @@
- exports[key] = val for key, val of require './coffee-script'
+ exports[key] = val for key, val of require './coffee-script'
diff --git a/documentation/docs/lexer.html b/documentation/docs/lexer.html
index b7bb5845..b6492c3c 100644
--- a/documentation/docs/lexer.html
+++ b/documentation/docs/lexer.html
@@ -185,7 +185,7 @@ pushing some extra smarts into the Lexer.
- exports.Lexer = class Lexer
+ exports.Lexer = class Lexer
@@ -207,22 +207,24 @@ it has consumed.
- tokenize: (code, opts = {}) ->
- @literate = opts.literate # Are we lexing literate CoffeeScript?
- @indent = 0 # The current indentation level.
- @baseIndent = 0 # The overall minimum 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]`.
- @seenFor = no # Used to recognize FORIN and FOROF tokens.
+ tokenize: (code, opts = {}) ->
+ @literate = opts.literate # Are we lexing literate CoffeeScript?
+ @indent = 0 # The current indentation level.
+ @baseIndent = 0 # The overall minimum 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]`.
+ @seenFor = no # Used to recognize FORIN and FOROF tokens.
+ @seenImport = no # Used to recognize IMPORT FROM? AS? tokens.
+ @seenExport = no # Used to recognize EXPORT FROM? AS? tokens.
- @chunkLine =
+ @chunkLine =
opts.line or 0 # The start line for the current @chunk.
- @chunkColumn =
+ @chunkColumn =
opts.column or 0 # The start column of the current @chunk.
- code = @clean code # The stripped, cleaned original source code.
+ code = @clean code # The stripped, cleaned original source code.
@@ -240,17 +242,17 @@ short-circuiting if any of them succeed. Their order determines precedence:
i = 0
- while @chunk = code[i..]
+ while @chunk = code[i..]
consumed = \
- @identifierToken() or
- @commentToken() or
- @whitespaceToken() or
- @lineToken() or
- @stringToken() or
- @numberToken() or
- @regexToken() or
- @jsToken() or
- @literalToken()
+ @identifierToken() or
+ @commentToken() or
+ @whitespaceToken() or
+ @lineToken() or
+ @stringToken() or
+ @numberToken() or
+ @regexToken() or
+ @jsToken() or
+ @literalToken()
@@ -265,16 +267,16 @@ short-circuiting if any of them succeed. Their order determines precedence:
- [@chunkLine, @chunkColumn] = @getLineAndColumnFromChunk consumed
+ [@chunkLine, @chunkColumn] = @getLineAndColumnFromChunk consumed
i += consumed
- return {@tokens, index: i} if opts.untilBalanced and @ends.length is 0
+ return {@tokens, index: i} if opts.untilBalanced and @ends.length is 0
- @closeIndentation()
- @error "missing #{end.tag}", end.origin[2] if end = @ends.pop()
- return @tokens if opts.rewrite is off
- (new Rewriter).rewrite @tokens
+ @closeIndentation()
+ @error "missing #{end.tag}", end.origin[2] if end = @ends.pop()
+ return @tokens if opts.rewrite is off
+ (new Rewriter).rewrite @tokens
@@ -291,13 +293,13 @@ by removing all lines that aren’t indented by at least four spaces or a tab.
- clean: (code) ->
+ 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
+ @chunkLine--
+ code = invertLiterate code if @literate
code
@@ -343,8 +345,8 @@ though is
means ===
otherwise.
- identifierToken: ->
- return 0 unless match = IDENTIFIER.exec @chunk
+ identifierToken: ->
+ return 0 unless match = IDENTIFIER.exec @chunk
[input, id, colon] = match
@@ -363,47 +365,61 @@ though is
means ===
otherwise.
idLength = id.length
poppedToken = undefined
- if id is 'own' and @tag() is 'FOR'
- @token 'OWN', id
+ if id is 'own' and @tag() is 'FOR'
+ @token 'OWN', id
return id.length
- if id is 'from' and @tag() is 'YIELD'
- @token 'FROM', id
+ if id is 'from' and @tag() is 'YIELD'
+ @token 'FROM', id
+ return id.length
+ if id is 'as' and @seenImport and (@tag() is 'IDENTIFIER' or @value() is '*')
+ @tokens[@tokens.length - 1][0] = 'IMPORT_ALL' if @value() is '*'
+ @token 'AS', id
+ return id.length
+ if id is 'as' and @seenExport and @tag() is 'IDENTIFIER'
+ @token 'AS', id
+ return id.length
+ if id is 'default' and @seenExport
+ @token 'DEFAULT', id
return id.length
- [..., prev] = @tokens
- forcedIdentifier = colon or prev? 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)
+ [..., prev] = @tokens
+
+ tag =
+ if colon or prev? and
+ (prev[0] in ['.', '?.', '::', '?::'] or
+ not prev.spaced and prev[0] is '@')
+ 'PROPERTY'
+ else
+ 'IDENTIFIER'
+
+ if tag is 'IDENTIFIER' and (id in JS_KEYWORDS or id in COFFEE_KEYWORDS)
tag = id.toUpperCase()
- if tag is 'WHEN' and @tag() in LINE_BREAK
+ if tag is 'WHEN' and @tag() in LINE_BREAK
tag = 'LEADING_WHEN'
else if tag is 'FOR'
- @seenFor = yes
+ @seenFor = yes
else if tag is 'UNLESS'
tag = 'IF'
+ else if tag is 'IMPORT'
+ @seenImport = yes
+ else if tag is 'EXPORT'
+ @seenExport = yes
else if tag in UNARY
tag = 'UNARY'
else if tag in RELATION
- if tag isnt 'INSTANCEOF' and @seenFor
+ if tag isnt 'INSTANCEOF' and @seenFor
tag = 'FOR' + tag
- @seenFor = no
+ @seenFor = no
else
tag = 'RELATION'
- if @value() is '!'
- poppedToken = @tokens.pop()
+ 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}'", length: id.length
+ if tag is 'IDENTIFIER' and id in RESERVED
+ @error "reserved word '#{id}'", length: id.length
- unless forcedIdentifier
+ unless tag is 'PROPERTY'
if id in COFFEE_ALIASES
alias = id
id = COFFEE_ALIAS_MAP[id]
@@ -412,18 +428,18 @@ though is
means ===
otherwise.
when '==', '!=' then 'COMPARE'
when '&&', '||' then 'LOGIC'
when 'true', 'false' then 'BOOL'
- when 'break', 'continue' then 'STATEMENT'
+ when 'break', 'continue', \
+ 'debugger' then 'STATEMENT'
else tag
- tagToken = @token tag, id, 0, idLength
+ tagToken = @token tag, id, 0, idLength
tagToken.origin = [tag, alias, tagToken[2]] if alias
- tagToken.variable = not forcedIdentifier
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
+ @token ':', ':', colonOffset, colon.length
input.length
@@ -441,24 +457,29 @@ Be careful not to interfere with ranges-in-progress.
- numberToken: ->
- return 0 unless match = NUMBER.exec @chunk
+ numberToken: ->
+ return 0 unless match = NUMBER.exec @chunk
number = match[0]
lexedLength = number.length
if /^0[BOX]/.test number
- @error "radix prefix in '#{number}' must be lowercase", offset: 1
+ @error "radix prefix in '#{number}' must be lowercase", offset: 1
else if /E/.test(number) and not /^0x/.test number
- @error "exponential notation in '#{number}' must be indicated with a lowercase 'e'",
- offset: number.indexOf('E')
+ @error "exponential notation in '#{number}' must be indicated with a lowercase 'e'",
+ offset: number.indexOf('E')
else if /^0\d*[89]/.test number
- @error "decimal literal '#{number}' must not be prefixed with '0'", length: lexedLength
+ @error "decimal literal '#{number}' must not be prefixed with '0'", length: lexedLength
else if /^0\d+/.test number
- @error "octal literal '#{number}' must be prefixed with '0o'", length: lexedLength
+ @error "octal literal '#{number}' must be prefixed with '0o'", length: lexedLength
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
+ numberValue = parseInt(octalLiteral[1], 8)
+ number = "0x#{numberValue.toString 16}"
+ else if binaryLiteral = /^0b([01]+)/.exec number
+ numberValue = parseInt(binaryLiteral[1], 2)
+ number = "0x#{numberValue.toString 16}"
+ else
+ numberValue = parseFloat(number)
+ tag = if numberValue is Infinity then 'INFINITY' else 'NUMBER'
+ @token tag, number, 0, lexedLength
lexedLength
@@ -475,21 +496,9 @@ interpolation.
- stringToken: ->
- [quote] = STRING_START.exec(@chunk) || []
- return 0 unless quote
- regex = switch quote
- when "'" then STRING_SINGLE
- when '"' then STRING_DOUBLE
- when "'''" then HEREDOC_SINGLE
- when '"""' then HEREDOC_DOUBLE
- heredoc = quote.length is 3
-
- {tokens, index: end} = @matchWithInterpolations regex, quote
- $ = tokens.length - 1
-
- delimiter = quote.charAt(0)
- if heredoc
+ stringToken: ->
+ [quote] = STRING_START.exec(@chunk) || []
+ return 0 unless quote
@@ -500,6 +509,36 @@ interpolation.
+ If the preceding token is from
and this is an import or export statement,
+properly tag the from
.
+
+
+
+ if @tokens.length and @value() is 'from' and (@seenImport or @seenExport)
+ @tokens[@tokens.length - 1][0] = 'FROM'
+
+ regex = switch quote
+ when "'" then STRING_SINGLE
+ when '"' then STRING_DOUBLE
+ when "'''" then HEREDOC_SINGLE
+ when '"""' then HEREDOC_DOUBLE
+ heredoc = quote.length is 3
+
+ {tokens, index: end} = @matchWithInterpolations regex, quote
+ $ = tokens.length - 1
+
+ delimiter = quote.charAt(0)
+ if heredoc
+
+
+
+
+
+
+
+
+ ¶
+
Find the smallest indentation. It will be removed from all lines later.
@@ -510,15 +549,15 @@ interpolation.
attempt = match[1]
indent = attempt if indent is null or 0 < attempt.length < indent.length
indentRegex = /// ^#{indent} ///gm if indent
- @mergeInterpolationTokens tokens, {delimiter}, (value, i) =>
- value = @formatString value
+ @mergeInterpolationTokens tokens, {delimiter}, (value, i) =>
+ value = @formatString value
value = value.replace LEADING_BLANK_LINE, '' if i is 0
value = value.replace TRAILING_BLANK_LINE, '' if i is $
value = value.replace indentRegex, '' if indentRegex
value
else
- @mergeInterpolationTokens tokens, {delimiter}, (value, i) =>
- value = @formatString value
+ @mergeInterpolationTokens tokens, {delimiter}, (value, i) =>
+ value = @formatString value
value = value.replace SIMPLE_STRING_OMIT, (match, offset) ->
if (i is 0 and offset is 0) or
(i is $ and offset + match.length is value.length)
@@ -532,45 +571,27 @@ interpolation.
-
-
-
-
- ¶
-
- Matches and consumes comments.
-
-
-
- commentToken: ->
- return 0 unless match = @chunk.match COMMENT
- [comment, here] = match
- if here
- if match = HERECOMMENT_ILLEGAL.exec comment
- @error "block comments cannot contain #{match[0]}",
- offset: match.index, length: match[0].length
- if here.indexOf('\n') >= 0
- here = here.replace /// \n #{repeat ' ', @indent} ///g, '\n'
- @token 'HERECOMMENT', here, 0, comment.length
- comment.length
-
-
-
-
- Matches JavaScript interpolated directly into the source via backticks.
+ Matches and consumes comments.
- 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
+ commentToken: ->
+ return 0 unless match = @chunk.match COMMENT
+ [comment, here] = match
+ if here
+ if match = HERECOMMENT_ILLEGAL.exec comment
+ @error "block comments cannot contain #{match[0]}",
+ offset: match.index, length: match[0].length
+ if here.indexOf('\n') >= 0
+ here = here.replace /// \n #{repeat ' ', @indent} ///g, '\n'
+ @token 'HERECOMMENT', here, 0, comment.length
+ comment.length
@@ -581,54 +602,14 @@ interpolation.
- Matches regular expression literals, as well as multiline extended ones.
-Lexing regular expressions is difficult to distinguish from division, so we
-borrow some basic heuristics from JavaScript and Ruby.
+ Matches JavaScript interpolated directly into the source via backticks.
- regexToken: ->
- switch
- when match = REGEX_ILLEGAL.exec @chunk
- @error "regular expressions cannot begin with #{match[2]}",
- offset: match.index + match[1].length
- when match = @matchWithInterpolations HEREGEX, '///'
- {tokens, index} = match
- when match = REGEX.exec @chunk
- [regex, body, closed] = match
- @validateEscapes body, isRegex: yes, offsetInChunk: 1
- index = regex.length
- [..., prev] = @tokens
- if prev
- if prev.spaced and prev[0] in CALLABLE
- return 0 if not closed or POSSIBLY_DIVISION.test regex
- else if prev[0] in NOT_REGEX
- return 0
- @error 'missing / (unclosed regex)' unless closed
- else
- return 0
-
- [flags] = REGEX_FLAGS.exec @chunk[index..]
- end = index + flags.length
- origin = @makeToken 'REGEX', null, 0, end
- switch
- when not VALID_FLAGS.test flags
- @error "invalid regular expression flags #{flags}", offset: index, length: flags.length
- when regex or tokens.length is 1
- body ?= @formatHeregex tokens[0][1]
- @token 'REGEX', "#{@makeDelimitedLiteral body, delimiter: '/'}#{flags}", 0, end, origin
- else
- @token 'REGEX_START', '(', 0, 0, origin
- @token 'IDENTIFIER', 'RegExp', 0, 0
- @token 'CALL_START', '(', 0, 0
- @mergeInterpolationTokens tokens, {delimiter: '"', double: yes}, @formatHeregex
- if flags
- @token ',', ',', index, 0
- @token 'STRING', '"' + flags + '"', index, flags.length
- @token ')', ')', end, 0
- @token 'REGEX_END', ')', end, 0
-
- end
+ 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
@@ -639,6 +620,64 @@ borrow some basic heuristics from JavaScript and Ruby.
+ Matches regular expression literals, as well as multiline extended ones.
+Lexing regular expressions is difficult to distinguish from division, so we
+borrow some basic heuristics from JavaScript and Ruby.
+
+
+
+ regexToken: ->
+ switch
+ when match = REGEX_ILLEGAL.exec @chunk
+ @error "regular expressions cannot begin with #{match[2]}",
+ offset: match.index + match[1].length
+ when match = @matchWithInterpolations HEREGEX, '///'
+ {tokens, index} = match
+ when match = REGEX.exec @chunk
+ [regex, body, closed] = match
+ @validateEscapes body, isRegex: yes, offsetInChunk: 1
+ index = regex.length
+ [..., prev] = @tokens
+ if prev
+ if prev.spaced and prev[0] in CALLABLE
+ return 0 if not closed or POSSIBLY_DIVISION.test regex
+ else if prev[0] in NOT_REGEX
+ return 0
+ @error 'missing / (unclosed regex)' unless closed
+ else
+ return 0
+
+ [flags] = REGEX_FLAGS.exec @chunk[index..]
+ end = index + flags.length
+ origin = @makeToken 'REGEX', null, 0, end
+ switch
+ when not VALID_FLAGS.test flags
+ @error "invalid regular expression flags #{flags}", offset: index, length: flags.length
+ when regex or tokens.length is 1
+ body ?= @formatHeregex tokens[0][1]
+ @token 'REGEX', "#{@makeDelimitedLiteral body, delimiter: '/'}#{flags}", 0, end, origin
+ else
+ @token 'REGEX_START', '(', 0, 0, origin
+ @token 'IDENTIFIER', 'RegExp', 0, 0
+ @token 'CALL_START', '(', 0, 0
+ @mergeInterpolationTokens tokens, {delimiter: '"', double: yes}, @formatHeregex
+ if flags
+ @token ',', ',', index, 0
+ @token 'STRING', '"' + flags + '"', index, flags.length
+ @token ')', ')', end, 0
+ @token 'REGEX_END', ')', end, 0
+
+ end
+
+
+
+
+
+
+
+
+ ¶
+
Matches newlines, indents, and outdents, and determines which is which.
If we can detect that the current line is continued onto the next line,
then the newline is suppressed:
@@ -650,92 +689,72 @@ 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
+ lineToken: ->
+ return 0 unless match = MULTI_DENT.exec @chunk
indent = match[0]
- @seenFor = no
+
+ @seenFor = no
+
size = indent.length - 1 - indent.lastIndexOf '\n'
- noNewlines = @unfinished()
- if size - @indebt is @indent
- if noNewlines then @suppressNewlines() else @newlineToken 0
+ noNewlines = @unfinished()
+
+ if size - @indebt is @indent
+ if noNewlines then @suppressNewlines() else @newlineToken 0
return indent.length
- if size > @indent
+ if size > @indent
if noNewlines
- @indebt = size - @indent
- @suppressNewlines()
+ @indebt = size - @indent
+ @suppressNewlines()
return indent.length
- unless @tokens.length
- @baseIndent = @indent = size
+ unless @tokens.length
+ @baseIndent = @indent = size
return indent.length
- diff = size - @indent + @outdebt
- @token 'INDENT', diff, indent.length - size, size
- @indents.push diff
- @ends.push {tag: 'OUTDENT'}
- @outdebt = @indebt = 0
- @indent = size
- else if size < @baseIndent
- @error 'missing indentation', offset: indent.length
+ diff = size - @indent + @outdebt
+ @token 'INDENT', diff, indent.length - size, size
+ @indents.push diff
+ @ends.push {tag: 'OUTDENT'}
+ @outdebt = @indebt = 0
+ @indent = size
+ else if size < @baseIndent
+ @error 'missing indentation', offset: indent.length
else
- @indebt = 0
- @outdentToken @indent - size, noNewlines, indent.length
+ @indebt = 0
+ @outdentToken @indent - size, noNewlines, indent.length
indent.length
-
-
-
-
- ¶
-
- Record an outdent token or multiple tokens, if we happen to be moving back
-inwards past several recorded indents. Sets new @indent value.
-
-
-
- outdentToken: (moveOut, noNewlines, outdentLength) ->
- decreasedIndent = @indent - moveOut
- while moveOut > 0
- lastIndent = @indents[@indents.length - 1]
- if not lastIndent
- moveOut = 0
- else if lastIndent is @outdebt
- moveOut -= @outdebt
- @outdebt = 0
- else if lastIndent < @outdebt
- @outdebt -= lastIndent
- moveOut -= lastIndent
- else
- dent = @indents.pop() + @outdebt
- if outdentLength and @chunk[outdentLength] in INDENTABLE_CLOSERS
- decreasedIndent -= dent - moveOut
- moveOut = dent
- @outdebt = 0
-
-
-
-
- pair might call outdentToken, so preserve decreasedIndent
+ Record an outdent token or multiple tokens, if we happen to be moving back
+inwards past several recorded indents. Sets new @indent value.
- @pair 'OUTDENT'
- @token 'OUTDENT', moveOut, 0, outdentLength
- moveOut -= dent
- @outdebt -= moveOut if dent
- @tokens.pop() while @value() is ';'
-
- @token 'TERMINATOR', '\n', outdentLength, 0 unless @tag() is 'TERMINATOR' or noNewlines
- @indent = decreasedIndent
- this
+ outdentToken: (moveOut, noNewlines, outdentLength) ->
+ decreasedIndent = @indent - moveOut
+ while moveOut > 0
+ lastIndent = @indents[@indents.length - 1]
+ if not lastIndent
+ moveOut = 0
+ else if lastIndent is @outdebt
+ moveOut -= @outdebt
+ @outdebt = 0
+ else if lastIndent < @outdebt
+ @outdebt -= lastIndent
+ moveOut -= lastIndent
+ else
+ dent = @indents.pop() + @outdebt
+ if outdentLength and @chunk[outdentLength] in INDENTABLE_CLOSERS
+ decreasedIndent -= dent - moveOut
+ moveOut = dent
+ @outdebt = 0
@@ -746,17 +765,19 @@ inwards past several recorded indents. Sets new @indent value.
- Matches and consumes non-meaningful whitespace. Tag the previous token
-as being “spaced”, because there are some cases where it makes a difference.
+ pair might call outdentToken, so preserve decreasedIndent
- whitespaceToken: ->
- return 0 unless (match = WHITESPACE.exec @chunk) or
- (nline = @chunk.charAt(0) is '\n')
- [..., prev] = @tokens
- prev[if match then 'spaced' else 'newLine'] = true if prev
- if match then match[0].length else 0
+ @pair 'OUTDENT'
+ @token 'OUTDENT', moveOut, 0, outdentLength
+ moveOut -= dent
+ @outdebt -= moveOut if dent
+ @tokens.pop() while @value() is ';'
+
+ @token 'TERMINATOR', '\n', outdentLength, 0 unless @tag() is 'TERMINATOR' or noNewlines
+ @indent = decreasedIndent
+ this
@@ -767,14 +788,17 @@ as being “spaced”, because there are some cases where it makes a difference.
- Generate a newline token. Consecutive newlines get merged together.
+ Matches and consumes non-meaningful whitespace. Tag the previous token
+as being “spaced”, because there are some cases where it makes a difference.
- newlineToken: (offset) ->
- @tokens.pop() while @value() is ';'
- @token 'TERMINATOR', '\n', offset, 0 unless @tag() is 'TERMINATOR'
- this
+ whitespaceToken: ->
+ return 0 unless (match = WHITESPACE.exec @chunk) or
+ (nline = @chunk.charAt(0) is '\n')
+ [..., prev] = @tokens
+ prev[if match then 'spaced' else 'newLine'] = true if prev
+ if match then match[0].length else 0
@@ -785,13 +809,13 @@ as being “spaced”, because there are some cases where it makes a difference.
- Use a \
at a line-ending to suppress the newline.
-The slash is removed here once its job is done.
+ Generate a newline token. Consecutive newlines get merged together.
- suppressNewlines: ->
- @tokens.pop() if @value() is '\\'
+ newlineToken: (offset) ->
+ @tokens.pop() while @value() is ';'
+ @token 'TERMINATOR', '\n', offset, 0 unless @tag() is 'TERMINATOR'
this
@@ -803,6 +827,24 @@ The slash is removed here once its job is done.
+ 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
@@ -811,25 +853,33 @@ parentheses that indicate a method call from regular parentheses, and so on.
- literalToken: ->
- if match = OPERATOR.exec @chunk
+ literalToken: ->
+ if match = OPERATOR.exec @chunk
[value] = match
- @tagParameters() if CODE.test value
+ @tagParameters() if CODE.test value
else
- value = @chunk.charAt 0
+ value = @chunk.charAt 0
tag = value
- [..., prev] = @tokens
- if value is '=' and prev
- if not prev[1].reserved and prev[1] in JS_FORBIDDEN
- prev = prev.origin if prev.origin
- @error "reserved word '#{prev[1]}' can't be assigned", prev[2]
- if prev[1] in ['||', '&&']
+ [..., prev] = @tokens
+
+ if prev and value in ['=', COMPOUND_ASSIGN...]
+ skipToken = false
+ if value is '=' and prev[1] in ['||', '&&'] and not prev.spaced
prev[0] = 'COMPOUND_ASSIGN'
prev[1] += '='
- return value.length
+ prev = @tokens[@tokens.length - 2]
+ skipToken = true
+ if prev and prev[0] isnt 'PROPERTY'
+ origin = prev.origin ? prev
+ message = isUnassignable prev[1], origin[1]
+ @error message, origin[2] if message
+ return value.length if skipToken
+
if value is ';'
- @seenFor = no
+ @seenFor = @seenImport = @seenExport = no
tag = 'TERMINATOR'
+ else if value is '*' and prev[0] is 'EXPORT'
+ tag = 'EXPORT_ALL'
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'
@@ -845,36 +895,24 @@ parentheses that indicate a method call from regular parentheses, and so on.
tag = 'INDEX_START'
switch prev[0]
when '?' then prev[0] = 'INDEX_SOAK'
- token = @makeToken tag, value
+ token = @makeToken tag, value
switch value
- when '(', '{', '[' then @ends.push {tag: INVERSES[value], origin: token}
- when ')', '}', ']' then @pair value
- @tokens.push token
+ when '(', '{', '[' then @ends.push {tag: INVERSES[value], origin: token}
+ when ')', '}', ']' then @pair value
+ @tokens.push token
value.length
-
-
-
-
- ¶
-
- Token Manipulators
-
-
-
-
-
-
-
+ Token Manipulators
+
@@ -886,14 +924,26 @@ parentheses that indicate a method call from regular parentheses, and so on.
+
+
+
+
+
+
+
+
+
+
+ ¶
+
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 ')'
+ tagParameters: ->
+ return this if @tag() isnt ')'
stack = []
{tokens} = this
i = tokens.length
@@ -913,28 +963,28 @@ parameters specially in order to make things easier for the parser.
-
-
-
-
- ¶
-
- Close up all remaining open blocks at the end of the file.
-
-
-
- closeIndentation: ->
- @outdentToken @indent
-
-
-
-
+ Close up all remaining open blocks at the end of the file.
+
+
+
+ closeIndentation: ->
+ @outdentToken @indent
+
+
+
+
+
+
+
+
+ ¶
+
Match the contents of a delimited token and expand variables and expressions
inside it using Ruby-like notation for substitution of arbitrary
expressions.
@@ -952,35 +1002,15 @@ ad infinitum.
- matchWithInterpolations: (regex, delimiter) ->
+ matchWithInterpolations: (regex, delimiter) ->
tokens = []
offsetInChunk = delimiter.length
- return null unless @chunk[...offsetInChunk] is delimiter
- str = @chunk[offsetInChunk..]
+ return null unless @chunk[...offsetInChunk] is delimiter
+ str = @chunk[offsetInChunk..]
loop
[strPart] = regex.exec str
- @validateEscapes strPart, {isRegex: delimiter.charAt(0) is '/', offsetInChunk}
-
-
-
-
-
-
-
-
- ¶
-
- Push a fake ‘NEOSTRING’ token, which will get turned into a real string later.
-
-
-
- tokens.push @makeToken 'NEOSTRING', strPart, offsetInChunk
-
- str = str[strPart.length..]
- offsetInChunk += strPart.length
-
- break unless str[...2] is '#{'
+ @validateEscapes strPart, {isRegex: delimiter.charAt(0) is '/', offsetInChunk}
@@ -991,13 +1021,16 @@ ad infinitum.
- The 1
s are to remove the #
in #{
.
+ Push a fake ‘NEOSTRING’ token, which will get turned into a real string later.
- [line, column] = @getLineAndColumnFromChunk offsetInChunk + 1
- {tokens: nested, index} =
- new Lexer().tokenize str[1..], line: line, column: column, untilBalanced: on
+ tokens.push @makeToken 'NEOSTRING', strPart, offsetInChunk
+
+ str = str[strPart.length..]
+ offsetInChunk += strPart.length
+
+ break unless str[...2] is '#{'
@@ -1008,11 +1041,13 @@ ad infinitum.
- Skip the trailing }
.
+ The 1
s are to remove the #
in #{
.
- index += 1
+ [line, column] = @getLineAndColumnFromChunk offsetInChunk + 1
+ {tokens: nested, index} =
+ new Lexer().tokenize str[1..], line: line, column: column, untilBalanced: on
@@ -1023,6 +1058,21 @@ ad infinitum.
+ Skip the trailing }
.
+
+
+
+ index += 1
+
+
+
+
+
+
+
+
+ ¶
+
Turn the leading and trailing {
and }
into parentheses. Unnecessary
parentheses will be removed later.
@@ -1036,11 +1086,11 @@ parentheses will be removed later.
-
+
Remove leading ‘TERMINATOR’ (if any).
@@ -1051,11 +1101,11 @@ parentheses will be removed later.
-
+
Push a fake ‘TOKENS’ token, which will get turned into real tokens later.
@@ -1067,40 +1117,14 @@ parentheses will be removed later.
offsetInChunk += index
unless str[...delimiter.length] is delimiter
- @error "missing #{delimiter}", length: delimiter.length
+ @error "missing #{delimiter}", length: delimiter.length
[firstToken, ..., lastToken] = tokens
firstToken[2].first_column -= delimiter.length
lastToken[2].last_column += delimiter.length
lastToken[2].last_column -= 1 if lastToken[1].length is 0
- {tokens, index: offsetInChunk + delimiter.length}
-
-
-
-
-
-
-
-
- ¶
-
- Merge the array tokens
of the fake token types ‘TOKENS’ and ‘NEOSTRING’
-(as returned by matchWithInterpolations
) into the token stream. The value
-of ‘NEOSTRING’s are converted using fn
and turned into strings using
-options
first.
-
-
-
- mergeInterpolationTokens: (tokens, options, fn) ->
- if tokens.length > 1
- lparen = @token 'STRING_START', '(', 0, 0
-
- firstIndex = @tokens.length
- for token, i in tokens
- [tag, value] = token
- switch tag
- when 'TOKENS'
+ {tokens, index: offsetInChunk + delimiter.length}
@@ -1111,11 +1135,22 @@ of ‘NEOSTRING’s are converted using fn
and turned into strings
- Optimize out empty interpolations (an empty pair of parentheses).
+ Merge the array tokens
of the fake token types ‘TOKENS’ and ‘NEOSTRING’
+(as returned by matchWithInterpolations
) into the token stream. The value
+of ‘NEOSTRING’s are converted using fn
and turned into strings using
+options
first.
- continue if value.length is 2
+ mergeInterpolationTokens: (tokens, options, fn) ->
+ if tokens.length > 1
+ lparen = @token 'STRING_START', '(', 0, 0
+
+ firstIndex = @tokens.length
+ for token, i in tokens
+ [tag, value] = token
+ switch tag
+ when 'TOKENS'
@@ -1126,6 +1161,21 @@ of ‘NEOSTRING’s are converted using fn
and turned into strings
+ Optimize out empty interpolations (an empty pair of parentheses).
+
+
+
+ continue if value.length is 2
+
+
+
+
+
+
+
+
+ ¶
+
Push all the tokens in the fake ‘TOKENS’ token. These already have
sane location data.
@@ -1138,11 +1188,11 @@ sane location data.
-
+
Convert ‘NEOSTRING’ into ‘STRING’.
@@ -1153,11 +1203,11 @@ sane location data.
-
+
Optimize out empty strings. We ensure that the tokens stream always
starts with a string token, though, to make sure that the result
@@ -1167,67 +1217,31 @@ really is a string.
if converted.length is 0
if i is 0
- firstEmptyStringIndex = @tokens.length
+ firstEmptyStringIndex = @tokens.length
else
continue
-
-
-
-
- ¶
-
- However, there is one case where we can optimize away a starting
-empty string.
-
-
-
- if i is 2 and firstEmptyStringIndex?
- @tokens.splice firstEmptyStringIndex, 2 # Remove empty string and the plus.
- token[0] = 'STRING'
- token[1] = @makeDelimitedLiteral converted, options
- locationToken = token
- tokensToPush = [token]
- if @tokens.length > firstIndex
-
-
-
-
- Create a 0-length “+” token.
+ However, there is one case where we can optimize away a starting
+empty string.
- plusToken = @token '+', '+'
- plusToken[2] =
- first_line: locationToken[2].first_line
- first_column: locationToken[2].first_column
- last_line: locationToken[2].first_line
- last_column: locationToken[2].first_column
- @tokens.push tokensToPush...
-
- if lparen
- [..., lastToken] = tokens
- lparen.origin = ['STRING', null,
- first_line: lparen[2].first_line
- first_column: lparen[2].first_column
- last_line: lastToken[2].last_line
- last_column: lastToken[2].last_column
- ]
- rparen = @token 'STRING_END', ')'
- rparen[2] =
- first_line: lastToken[2].last_line
- first_column: lastToken[2].last_column
- last_line: lastToken[2].last_line
- last_column: lastToken[2].last_column
+ if i is 2 and firstEmptyStringIndex?
+ @tokens.splice firstEmptyStringIndex, 2 # Remove empty string and the plus.
+ token[0] = 'STRING'
+ token[1] = @makeDelimitedLiteral converted, options
+ locationToken = token
+ tokensToPush = [token]
+ if @tokens.length > firstIndex
@@ -1238,15 +1252,32 @@ empty string.
- Pairs up a closing token, ensuring that all listed pairs of tokens are
-correctly balanced throughout the course of the token stream.
+ Create a 0-length “+” token.
- pair: (tag) ->
- [..., prev] = @ends
- unless tag is wanted = prev?.tag
- @error "unmatched #{tag}" unless 'OUTDENT' is wanted
+ plusToken = @token '+', '+'
+ plusToken[2] =
+ first_line: locationToken[2].first_line
+ first_column: locationToken[2].first_column
+ last_line: locationToken[2].first_line
+ last_column: locationToken[2].first_column
+ @tokens.push tokensToPush...
+
+ if lparen
+ [..., lastToken] = tokens
+ lparen.origin = ['STRING', null,
+ first_line: lparen[2].first_line
+ first_column: lparen[2].first_column
+ last_line: lastToken[2].last_line
+ last_column: lastToken[2].last_column
+ ]
+ rparen = @token 'STRING_END', ')'
+ rparen[2] =
+ first_line: lastToken[2].last_line
+ first_column: lastToken[2].last_column
+ last_line: lastToken[2].last_line
+ last_column: lastToken[2].last_column
@@ -1257,16 +1288,15 @@ correctly balanced throughout the course of the token stream.
- Auto-close INDENT to support syntax like this:
-el.click((event) ->
- el.hide())
-
+ Pairs up a closing token, ensuring that all listed pairs of tokens are
+correctly balanced throughout the course of the token stream.
+
- [..., lastIndent] = @indents
- @outdentToken lastIndent, true
- return @pair tag
- @ends.pop()
+ pair: (tag) ->
+ [..., prev] = @ends
+ unless tag is wanted = prev?.tag
+ @error "unmatched #{tag}" unless 'OUTDENT' is wanted
@@ -1277,10 +1307,17 @@ correctly balanced throughout the course of the token stream.
- Helpers
-
+ Auto-close INDENT to support syntax like this:
+el.click((event) ->
+ el.hide())
+
+ [..., lastIndent] = @indents
+ @outdentToken lastIndent, true
+ return @pair tag
+ @ends.pop()
+
@@ -1290,7 +1327,8 @@ correctly balanced throughout the course of the token stream.
-
+ Helpers
+
@@ -1302,31 +1340,9 @@ correctly balanced throughout the course of the token stream.
- Returns the line and column number from an offset into the current chunk.
-offset
is a number of characters into @chunk.
-
+
- 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
- [..., lastLine] = string.split '\n'
- column = lastLine.length
- else
- column += string.length
-
- [@chunkLine + lineCount, column]
-
@@ -1336,15 +1352,30 @@ correctly balanced throughout the course of the token stream.
- Same as “token”, exception this just returns the token without adding it
-to the results.
+ Returns the line and column number from an offset into the current chunk.
+offset
is a number of characters into @chunk.
- makeToken: (tag, value, offsetInChunk = 0, length = value.length) ->
- locationData = {}
- [locationData.first_line, locationData.first_column] =
- @getLineAndColumnFromChunk offsetInChunk
+ 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
+ [..., lastLine] = string.split '\n'
+ column = lastLine.length
+ else
+ column += string.length
+
+ [@chunkLine + lineCount, column]
@@ -1355,18 +1386,15 @@ to the results.
- Use length - 1 for the final offset - we’re supplying the last_line and the last_column,
-so if last_column == first_column, then we’re looking at a character of length 1.
+ Same as “token”, exception this just returns the token without adding it
+to the results.
- lastCharacter = Math.max 0, length - 1
- [locationData.last_line, locationData.last_column] =
- @getLineAndColumnFromChunk offsetInChunk + lastCharacter
-
- token = [tag, value, locationData]
-
- token
+ makeToken: (tag, value, offsetInChunk = 0, length = value.length) ->
+ locationData = {}
+ [locationData.first_line, locationData.first_column] =
+ @getLineAndColumnFromChunk offsetInChunk
@@ -1377,18 +1405,17 @@ so if last_column == first_column, then we’re looking at a character of length
- Add a token to the results.
-offset
is the offset into the current @chunk where the token starts.
-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.
+ 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.
- token: (tag, value, offsetInChunk, length, origin) ->
- token = @makeToken tag, value, offsetInChunk, length
- token.origin = origin if origin
- @tokens.push token
+ lastCharacter = if length > 0 then (length - 1) else 0
+ [locationData.last_line, locationData.last_column] =
+ @getLineAndColumnFromChunk offsetInChunk + lastCharacter
+
+ token = [tag, value, locationData]
+
token
@@ -1400,13 +1427,19 @@ not specified, the length of value
will be used.
- Peek at the last tag in the token stream.
+ 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.
- tag: ->
- [..., token] = @tokens
- token?[0]
+ token: (tag, value, offsetInChunk, length, origin) ->
+ token = @makeToken tag, value, offsetInChunk, length
+ token.origin = origin if origin
+ @tokens.push token
+ token
@@ -1417,13 +1450,13 @@ not specified, the length of value
will be used.
- Peek at the last value in the token stream.
+ Peek at the last tag in the token stream.
- value: ->
- [..., token] = @tokens
- token?[1]
+ tag: ->
+ [..., token] = @tokens
+ token?[0]
@@ -1434,20 +1467,13 @@ not specified, the length of value
will be used.
- Are we in the midst of an unfinished expression?
+ Peek at the last value in the token stream.
- unfinished: ->
- LINE_CONTINUER.test(@chunk) or
- @tag() in ['\\', '.', '?.', '?::', 'UNARY', 'MATH', 'UNARY_MATH', '+', '-', 'YIELD',
- '**', 'SHIFT', 'RELATION', 'COMPARE', 'LOGIC', 'THROW', 'EXTENDS']
-
- formatString: (str) ->
- str.replace STRING_OMIT, '$1'
-
- formatHeregex: (str) ->
- str.replace HEREGEX_OMIT, '$1$2'
+ value: ->
+ [..., token] = @tokens
+ token?[1]
@@ -1458,24 +1484,20 @@ not specified, the length of value
will be used.
- Validates escapes in strings and regexes.
+ Are we in the midst of an unfinished expression?
- validateEscapes: (str, options = {}) ->
- match = INVALID_ESCAPE.exec str
- return unless match
- [[], before, octal, hex, unicode] = match
- return if options.isRegex and octal and octal.charAt(0) isnt '0'
- message =
- if octal
- "octal escape sequences are not allowed"
- else
- "invalid escape sequence"
- invalidEscape = "\\#{octal or hex or unicode}"
- @error "#{message} #{invalidEscape}",
- offset: (options.offsetInChunk ? 0) + match.index + before.length
- length: invalidEscape.length
+ unfinished: ->
+ LINE_CONTINUER.test(@chunk) or
+ @tag() in ['\\', '.', '?.', '?::', 'UNARY', 'MATH', 'UNARY_MATH', '+', '-',
+ '**', 'SHIFT', 'RELATION', 'COMPARE', 'LOGIC', 'THROW', 'EXTENDS']
+
+ formatString: (str) ->
+ str.replace STRING_OMIT, '$1'
+
+ formatHeregex: (str) ->
+ str.replace HEREGEX_OMIT, '$1$2'
@@ -1486,11 +1508,39 @@ not specified, the length of value
will be used.
+ Validates escapes in strings and regexes.
+
+
+
+ validateEscapes: (str, options = {}) ->
+ match = INVALID_ESCAPE.exec str
+ return unless match
+ [[], before, octal, hex, unicode] = match
+ return if options.isRegex and octal and octal.charAt(0) isnt '0'
+ message =
+ if octal
+ "octal escape sequences are not allowed"
+ else
+ "invalid escape sequence"
+ invalidEscape = "\\#{octal or hex or unicode}"
+ @error "#{message} #{invalidEscape}",
+ offset: (options.offsetInChunk ? 0) + match.index + before.length
+ length: invalidEscape.length
+
+
+
+
+
+
+
+
+ ¶
+
Constructs a string or regex by escaping certain characters.
- makeDelimitedLiteral: (body, options = {}) ->
+ makeDelimitedLiteral: (body, options = {}) ->
body = '(?:)' if body is '' and options.delimiter is '/'
regex = ///
(\\\\) # escaped backslash
@@ -1504,11 +1554,11 @@ not specified, the length of value
will be used.
-
+
Ignore escaped backslashes.
@@ -1527,39 +1577,26 @@ not specified, the length of value
will be used.
-
-
-
-
- ¶
-
- Throws an error at either a given offset from the current chunk or at the
-location of a token (token[2]
).
-
-
-
- error: (message, options = {}) ->
- location =
- if 'first_line' of options
- options
- else
- [first_line, first_column] = @getLineAndColumnFromChunk options.offset ? 0
- {first_line, first_column, last_column: first_column + (options.length ? 1) - 1}
- throwSyntaxError message, location
-
-
-
-
- Constants
+ Throws an error at either a given offset from the current chunk or at the
+location of a token (token[2]
).
+ error: (message, options = {}) ->
+ location =
+ if 'first_line' of options
+ options
+ else
+ [first_line, first_column] = @getLineAndColumnFromChunk options.offset ? 0
+ {first_line, first_column, last_column: first_column + (options.length ? 1) - 1}
+ throwSyntaxError message, location
+
@@ -1569,7 +1606,8 @@ location of a token (token[2]
).
-
+ Helper functions
+
@@ -1581,17 +1619,21 @@ location of a token (token[2]
).
- Keywords that CoffeeScript shares in common with JavaScript.
-
+
- JS_KEYWORDS = [
- 'true', 'false', 'null', 'this'
- 'new', 'delete', 'typeof', 'in', 'instanceof'
- 'return', 'throw', 'break', 'continue', 'debugger', 'yield'
- 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
- 'class', 'extends', 'super'
-]
+
+isUnassignable = (name, displayName = name) -> switch
+ when name in [JS_KEYWORDS..., COFFEE_KEYWORDS...]
+ "keyword '#{displayName}' can't be assigned"
+ when name in STRICT_PROSCRIBED
+ "'#{displayName}' can't be assigned"
+ when name in RESERVED
+ "reserved word '#{displayName}' can't be assigned"
+ else
+ false
+
+exports.isUnassignable = isUnassignable
@@ -1602,11 +1644,61 @@ location of a token (token[2]
).
+ 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', 'yield'
+ 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
+ 'class', 'extends', 'super'
+ 'import', 'export', 'default'
+]
+
+
+
+
+
+
+
+
+ ¶
+
CoffeeScript-only keywords.
- COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']
+ COFFEE_KEYWORDS = [
+ 'undefined', 'Infinity', 'NaN'
+ 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'
+]
COFFEE_ALIAS_MAP =
and : '&&'
@@ -1625,11 +1717,11 @@ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES
-
+
The list of keywords that are reserved by JavaScript, but not used, or are
used by CoffeeScript internally. We throw an error when these are encountered,
@@ -1638,40 +1730,37 @@ to avoid having a JavaScript error at runtime.
RESERVED = [
- 'case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
- 'export', 'import', 'native', 'implements', 'interface', 'package', 'private'
+ 'case', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
+ 'native', 'implements', 'interface', 'package', 'private'
'protected', 'public', 'static'
]
-STRICT_PROSCRIBED = ['arguments', 'eval', '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)
-
-exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED)
-exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED
+ exports.JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED)
-
+
The character code of the nasty Microsoft madness otherwise known as the BOM.
@@ -1682,11 +1771,11 @@ be used as identifiers or properties.
-
+
Token matching regexes.
@@ -1728,11 +1817,11 @@ JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/<
-
+
String-matching-regexes.
@@ -1755,11 +1844,11 @@ HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g
-
+
-
+
-
+
Unary tokens.
@@ -1859,11 +1948,11 @@ UNARY_MATH = ['!', '~
-
+
Logical tokens.
@@ -1874,11 +1963,11 @@ UNARY_MATH = ['!', '~
-
+
Bit-shifting tokens.
@@ -1889,11 +1978,11 @@ UNARY_MATH = ['!', '~
-
+
Comparison tokens.
@@ -1904,11 +1993,11 @@ UNARY_MATH = ['!', '~
-
+
Mathematical tokens.
@@ -1919,11 +2008,11 @@ UNARY_MATH = ['!', '~
-
+
Relational tokens that are negatable with not
prefix.
@@ -1934,11 +2023,11 @@ UNARY_MATH = ['!', '~
-
+
Boolean tokens.
@@ -1949,11 +2038,11 @@ UNARY_MATH = ['!', '~
-
+
Tokens which could legitimately be invoked or indexed. An opening
parentheses or bracket following these tokens will be recorded as the start
@@ -1961,20 +2050,20 @@ of a function invocation or indexing operation.
- CALLABLE = ['IDENTIFIER', ')', ']', '?', '@', 'THIS', 'SUPER']
+ CALLABLE = ['IDENTIFIER', 'PROPERTY', ')', ']', '?', '@', 'THIS', 'SUPER']
INDEXABLE = CALLABLE.concat [
- 'NUMBER', 'STRING', 'STRING_END', 'REGEX', 'REGEX_END'
+ 'NUMBER', 'INFINITY', 'NAN', 'STRING', 'STRING_END', 'REGEX', 'REGEX_END'
'BOOL', 'NULL', 'UNDEFINED', '}', '::'
]
-
+
Tokens which a regular expression will never immediately follow (except spaced
CALLABLEs in some cases), but which a division operator can.
@@ -1987,11 +2076,11 @@ CALLABLEs in some cases), but which a division operator can.
-
+
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
@@ -2004,11 +2093,11 @@ avoid an ambiguity in the grammar.
-
+
Additional indent in front of these is ignored.
diff --git a/documentation/docs/nodes.html b/documentation/docs/nodes.html
index 475684f2..08611ee4 100644
--- a/documentation/docs/nodes.html
+++ b/documentation/docs/nodes.html
@@ -126,7 +126,7 @@ the syntax tree into a string of JavaScript code, call compile()
on
Error.stackTraceLimit = Infinity
{Scope} = require './scope'
-{RESERVED, STRICT_PROSCRIBED} = require './lexer'
+{isUnassignable, JS_FORBIDDEN} = require './lexer'
@@ -157,8 +157,8 @@ addLocationDataFn, locationDataToString, throwSyntaxError} = exports.extend = extend
-exports.addLocationDataFn = addLocationDataFn
+ exports.extend = extend
+exports.addLocationDataFn = addLocationDataFn
@@ -176,7 +176,7 @@ addLocationDataFn, locationDataToString, throwSyntaxError} = YES = -> yes
NO = -> no
THIS = -> this
-NEGATE = -> @negated = not @negated; this
+NEGATE = -> @negated = not @negated; this
@@ -207,14 +207,14 @@ 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'
+ 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 ''}"
+ toString: ->
+ "#{@code}#{if @locationData then ": " + locationDataToString(@locationData) else ''}"
@@ -266,10 +266,10 @@ scope, and indentation level.
- exports.Base = class Base
+ exports.Base = class Base
- compile: (o, lvl) ->
- fragmentsToText @compileToFragments o, lvl
+ compile: (o, lvl) ->
+ fragmentsToText @compileToFragments o, lvl
@@ -289,10 +289,10 @@ return results).
- compileToFragments: (o, lvl) ->
+ compileToFragments: (o, lvl) ->
o = extend {}, o
o.level = lvl if lvl
- node = @unfoldSoak(o) or this
+ node = @unfoldSoak(o) or this
node.tab = o.indent
if o.level is LEVEL_TOP or not node.isStatement(o)
node.compileNode o
@@ -313,24 +313,24 @@ object with their parent closure, to preserve the expected lexical scope.
- compileClosure: (o) ->
- if jumpNode = @jumps()
+ compileClosure: (o) ->
+ if jumpNode = @jumps()
jumpNode.error 'cannot use a pure statement in an expression'
o.sharedScope = yes
func = new Code [], Block.wrap [this]
args = []
- if (argumentsNode = @contains isLiteralArguments) or @contains isLiteralThis
- args = [new Literal 'this']
+ if (argumentsNode = @contains isLiteralArguments) or @contains isLiteralThis
+ args = [new ThisLiteral]
if argumentsNode
meth = 'apply'
- args.push new Literal 'arguments'
+ args.push new IdentifierLiteral 'arguments'
else
meth = 'call'
- func = new Value func, [new Access new Literal meth]
+ func = new Value func, [new Access new PropertyName meth]
parts = (new Call func, args).compileNode o
if func.isGenerator or func.base?.isGenerator
- parts.unshift @makeCode "(yield* "
- parts.push @makeCode ")"
+ parts.unshift @makeCode "(yield* "
+ parts.push @makeCode ")"
parts
@@ -351,17 +351,17 @@ the two values are raw nodes which have not been compiled.
- cache: (o, level, isComplex) ->
- complex = if isComplex? then isComplex this else @isComplex()
+ cache: (o, level, isComplex) ->
+ complex = if isComplex? then isComplex this else @isComplex()
if complex
- ref = new Literal o.scope.freeVariable 'ref'
+ ref = new IdentifierLiteral o.scope.freeVariable 'ref'
sub = new Assign ref, this
- if level then [sub.compileToFragments(o, level), [@makeCode(ref.value)]] else [sub, ref]
+ if level then [sub.compileToFragments(o, level), [@makeCode(ref.value)]] else [sub, ref]
else
- ref = if level then @compileToFragments o, level else this
+ ref = if level then @compileToFragments o, level else this
[ref, ref]
- cacheToCodeFragments: (cacheValues) ->
+ cacheToCodeFragments: (cacheValues) ->
[fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]
@@ -379,8 +379,8 @@ many statement nodes (e.g. If, For)…
- makeReturn: (res) ->
- me = @unwrapAll()
+ makeReturn: (res) ->
+ me = @unwrapAll()
if res
new Call new Literal("#{res}.push"), [me]
else
@@ -402,9 +402,9 @@ scope boundaries.
- contains: (pred) ->
+ contains: (pred) ->
node = undefined
- @traverseChildren no, (n) ->
+ @traverseChildren no, (n) ->
if pred n
node = n
return no
@@ -423,7 +423,7 @@ scope boundaries.
- lastNonComment: (list) ->
+ lastNonComment: (list) ->
i = list.length
return list[i] while i-- when list[i] not instanceof Comment
null
@@ -442,10 +442,10 @@ This is what coffee --nodes
prints out.
- toString: (idt = '', name = @constructor.name) ->
+ toString: (idt = '', name = @constructor.name) ->
tree = '\n' + idt + name
- tree += '?' if @soak
- @eachChild (node) -> tree += node.toString idt + TAB
+ tree += '?' if @soak
+ @eachChild (node) -> tree += node.toString idt + TAB
tree
@@ -461,22 +461,22 @@ This is what coffee --nodes
prints out.
- eachChild: (func) ->
- return this unless @children
- for attr in @children when @[attr]
+ 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) ->
+ traverseChildren: (crossScope, func) ->
+ @eachChild (child) ->
recur = func(child)
child.traverseChildren(crossScope, func) unless recur is no
- invert: ->
+ invert: ->
new Op '!', this
- unwrapAll: ->
+ unwrapAll: ->
node = this
continue until node is node = node.unwrap()
node
@@ -495,13 +495,14 @@ will override these with custom logic, if needed.
- children: []
+ children: []
isStatement : NO
jumps : NO
isComplex : YES
isChainable : NO
isAssignable : NO
+ isNumber : NO
unwrap : THIS
unfoldSoak : NO
@@ -519,7 +520,7 @@ will override these with custom logic, if needed.
- assigns: NO
+ assigns: NO
@@ -535,11 +536,11 @@ if the location data is not already set.
- updateLocationDataIfMissing: (locationData) ->
- return this if @locationData
- @locationData = locationData
+ updateLocationDataIfMissing: (locationData) ->
+ return this if @locationData
+ @locationData = locationData
- @eachChild (child) ->
+ @eachChild (child) ->
child.updateLocationDataIfMissing locationData
@@ -555,14 +556,14 @@ if the location data is not already set.
- error: (message) ->
- throwSyntaxError message, @locationData
+ error: (message) ->
+ throwSyntaxError message, @locationData
- makeCode: (code) ->
+ makeCode: (code) ->
new CodeFragment this, code
- wrapInBraces: (fragments) ->
- [].concat @makeCode('('), fragments, @makeCode(')')
+ wrapInBraces: (fragments) ->
+ [].concat @makeCode('('), fragments, @makeCode(')')
@@ -579,10 +580,10 @@ of fragments.
- joinFragmentArrays: (fragmentsList, joinStr) ->
+ joinFragmentArrays: (fragmentsList, joinStr) ->
answer = []
for fragments,i in fragmentsList
- if i then answer.push @makeCode joinStr
+ if i then answer.push @makeCode joinStr
answer = answer.concat fragments
answer
@@ -609,16 +610,16 @@ of fragments.
¶
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
+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 []
+ exports.Block = class Block extends Base
+ constructor: (nodes) ->
+ @expressions = compact flatten nodes or []
- children: ['expressions']
+ children: ['expressions']
@@ -633,8 +634,8 @@ indented block of code — the implementation of a function, a clause in an
- push: (node) ->
- @expressions.push node
+ push: (node) ->
+ @expressions.push node
this
@@ -650,8 +651,8 @@ indented block of code — the implementation of a function, a clause in an
- pop: ->
- @expressions.pop()
+ pop: ->
+ @expressions.pop()
@@ -666,8 +667,8 @@ indented block of code — the implementation of a function, a clause in an
- unshift: (node) ->
- @expressions.unshift node
+ unshift: (node) ->
+ @expressions.unshift node
this
@@ -684,8 +685,8 @@ it back out.
- unwrap: ->
- if @expressions.length is 1 then @expressions[0] else this
+ unwrap: ->
+ if @expressions.length is 1 then @expressions[0] else this
@@ -700,16 +701,16 @@ it back out.
- isEmpty: ->
- not @expressions.length
+ isEmpty: ->
+ not @expressions.length
- isStatement: (o) ->
- for exp in @expressions when exp.isStatement o
+ isStatement: (o) ->
+ for exp in @expressions when exp.isStatement o
return yes
no
- jumps: (o) ->
- for exp in @expressions
+ jumps: (o) ->
+ for exp in @expressions
return jumpNode if jumpNode = exp.jumps o
@@ -726,13 +727,13 @@ ensures that the final expression is returned.
- makeReturn: (res) ->
- len = @expressions.length
+ makeReturn: (res) ->
+ len = @expressions.length
while len--
- expr = @expressions[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
+ @expressions[len] = expr.makeReturn res
+ @expressions.splice(len, 1) if expr instanceof Return and not expr.expression
break
this
@@ -749,8 +750,8 @@ ensures that the final expression is returned.
- compileToFragments: (o = {}, level) ->
- if o.scope then super o, level else @compileRoot o
+ compileToFragments: (o = {}, level) ->
+ if o.scope then super o, level else @compileRoot o
@@ -767,12 +768,12 @@ statement, ask the statement to do so.
- compileNode: (o) ->
- @tab = o.indent
+ compileNode: (o) ->
+ @tab = o.indent
top = o.level is LEVEL_TOP
compiledNodes = []
- for node, index in @expressions
+ for node, index in @expressions
node = node.unwrapAll()
node = (node.unfoldSoak(o) or node)
@@ -798,21 +799,21 @@ our own
node.front = true
fragments = node.compileToFragments o
unless node.isStatement o
- fragments.unshift @makeCode "#{@tab}"
- fragments.push @makeCode ";"
+ 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")
+ if @spaced
+ return [].concat @joinFragmentArrays(compiledNodes, '\n\n'), @makeCode("\n")
else
- return @joinFragmentArrays(compiledNodes, '\n')
+ return @joinFragmentArrays(compiledNodes, '\n')
if compiledNodes.length
- answer = @joinFragmentArrays(compiledNodes, ', ')
+ answer = @joinFragmentArrays(compiledNodes, ', ')
else
- answer = [@makeCode "void 0"]
- if compiledNodes.length > 1 and o.level >= LEVEL_LIST then @wrapInBraces answer else answer
+ answer = [@makeCode "void 0"]
+ if compiledNodes.length > 1 and o.level >= LEVEL_LIST then @wrapInBraces answer else answer
@@ -830,10 +831,10 @@ clean up obvious double-parentheses.
- compileRoot: (o) ->
+ compileRoot: (o) ->
o.indent = if o.bare then '' else TAB
o.level = LEVEL_TOP
- @spaced = yes
+ @spaced = yes
o.scope = new Scope null, this, null, o.referencedVars ? []
@@ -853,18 +854,18 @@ 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
+ preludeExps = for exp, i in @expressions
break unless exp.unwrap() instanceof Comment
exp
- rest = @expressions[preludeExps.length...]
- @expressions = preludeExps
+ rest = @expressions[preludeExps.length...]
+ @expressions = preludeExps
if preludeExps.length
- prelude = @compileNode merge(o, indent: '')
- prelude.push @makeCode "\n"
- @expressions = rest
- fragments = @compileWithDeclarations o
+ 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")
+ [].concat prelude, @makeCode("(function() {\n"), fragments, @makeCode("\n}).call(this);\n")
@@ -880,34 +881,34 @@ declarations of all inner variables pushed up to the top.
- compileWithDeclarations: (o) ->
+ compileWithDeclarations: (o) ->
fragments = []
post = []
- for exp, i in @expressions
+ for exp, i in @expressions
exp = exp.unwrap()
break unless exp instanceof Comment or exp instanceof Literal
- o = merge(o, level: LEVEL_TOP)
+ 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
+ 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 "
+ 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#{if @spaced then '\n' else ''}"
+ 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.push @makeCode "\n"
fragments.concat post
@@ -924,7 +925,7 @@ to be one.
- @wrap: (nodes) ->
+ @wrap: (nodes) ->
return nodes[0] if nodes.length is 1 and nodes[0] instanceof Block
new Block nodes
@@ -950,62 +951,84 @@ to be one.
- Literals are static values that can be passed through directly into
-JavaScript without translation, such as: strings, numbers,
+
Literal
is a base class for 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) ->
+ exports.Literal = class Literal extends Base
+ constructor: (@value) ->
- makeReturn: ->
- if @isStatement() then this else super
+ isComplex: NO
- isAssignable: ->
- IDENTIFIER.test @value
+ assigns: (name) ->
+ name is @value
- isStatement: ->
- @value in ['break', 'continue', 'debugger']
+ compileNode: (o) ->
+ [@makeCode @value]
- isComplex: NO
+ toString: ->
+ " #{if @isStatement() then super else @constructor.name}: #{@value}"
- assigns: (name) ->
- name is @value
+exports.NumberLiteral = class NumberLiteral extends Literal
- 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
+exports.InfinityLiteral = class InfinityLiteral extends NumberLiteral
+ compileNode: ->
+ [@makeCode '2e308']
- 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]
+exports.NaNLiteral = class NaNLiteral extends NumberLiteral
+ constructor: ->
+ super 'NaN'
- toString: ->
- ' "' + @value + '"'
+ compileNode: (o) ->
+ code = [@makeCode '0/0']
+ if o.level >= LEVEL_OP then @wrapInBraces code else code
-class exports.Undefined extends Base
- isAssignable: NO
- isComplex: NO
- compileNode: (o) ->
- [@makeCode if o.level >= LEVEL_ACCESS then '(void 0)' else 'void 0']
+exports.StringLiteral = class StringLiteral extends Literal
-class exports.Null extends Base
- isAssignable: NO
- isComplex: NO
- compileNode: -> [@makeCode "null"]
+exports.RegexLiteral = class RegexLiteral extends Literal
-class exports.Bool extends Base
- isAssignable: NO
- isComplex: NO
- compileNode: -> [@makeCode @val]
- constructor: (@val) ->
+exports.PassthroughLiteral = class PassthroughLiteral extends Literal
+
+exports.IdentifierLiteral = class IdentifierLiteral extends Literal
+ isAssignable: YES
+
+exports.PropertyName = class PropertyName extends Literal
+ isAssignable: YES
+
+exports.StatementLiteral = class StatementLiteral extends Literal
+ isStatement: YES
+
+ makeReturn: THIS
+
+ 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) ->
+ [@makeCode "#{@tab}#{@value};"]
+
+exports.ThisLiteral = class ThisLiteral extends Literal
+ constructor: ->
+ super 'this'
+
+ compileNode: (o) ->
+ code = if o.scope.method?.bound then o.scope.method.context else @value
+ [@makeCode code]
+
+exports.UndefinedLiteral = class UndefinedLiteral extends Literal
+ constructor: ->
+ super 'undefined'
+
+ compileNode: (o) ->
+ [@makeCode if o.level >= LEVEL_ACCESS then '(void 0)' else 'void 0']
+
+exports.NullLiteral = class NullLiteral extends Literal
+ constructor: ->
+ super 'null'
+
+exports.BooleanLiteral = class BooleanLiteral extends Literal
@@ -1029,27 +1052,26 @@ JavaScript without translation, such as: strings, numbers,
- A return
is a pureStatement — wrapping it in a closure wouldn’t
+
A return
is a pureStatement – wrapping it in a closure wouldn’t
make sense.
- exports.Return = class Return extends Base
- constructor: (@expression) ->
+ exports.Return = class Return extends Base
+ constructor: (@expression) ->
- children: ['expression']
+ children: ['expression']
- isStatement: YES
- makeReturn: THIS
- jumps: THIS
+ isStatement: YES
+ makeReturn: THIS
+ jumps: THIS
- compileToFragments: (o, level) ->
- expr = @expression?.makeReturn()
+ 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 = []
- exprIsYieldReturn = @expression?.isYieldReturn?()
+ compileNode: (o) ->
+ answer = []
@@ -1064,11 +1086,10 @@ make sense.
- unless exprIsYieldReturn
- answer.push @makeCode @tab + "return#{if @expression then " " else ""}"
- if @expression
- answer = answer.concat @expression.compileToFragments o, LEVEL_PAREN
- answer.push @makeCode ";" unless exprIsYieldReturn
+ answer.push @makeCode @tab + "return#{if @expression then " " else ""}"
+ if @expression
+ answer = answer.concat @expression.compileToFragments o, LEVEL_PAREN
+ answer.push @makeCode ";"
return answer
@@ -1080,10 +1101,17 @@ make sense.
- Value
+ yield return
works exactly like return
, except that it turns the function
+into a generator.
+ exports.YieldReturn = class YieldReturn extends Return
+ compileNode: (o) ->
+ unless o.scope.parent?
+ @error 'yield can only occur inside functions'
+ super
+
@@ -1093,21 +1121,10 @@ make sense.
- A value, variable or literal or parenthesized, indexed or dotted into,
-or vanilla.
+ Value
- 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']
-
@@ -1117,19 +1134,20 @@ or vanilla.
- Add a property (or properties ) Access
to the list.
+ A value, variable or literal or parenthesized, indexed or dotted into,
+or vanilla.
- add: (props) ->
- @properties = @properties.concat props
- this
+ 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
- hasProperties: ->
- !!@properties.length
-
- bareLiteral: (type) ->
- not @properties.length and @base instanceof type
+ children: ['base', 'properties']
@@ -1140,40 +1158,19 @@ or vanilla.
- Some boolean checks for the benefit of other nodes.
+ Add a property (or properties ) Access
to the list.
- isArray : -> @bareLiteral(Arr)
- isRange : -> @bareLiteral(Range)
- isComplex : -> @hasProperties() or @base.isComplex()
- isAssignable : -> @hasProperties() or @base.isAssignable()
- isSimpleNumber : -> @bareLiteral(Literal) and SIMPLENUM.test @base.value
- isString : -> @bareLiteral(Literal) and IS_STRING.test @base.value
- isRegex : -> @bareLiteral(Literal) and IS_REGEX.test @base.value
- isAtomic : ->
- for node in @properties.concat @base
- return no if node.soak or node instanceof Call
- yes
+ add: (props) ->
+ @properties = @properties.concat props
+ this
- isNotCallable : -> @isSimpleNumber() or @isString() or @isRegex() or
- @isArray() or @isRange() or @isSplice() or @isObject()
+ hasProperties: ->
+ !!@properties.length
- 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: ->
- [..., lastProp] = @properties
- lastProp instanceof Slice
-
- looksStatic: (className) ->
- @base.value is className and @properties.length is 1 and
- @properties[0].name?.value isnt 'prototype'
+ bareLiteral: (type) ->
+ not @properties.length and @base instanceof type
@@ -1184,13 +1181,44 @@ or vanilla.
- The value can be unwrapped as its inner node, if there are no attached
-properties.
+ Some boolean checks for the benefit of other nodes.
- unwrap: ->
- if @properties.length then this else @base
+ isArray : -> @bareLiteral(Arr)
+ isRange : -> @bareLiteral(Range)
+ isComplex : -> @hasProperties() or @base.isComplex()
+ isAssignable : -> @hasProperties() or @base.isAssignable()
+ isNumber : -> @bareLiteral(NumberLiteral)
+ isString : -> @bareLiteral(StringLiteral)
+ isRegex : -> @bareLiteral(RegexLiteral)
+ isUndefined : -> @bareLiteral(UndefinedLiteral)
+ isNull : -> @bareLiteral(NullLiteral)
+ isBoolean : -> @bareLiteral(BooleanLiteral)
+ isAtomic : ->
+ for node in @properties.concat @base
+ return no if node.soak or node instanceof Call
+ yes
+
+ isNotCallable : -> @isNumber() or @isString() or @isRegex() or
+ @isArray() or @isRange() or @isSplice() or @isObject() or
+ @isUndefined() or @isNull() or @isBoolean()
+
+ 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: ->
+ [..., lastProp] = @properties
+ lastProp instanceof Slice
+
+ looksStatic: (className) ->
+ @base.value is className and @properties.length is 1 and
+ @properties[0].name?.value isnt 'prototype'
@@ -1201,26 +1229,13 @@ properties.
- 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
+ The value can be unwrapped as its inner node, if there are no attached
+properties.
- cacheReference: (o) ->
- [..., name] = @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])]
+ unwrap: ->
+ if @properties.length then this else @base
@@ -1231,22 +1246,26 @@ We cache them separately for compiling complex expressions.
- 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.
+ 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
- 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
+ cacheReference: (o) ->
+ [..., name] = @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 IdentifierLiteral 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 IdentifierLiteral 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])]
@@ -1257,25 +1276,22 @@ evaluate anything twice when building the soak chain.
- Unfold a soak into an If
: a?.b
-> a.b if a?
+ 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.
- 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
+ compileNode: (o) ->
+ @base.front = @front
+ props = @properties
+ fragments = @base.compileToFragments o, (if props.length then LEVEL_ACCESS else null)
+ if props.length and SIMPLENUM.test fragmentsToText fragments
+ fragments.push @makeCode '.'
+ for prop in props
+ fragments.push (prop.compileToFragments o)...
+ fragments
@@ -1286,10 +1302,26 @@ evaluate anything twice when building the soak chain.
- Comment
+ 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 IdentifierLiteral o.scope.freeVariable 'ref'
+ fst = new Parens new Assign ref, fst
+ snd.base = ref
+ return new If new Existence(fst), snd, soak: on
+ no
+
@@ -1299,23 +1331,10 @@ evaluate anything twice when building the soak chain.
- CoffeeScript passes through block comments as JavaScript block comments
-at the same position.
+ Comment
- exports.Comment = class Comment extends Base
- constructor: (@comment) ->
-
- isStatement: YES
- makeReturn: THIS
-
- compileNode: (o, level) ->
- comment = @comment.replace /^(\s*)#(?=\s)/gm, "$1 *"
- code = "/*#{multident comment, @tab}#{if '\n' in comment then "\n#{@tab}" else ''} */"
- code = o.indent + code if (level or o.level) is LEVEL_TOP
- [@makeCode("\n"), @makeCode(code)]
-
@@ -1325,10 +1344,23 @@ at the same position.
- Call
+ 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) ->
+ comment = @comment.replace /^(\s*)#(?=\s)/gm, "$1 *"
+ code = "/*#{multident comment, @tab}#{if '\n' in comment then "\n#{@tab}" else ''} */"
+ code = o.indent + code if (level or o.level) is LEVEL_TOP
+ [@makeCode("\n"), @makeCode(code)]
+
@@ -1338,21 +1370,10 @@ at the same position.
- Node for a function invocation. Takes care of converting super()
calls into
-calls against the prototype’s function of the same name.
+ Call
- exports.Call = class Call extends Base
- constructor: (variable, @args = [], @soak) ->
- @isNew = false
- @isSuper = variable is 'super'
- @variable = if @isSuper then null else variable
- if variable instanceof Value and variable.isNotCallable()
- variable.error "literal is not a function"
-
- children: ['variable', 'args']
-
@@ -1362,17 +1383,17 @@ calls against the prototype’s function of the same name.
- Tag this invocation as creating a new instance.
+ Node for a function invocation.
- newInstance: ->
- base = @variable?.base or @variable
- if base instanceof Call and not base.isNew
- base.newInstance()
- else
- @isNew = true
- this
+ exports.Call = class Call extends Base
+ constructor: (@variable, @args = [], @soak) ->
+ @isNew = false
+ if @variable instanceof Value and @variable.isNotCallable()
+ @variable.error "literal is not a function"
+
+ children: ['variable', 'args']
@@ -1383,33 +1404,17 @@ calls against the prototype’s function of the same name.
- Grab the reference to the superclass’s implementation of the current
-method.
+ Tag this invocation as creating a new instance.
- superReference: (o) ->
- method = o.scope.namedMethod()
- if method?.klass
- {klass, name, variable} = method
- if klass.isComplex()
- bref = new Literal o.scope.parent.freeVariable 'base'
- base = new Value new Parens new Assign bref, klass
- variable.base = base
- variable.properties.splice 0, klass.properties.length
- if name.isComplex() or (name instanceof Index and name.index.isAssignable())
- nref = new Literal o.scope.parent.freeVariable 'name'
- name = new Index new Assign nref, name.index
- variable.properties.pop()
- variable.properties.push name
- accesses = [new Access new Literal '__super__']
- accesses.push new Access new Literal 'constructor' if method.static
- accesses.push if nref? then new Index nref else name
- (new Value bref ? klass, accesses).compile o
- else if method?.ctor
- "#{method.name}.__super__.constructor"
+ newInstance: ->
+ base = @variable?.base or @variable
+ if base instanceof Call and not base.isNew
+ base.newInstance()
else
- @error 'cannot call super outside of an instance method.'
+ @isNew = true
+ this
@@ -1420,39 +1425,22 @@ 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
+ unfoldSoak: (o) ->
+ if @soak
+ if this instanceof SuperCall
+ left = new Literal @superReference o
rite = new Value left
- rite = new Call rite, @args
- rite.isNew = @isNew
+ else
+ return ifn if ifn = unfoldSoak o, this, 'variable'
+ [left, rite] = new Value(@variable).cacheReference o
+ 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
+ return new If left, new Value(rite), soak: yes
call = this
list = []
loop
@@ -1475,38 +1463,90 @@ method.
+
+
+
+
+ ¶
+
+ 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 this instanceof SuperCall
+ 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
+
+
+
+
- Compile a vanilla function call.
+ 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’.
- 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)...
+ compileSplat: (o, splatArgs) ->
+ if this instanceof SuperCall
+ return [].concat @makeCode("#{ @superReference o }.apply(#{@superThis(o)}, "),
+ splatArgs, @makeCode(")")
- fragments = []
- if @isSuper
- preface = @superReference(o) + ".call(#{@superThis(o)}"
- if compiledArgs.length then preface += ", "
- fragments.push @makeCode preface
+ 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
- if @isNew then fragments.push @makeCode 'new '
- fragments.push @variable.compileToFragments(o, LEVEL_ACCESS)...
- fragments.push @makeCode "("
- fragments.push compiledArgs...
- fragments.push @makeCode ")"
- fragments
+ 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(")")
@@ -1517,49 +1557,10 @@ method.
- 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’.
+ Super
- 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(")")
-
@@ -1569,10 +1570,15 @@ inner constructor in order to be able to pass the varargs.
- Extends
+ Takes care of converting super()
calls into calls against the prototype’s
+function of the same name.
+ exports.SuperCall = class SuperCall extends Call
+ constructor: (args) ->
+ super null, args ? [new Splat new IdentifierLiteral 'arguments']
+
@@ -1582,16 +1588,11 @@ inner constructor in order to be able to pass the varargs.
- Node to extend an object’s prototype with an ancestor object.
-After goog.inherits
from the
-Closure Library.
+ Allow to recognize a bare super
call without parentheses and arguments.
- exports.Extends = class Extends extends Base
- constructor: (@child, @parent) ->
-
- children: ['child', 'parent']
+ @isBare = args?
@@ -1602,12 +1603,33 @@ After goog.inherits
from the
- Hooks one constructor into another’s prototype chain.
+ Grab the reference to the superclass’s implementation of the current
+method.
- compileToFragments: (o) ->
- new Call(new Value(new Literal utility 'extend', o), [@child, @parent]).compileToFragments o
+ superReference: (o) ->
+ method = o.scope.namedMethod()
+ if method?.klass
+ {klass, name, variable} = method
+ if klass.isComplex()
+ bref = new IdentifierLiteral o.scope.parent.freeVariable 'base'
+ base = new Value new Parens new Assign bref, klass
+ variable.base = base
+ variable.properties.splice 0, klass.properties.length
+ if name.isComplex() or (name instanceof Index and name.index.isAssignable())
+ nref = new IdentifierLiteral o.scope.parent.freeVariable 'name'
+ name = new Index new Assign nref, name.index
+ variable.properties.pop()
+ variable.properties.push name
+ accesses = [new Access new PropertyName '__super__']
+ accesses.push new Access new PropertyName 'constructor' if method.static
+ accesses.push if nref? then new Index nref else name
+ (new Value bref ? klass, accesses).compile o
+ else if method?.ctor
+ "#{method.name}.__super__.constructor"
+ else
+ @error 'cannot call super outside of an instance method.'
@@ -1618,10 +1640,14 @@ After goog.inherits
from the
- Access
+ The appropriate this
value for a super
call.
+ superThis : (o) ->
+ method = o.scope.method
+ (method and not method.klass and method.context) or "this"
+
@@ -1631,29 +1657,10 @@ After goog.inherits
from the
- A .
access into a property of a value, or the ::
shorthand for
-an access into the object’s prototype.
+ RegexWithInterpolations
- 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
-
@@ -1663,10 +1670,15 @@ an access into the object’s prototype.
- Index
+ Regexes with interpolations are in fact just a variation of a Call
(a
+RegExp()
call to be precise) with a StringWithInterpolations
inside.
+ exports.RegexWithInterpolations = class RegexWithInterpolations extends Call
+ constructor: (args = []) ->
+ super (new Value new IdentifierLiteral 'RegExp'), args, false
+
@@ -1676,21 +1688,10 @@ an access into the object’s prototype.
- A [ ... ]
indexed access into an array or object.
+ Extends
- exports.Index = class Index extends Base
- constructor: (@index) ->
-
- children: ['index']
-
- compileToFragments: (o) ->
- [].concat @makeCode("["), @index.compileToFragments(o, LEVEL_PAREN), @makeCode("]")
-
- isComplex: ->
- @index.isComplex()
-
@@ -1700,10 +1701,17 @@ an access into the object’s prototype.
- Range
+ 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']
+
@@ -1713,19 +1721,12 @@ an access into the object’s prototype.
- 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.
+ Hooks one constructor into another’s prototype chain.
- exports.Range = class Range extends Base
-
- children: ['from', 'to']
-
- constructor: (@from, @to, tag) ->
- @exclusive = tag is 'exclusive'
- @equals = if @exclusive then '' else '='
+ compileToFragments: (o) ->
+ new Call(new Value(new Literal utility 'extend', o), [@child, @parent]).compileToFragments o
@@ -1736,20 +1737,10 @@ corresponding array of integers at runtime.
- 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.
+ Access
- compileVariables: (o) ->
- o = merge o, top: true
- isComplex = del o, 'isComplex'
- [@fromC, @fromVar] = @cacheToCodeFragments @from.cache o, LEVEL_LIST, isComplex
- [@toC, @toVar] = @cacheToCodeFragments @to.cache o, LEVEL_LIST, isComplex
- [@step, @stepVar] = @cacheToCodeFragments step.cache o, LEVEL_LIST, isComplex if step = del o, 'step'
- [@fromNum, @toNum] = [@fromVar.match(NUMBER), @toVar.match(NUMBER)]
- @stepNum = @stepVar.match(NUMBER) if @stepVar
-
@@ -1759,14 +1750,30 @@ But only if they need to be cached to avoid double evaluation.
- When compiled normally, the range returns the contents of the for loop
-needed to iterate over the values in the range. Used by comprehensions.
+ A .
access into a property of a value, or the ::
shorthand for
+an access into the object’s prototype.
- compileNode: (o) ->
- @compileVariables o unless @fromVar
- return @compileArray(o) unless o.index
+ exports.Access = class Access extends Base
+ constructor: (@name, tag) ->
+ @name.asKey = yes
+ @soak = tag is 'soak'
+
+ children: ['name']
+
+ compileToFragments: (o) ->
+ name = @name.compileToFragments o
+ node = @name.unwrap()
+ if node instanceof PropertyName
+ if node.value in JS_FORBIDDEN
+ [@makeCode('["'), name..., @makeCode('"]')]
+ else
+ [@makeCode('.'), name...]
+ else
+ [@makeCode('['), name..., @makeCode(']')]
+
+ isComplex: NO
@@ -1777,19 +1784,10 @@ needed to iterate over the values in the range. Used by comprehensions.
- Set up endpoints.
+ Index
- 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}"]
-
@@ -1799,18 +1797,20 @@ needed to iterate over the values in the range. Used by comprehensions.
- Generate the condition.
+ A [ ... ]
indexed access into an array or object.
- condPart = if @stepNum
- if parseNum(@stepNum[0]) > 0 then "#{lt} #{@toVar}" else "#{gt} #{@toVar}"
- else if known
- [from, to] = [parseNum(@fromNum[0]), parseNum(@toNum[0])]
- if from <= to then "#{lt} #{to}" else "#{gt} #{to}"
- else
- cond = if @stepVar then "#{@stepVar} > 0" else "#{@fromVar} <= #{@toVar}"
- "#{cond} ? #{lt} #{@toVar} : #{gt} #{@toVar}"
+ exports.Index = class Index extends Base
+ constructor: (@index) ->
+
+ children: ['index']
+
+ compileToFragments: (o) ->
+ [].concat @makeCode("["), @index.compileToFragments(o, LEVEL_PAREN), @makeCode("]")
+
+ isComplex: ->
+ @index.isComplex()
@@ -1821,12 +1821,134 @@ needed to iterate over the values in the range. Used by comprehensions.
+ 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
+ isComplex = del o, 'isComplex'
+ [@fromC, @fromVar] = @cacheToCodeFragments @from.cache o, LEVEL_LIST, isComplex
+ [@toC, @toVar] = @cacheToCodeFragments @to.cache o, LEVEL_LIST, isComplex
+ [@step, @stepVar] = @cacheToCodeFragments step.cache o, LEVEL_LIST, isComplex if step = del o, 'step'
+ @fromNum = if @from.isNumber() then Number @fromVar else null
+ @toNum = if @to.isNumber() then Number @toVar else null
+ @stepNum = if step?.isNumber() then Number @stepVar else null
+
+
+
+
+
+
+
+
+ ¶
+
+ 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}"
+ stepPart = if @stepVar
+ "#{idx} += #{@stepVar}"
else if known
if namedIndex
if from <= to then "++#{idx}" else "--#{idx}"
@@ -1844,145 +1966,18 @@ needed to iterate over the values in the range. Used by comprehensions.
-
-
-
-
- ¶
-
- 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', single: true
- 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 isLiteralArguments
- 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,
-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 '' })"]
-
-
-
-
+ [@makeCode "#{varPart}; #{condPart}; #{stepPart}"]
+
@@ -1992,34 +1987,162 @@ is the index of the beginning.
+ When used as a value, expand the range into the equivalent array.
+
+
+
+ compileArray: (o) ->
+ known = @fromNum? and @toNum?
+ if known 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', single: true
+ result = o.scope.freeVariable 'results'
+ pre = "\n#{idt}#{result} = [];"
+ if known
+ 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 isLiteralArguments
+ 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,
+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 to.isNumber()
+ "#{+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 []
+ exports.Obj = class Obj extends Base
+ constructor: (props, @generated = false) ->
+ @objects = @properties = props or []
- children: ['properties']
+ children: ['properties']
- compileNode: (o) ->
- props = @properties
- if @generated
+ compileNode: (o) ->
+ props = @properties
+ if @generated
for node in props when node instanceof Value
node.error 'cannot have an implicit value in an implicit object'
break for prop, dynamicIndex in props when (prop.variable or prop).base instanceof Parens
hasDynamic = dynamicIndex < props.length
idt = o.indent += TAB
- lastNoncom = @lastNonComment @properties
+ lastNoncom = @lastNonComment @properties
answer = []
if hasDynamic
oref = o.scope.freeVariable 'obj'
- answer.push @makeCode "(\n#{idt}#{oref} = "
- answer.push @makeCode "{#{if props.length is 0 or dynamicIndex is 0 then '}' else '\n'}"
+ answer.push @makeCode "(\n#{idt}#{oref} = "
+ answer.push @makeCode "{#{if props.length is 0 or dynamicIndex is 0 then '}' else '\n'}"
for prop, i in props
if i is dynamicIndex
- answer.push @makeCode "\n#{idt}}" unless i is 0
- answer.push @makeCode ',\n'
+ answer.push @makeCode "\n#{idt}}" unless i is 0
+ answer.push @makeCode ',\n'
join = if i is props.length - 1 or i is dynamicIndex - 1
''
else if prop is lastNoncom or prop instanceof Comment
@@ -2046,177 +2169,33 @@ is the index of the beginning.
value = prop.value
else
[key, value] = prop.base.cache o
- prop = new Assign (new Value (new Literal oref), [new Access key]), value
- if indent then answer.push @makeCode indent
+ prop = new Assign (new Value (new IdentifierLiteral oref), [new Access key]), value
+ if indent then answer.push @makeCode indent
answer.push prop.compileToFragments(o, LEVEL_TOP)...
- if join then answer.push @makeCode join
+ if join then answer.push @makeCode join
if hasDynamic
- answer.push @makeCode ",\n#{idt}#{oref}\n#{@tab})"
+ answer.push @makeCode ",\n#{idt}#{oref}\n#{@tab})"
else
- answer.push @makeCode "\n#{@tab}}" unless props.length is 0
- if @front and not hasDynamic then @wrapInBraces answer else answer
+ answer.push @makeCode "\n#{@tab}}" unless props.length is 0
+ if @front and not hasDynamic then @wrapInBraces answer else answer
- assigns: (name) ->
- for prop in @properties when prop.assigns name then return yes
+ 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
- [..., tail] = @variable.properties
- decl = if tail
- 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.context = name if node.bound
-
-
-
-
- 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', o}(#{lhs}, this)"
- return
-
@@ -2226,39 +2205,39 @@ constructor.
- Merge the properties from a top-level object as prototypal properties
-on the class.
+ An array literal.
- 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.classScope.freeVariable 'class'
- assign = new Assign new Literal(@externalCtor), func
- else
- if assign.variable.this
- func.static = yes
- else
- acc = if base.isComplex() then new Index base else new Access base
- assign.variable = new Value(new Literal(name), [(new Access new Literal 'prototype'), acc])
- if func instanceof Code and func.bound
- @boundFuncs.push base
- func.bound = no
- assign
- compact exprs
+ 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
@@ -2269,25 +2248,10 @@ on the class.
- Walk the body of the class, looking for prototype properties to be converted
-and tagging static assignments.
+ Class
- 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 Assign and node.variable.looksStatic name
- node.value.static = yes
- else 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
-
@@ -2297,18 +2261,20 @@ and tagging static assignments.
- 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
.
+ The CoffeeScript class definition.
+Initialize a Class with its name, an optional superclass, and a
+list of prototype property assignments.
- 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
+ exports.Class = class Class extends Base
+ constructor: (@variable, @parent, @body = new Block) ->
+ @boundFuncs = []
+ @body.classBody = yes
+
+ children: ['variable', 'parent', 'body']
+
+ defaultClassVariableName: '_Class'
@@ -2319,23 +2285,24 @@ above the constructor
.
- Make sure that a constructor is defined for the class, and properly
-configured.
+ Figure out the appropriate name for the constructor function of this class.
- ensureConstructor: (name) ->
- if not @ctor
- @ctor = new Code
- if @externalCtor
- @ctor.body.push new Literal "#{@externalCtor}.apply(this, arguments)"
- else if @parent
- @ctor.body.push new Literal "#{name}.__super__.constructor.apply(this, arguments)"
- @ctor.body.makeReturn()
- @body.expressions.unshift @ctor
- @ctor.ctor = @ctor.name = name
- @ctor.klass = null
- @ctor.noReturn = yes
+ determineName: ->
+ return @defaultClassVariableName unless @variable
+ [..., tail] = @variable.properties
+ node = if tail
+ tail instanceof Access and tail.name
+ else
+ @variable.base
+ unless node instanceof IdentifierLiteral or node instanceof PropertyName
+ return @defaultClassVariableName
+ name = node.value
+ unless tail
+ message = isUnassignable name
+ @variable.error message if message
+ if name in JS_FORBIDDEN then "_#{name}" else name
@@ -2346,44 +2313,18 @@ configured.
- 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.
+ For all this
-references and bound functions in the class definition,
+this
is the Class being constructed.
- compileNode: (o) ->
- if jumpNode = @body.jumps()
- jumpNode.error 'Class bodies cannot contain pure statements'
- if argumentsNode = @body.contains isLiteralArguments
- argumentsNode.error "Class bodies shouldn't reference arguments"
-
- name = @determineName() or '_Class'
- name = "_#{name}" if name.reserved
- lname = new Literal name
- func = new Code [], Block.wrap [@body]
- args = []
- o.classScope = func.makeScope o.scope
-
- @hoistDirectivePrologue()
- @setContext name
- @walkBody name, o
- @ensureConstructor name
- @addBoundFunctions o
- @body.spaced = yes
- @body.expressions.push lname
-
- if @parent
- superClass = new Literal o.classScope.freeVariable 'superClass', reserve: no
- @body.expressions.unshift new Extends lname, superClass
- func.params.push new Param superClass
- args.push @parent
-
- @body.expressions.unshift @directives...
-
- klass = new Parens new Call func, args
- klass = new Assign @variable, klass if @variable
- klass.compileToFragments o
+ setContext: (name) ->
+ @body.traverseChildren false, (node) ->
+ return false if node.classBody
+ if node instanceof ThisLiteral
+ node.value = name
+ else if node instanceof Code
+ node.context = name if node.bound
@@ -2394,10 +2335,17 @@ constructor, property assignments, and inheritance getting built out below.
- Assign
+ Ensure that all functions bound to the instance are proxied in the
+constructor.
+ addBoundFunctions: (o) ->
+ for bvar in @boundFuncs
+ lhs = (new Value (new ThisLiteral), [new Access bvar]).compile o
+ @ctor.body.unshift new Literal "#{lhs} = #{utility 'bind', o}(#{lhs}, this)"
+ return
+
@@ -2407,28 +2355,39 @@ constructor, property assignments, and inheritance getting built out below.
- The Assign is used to assign a local variable to value, or to set the
-property of an object — including within object literals.
+ Merge the properties from a top-level object as prototypal properties
+on the class.
- exports.Assign = class Assign extends Base
- constructor: (@variable, @value, @context, options = {}) ->
- {@param, @subpattern, @operatorToken} = options
- 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'
+ 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.classScope.freeVariable 'ctor'
+ assign = new Assign new IdentifierLiteral(@externalCtor), func
+ else
+ if assign.variable.this
+ func.static = yes
+ else
+ acc = if base.isComplex() then new Index base else new Access base
+ assign.variable = new Value(new IdentifierLiteral(name), [(new Access new PropertyName 'prototype'), acc])
+ if func instanceof Code and func.bound
+ @boundFuncs.push base
+ func.bound = no
+ assign
+ compact exprs
@@ -2439,45 +2398,24 @@ property of an object — including within object literals.
- 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.
+ Walk the body of the class, looking for prototype properties to be converted
+and tagging static assignments.
- 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 ['||=', '&&=', '?=']
- return @compileSpecialMath o if @context in ['**=', '//=', '%%=']
- if @value instanceof Code
- if @value.static
- @value.klass = @variable.base
- @value.name = @variable.properties[0]
- @value.variable = @variable
- else if @variable.properties?.length >= 2
- [properties..., prototype, name] = @variable.properties
- if prototype.name?.value is 'prototype'
- @value.klass = new Value @variable.base, properties
- @value.name = name
- @value.variable = @variable
- unless @context
- varBase = @variable.unwrapAll()
- unless varBase.isAssignable()
- @variable.error "\"#{@variable.compile o}\" cannot be assigned"
- unless varBase.hasProperties?()
- if @param
- o.scope.add varBase.value, 'var'
- else
- o.scope.find varBase.value
- val = @value.compileToFragments o, LEVEL_LIST
- @variable.front = true if isValue and @variable.base instanceof Obj
- compiledName = @variable.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
+ 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 Assign and node.variable.looksStatic name
+ node.value.static = yes
+ else 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
@@ -2488,23 +2426,18 @@ has not been seen yet within the current scope, declare it.
- Brief implementation of recursive pattern matching, when assigning array or
-object literals to a value. Peeks at their properties to assign inner names.
+ 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
.
- 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
- [obj] = objects
- if olen is 1 and obj instanceof Expansion
- obj.error 'Destructuring assignment has no target'
- isObject = @variable.isObject()
- if top and olen is 1 and obj not instanceof Splat
+ 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
@@ -2515,6 +2448,406 @@ object literals to a value. Peeks at their properties to assign inner names.
+ Make sure that a constructor is defined for the class, and properly
+configured.
+
+
+
+ ensureConstructor: (name) ->
+ if not @ctor
+ @ctor = new Code
+ if @externalCtor
+ @ctor.body.push new Literal "#{@externalCtor}.apply(this, arguments)"
+ else if @parent
+ @ctor.body.push new Literal "#{name}.__super__.constructor.apply(this, arguments)"
+ @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
+equivalent syntax tree and compile that, in pieces. You can see the
+constructor, property assignments, and inheritance getting built out below.
+
+
+
+ compileNode: (o) ->
+ if jumpNode = @body.jumps()
+ jumpNode.error 'Class bodies cannot contain pure statements'
+ if argumentsNode = @body.contains isLiteralArguments
+ argumentsNode.error "Class bodies shouldn't reference arguments"
+
+ name = @determineName()
+ lname = new IdentifierLiteral name
+ func = new Code [], Block.wrap [@body]
+ args = []
+ o.classScope = func.makeScope o.scope
+
+ @hoistDirectivePrologue()
+ @setContext name
+ @walkBody name, o
+ @ensureConstructor name
+ @addBoundFunctions o
+ @body.spaced = yes
+ @body.expressions.push lname
+
+ if @parent
+ superClass = new IdentifierLiteral o.classScope.freeVariable 'superClass', reserve: no
+ @body.expressions.unshift new Extends lname, superClass
+ func.params.push new Param superClass
+ args.push @parent
+
+ @body.expressions.unshift @directives...
+
+ klass = new Parens new Call func, args
+ klass = new Assign @variable, klass, null, { @moduleDeclaration } if @variable
+ klass.compileToFragments o
+
+
+
+
+
+
+
+
+ ¶
+
+ Import and Export
+
+
+
+
+exports.ModuleDeclaration = class ModuleDeclaration extends Base
+ constructor: (@clause, @source) ->
+ @checkSource()
+
+ children: ['clause', 'source']
+
+ isStatement: YES
+ jumps: THIS
+ makeReturn: THIS
+
+ checkSource: ->
+ if @source? and @source instanceof StringWithInterpolations
+ @source.error 'the name of the module to be imported from must be an uninterpolated string'
+
+ checkScope: (o, moduleDeclarationType) ->
+ if o.indent.length isnt 0
+ @error "#{moduleDeclarationType} statements must be at top-level scope"
+
+exports.ImportDeclaration = class ImportDeclaration extends ModuleDeclaration
+ compileNode: (o) ->
+ @checkScope o, 'import'
+ o.importedSymbols = []
+
+ code = []
+ code.push @makeCode "#{@tab}import "
+ code.push @clause.compileNode(o)... if @clause?
+
+ if @source?.value?
+ code.push @makeCode ' from ' unless @clause is null
+ code.push @makeCode @source.value
+
+ code.push @makeCode ';'
+ code
+
+exports.ImportClause = class ImportClause extends Base
+ constructor: (@defaultBinding, @namedImports) ->
+
+ children: ['defaultBinding', 'namedImports']
+
+ compileNode: (o) ->
+ code = []
+
+ if @defaultBinding?
+ code.push @defaultBinding.compileNode(o)...
+ code.push @makeCode ', ' if @namedImports?
+
+ if @namedImports?
+ code.push @namedImports.compileNode(o)...
+
+ code
+
+exports.ExportDeclaration = class ExportDeclaration extends ModuleDeclaration
+ compileNode: (o) ->
+ @checkScope o, 'export'
+
+ code = []
+ code.push @makeCode "#{@tab}export "
+ code.push @makeCode 'default ' if @ instanceof ExportDefaultDeclaration
+
+ if @ not instanceof ExportDefaultDeclaration and
+ (@clause instanceof Assign or @clause instanceof Class)
+
+
+
+
+
+
+
+
+ ¶
+
+ When the ES2015 class
keyword is supported, don’t add a var
here
+
+
+
+ code.push @makeCode 'var '
+ @clause.moduleDeclaration = 'export'
+
+ if @clause.body? and @clause.body instanceof Block
+ code = code.concat @clause.compileToFragments o, LEVEL_TOP
+ else
+ code = code.concat @clause.compileNode o
+
+ code.push @makeCode " from #{@source.value}" if @source?.value?
+ code.push @makeCode ';'
+ code
+
+exports.ExportNamedDeclaration = class ExportNamedDeclaration extends ExportDeclaration
+
+exports.ExportDefaultDeclaration = class ExportDefaultDeclaration extends ExportDeclaration
+
+exports.ExportAllDeclaration = class ExportAllDeclaration extends ExportDeclaration
+
+exports.ModuleSpecifierList = class ModuleSpecifierList extends Base
+ constructor: (@specifiers) ->
+
+ children: ['specifiers']
+
+ compileNode: (o) ->
+ code = []
+ o.indent += TAB
+ compiledList = (specifier.compileToFragments o, LEVEL_LIST for specifier in @specifiers)
+
+ if @specifiers.length isnt 0
+ code.push @makeCode "{\n#{o.indent}"
+ for fragments, index in compiledList
+ code.push @makeCode(",\n#{o.indent}") if index
+ code.push fragments...
+ code.push @makeCode "\n}"
+ else
+ code.push @makeCode '{}'
+ code
+
+exports.ImportSpecifierList = class ImportSpecifierList extends ModuleSpecifierList
+
+exports.ExportSpecifierList = class ExportSpecifierList extends ModuleSpecifierList
+
+exports.ModuleSpecifier = class ModuleSpecifier extends Base
+ constructor: (@original, @alias, @moduleDeclarationType) ->
+
+
+
+
+
+
+
+
+ ¶
+
+ The name of the variable entering the local scope
+
+
+
+ @identifier = if @alias? then @alias.value else @original.value
+
+ children: ['original', 'alias']
+
+ compileNode: (o) ->
+ o.scope.add @identifier, @moduleDeclarationType
+ code = []
+ code.push @makeCode @original.value
+ code.push @makeCode " as #{@alias.value}" if @alias?
+ code
+
+exports.ImportSpecifier = class ImportSpecifier extends ModuleSpecifier
+ constructor: (imported, local) ->
+ super imported, local, 'import'
+
+ compileNode: (o) ->
+
+
+
+
+
+
+
+
+ ¶
+
+ Per the spec, symbols can’t be imported multiple times
+(e.g. import { foo, foo } from 'lib'
is invalid)
+
+
+
+ if @identifier in o.importedSymbols or o.scope.check(@identifier)
+ @error "'#{@identifier}' has already been declared"
+ else
+ o.importedSymbols.push @identifier
+ super o
+
+exports.ImportDefaultSpecifier = class ImportDefaultSpecifier extends ImportSpecifier
+
+exports.ImportNamespaceSpecifier = class ImportNamespaceSpecifier extends ImportSpecifier
+
+exports.ExportSpecifier = class ExportSpecifier extends ModuleSpecifier
+ constructor: (local, exported) ->
+ super local, exported, 'export'
+
+
+
+
+
+
+
+
+ ¶
+
+ 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, @subpattern, @operatorToken, @moduleDeclaration} = options
+
+ children: ['variable', 'value']
+
+ isStatement: (o) ->
+ o?.level is LEVEL_TOP and @context? and (@moduleDeclaration or "?" in @context)
+
+ checkAssignability: (o, varBase) ->
+ if Object::hasOwnProperty.call(o.scope.positions, varBase.value) and
+ o.scope.variables[o.scope.positions[varBase.value]].type is 'import'
+ varBase.error "'#{varBase.value}' is read-only"
+
+ 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 ['||=', '&&=', '?=']
+ return @compileSpecialMath o if @context in ['**=', '//=', '%%=']
+ if @value instanceof Code
+ if @value.static
+ @value.klass = @variable.base
+ @value.name = @variable.properties[0]
+ @value.variable = @variable
+ else if @variable.properties?.length >= 2
+ [properties..., prototype, name] = @variable.properties
+ if prototype.name?.value is 'prototype'
+ @value.klass = new Value @variable.base, properties
+ @value.name = name
+ @value.variable = @variable
+ unless @context
+ varBase = @variable.unwrapAll()
+ unless varBase.isAssignable()
+ @variable.error "'#{@variable.compile o}' can't be assigned"
+ unless varBase.hasProperties?()
+ if @moduleDeclaration # `moduleDeclaration` can be `'import'` or `'export'`
+ @checkAssignability o, varBase
+ o.scope.add varBase.value, @moduleDeclaration
+ else if @param
+ o.scope.add varBase.value, 'var'
+ else
+ @checkAssignability o, varBase
+ o.scope.find varBase.value
+
+ val = @value.compileToFragments o, LEVEL_LIST
+ @variable.front = true if isValue and @variable.base instanceof Obj
+ compiledName = @variable.compileToFragments o, LEVEL_LIST
+
+ if @context is 'object'
+ if fragmentsToText(compiledName) in JS_FORBIDDEN
+ compiledName.unshift @makeCode '"'
+ compiledName.push @makeCode '"'
+ return compiledName.concat @makeCode(": "), val
+
+ 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.
+
+
+
+ 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
+ [obj] = objects
+ if olen is 1 and obj instanceof Expansion
+ obj.error 'Destructuring assignment has no target'
+ isObject = @variable.isObject()
+ if top and olen is 1 and obj not instanceof Splat
+
+
+
+
+
+
+
+
+ ¶
+
Pick the property straight off the value when there’s just one to pick
(no need to cache the value into a variable).
@@ -2526,17 +2859,17 @@ object literals to a value. Peeks at their properties to assign inner names.
-
+
- {variable: {base: idx}, value: obj} = obj
+ {variable: {base: idx}, value: obj} = obj
if obj instanceof Assign
defaultValue = obj.value
obj = obj.variable
@@ -2549,40 +2882,43 @@ object literals to a value. Peeks at their properties to assign inner names.
-
+
- if obj.this then obj.properties[0].name else obj
+ if obj.this
+ obj.properties[0].name
+ else
+ new PropertyName obj.unwrap().value
else
-
+
- new Literal 0
- acc = IDENTIFIER.test idx.unwrap().value
+ new NumberLiteral 0
+ acc = idx.unwrap() instanceof PropertyName
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}"
+ message = isUnassignable obj.unwrap().value
+ obj.error message if message
value = new Op '?', value, defaultValue if defaultValue
- return new Assign(obj, value, null, param: @param).compileToFragments o, LEVEL_TOP
+ return new Assign(obj, value, null, param: @param).compileToFragments o, LEVEL_TOP
vvar = value.compileToFragments o, LEVEL_LIST
vvarText = fragmentsToText vvar
assigns = []
@@ -2591,19 +2927,19 @@ object literals to a value. Peeks at their properties to assign inner names.
-
+
- if not IDENTIFIER.test(vvarText) or @variable.assigns(vvarText)
- assigns.push [@makeCode("#{ ref = o.scope.freeVariable 'ref' } = "), vvar...]
- vvar = [@makeCode ref]
+ if value.unwrap() not instanceof IdentifierLiteral or @variable.assigns(vvarText)
+ assigns.push [@makeCode("#{ ref = o.scope.freeVariable 'ref' } = "), vvar...]
+ vvar = [@makeCode ref]
vvarText = ref
for obj, i in objects
idx = i
@@ -2612,7 +2948,7 @@ object literals to a value. Peeks at their properties to assign inner names.
obj = obj.unwrap()
val = "#{olen} <= #{vvarText}.length ? #{ utility 'slice', o }.call(#{vvarText}, #{i}"
if rest = olen - i - 1
- ivar = o.scope.freeVariable 'i', single: true
+ ivar = o.scope.freeVariable 'i', single: true
val += ", #{ivar} = #{vvarText}.length - #{rest}) : (#{ivar} = #{i}, [])"
else
val += ") : []"
@@ -2623,7 +2959,7 @@ object literals to a value. Peeks at their properties to assign inner names.
if rest is 1
expandedIdx = "#{vvarText}.length - 1"
else
- ivar = o.scope.freeVariable 'i', single: true
+ ivar = o.scope.freeVariable 'i', single: true
val = new Literal "#{ivar} = #{vvarText}.length - #{rest}"
expandedIdx = "#{ivar}++"
assigns.push val.compileToFragments o, LEVEL_LIST
@@ -2637,17 +2973,17 @@ object literals to a value. Peeks at their properties to assign inner names.
-
+
- {variable: {base: idx}, value: obj} = obj
+ {variable: {base: idx}, value: obj} = obj
if obj instanceof Assign
defaultValue = obj.value
obj = obj.variable
@@ -2660,296 +2996,21 @@ object literals to a value. Peeks at their properties to assign inner names.
-
-
-
-
- ¶
-
- A shorthand {a, b, @c} = val
pattern-match.
-
-
-
- if obj.this then obj.properties[0].name else obj
- else
-
-
-
-
-
-
-
-
- ¶
-
- A regular array pattern-match.
-
-
-
- new Literal expandedIdx or idx
- name = obj.unwrap().value
- acc = IDENTIFIER.test idx.unwrap().value
- val = new Value new Literal(vvarText), [new (if acc then Access else Index) idx]
- val = new Op '?', val, defaultValue if defaultValue
- 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
- @variable.error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been declared before"
- if "?" in @context
- o.isExistentialEquals = true
- new If(new Existence(left), right, type: 'if').addElse(new Assign(right, @value, '=')).compileToFragments o
- else
- fragments = new Op(@context[...-1], left, new Assign(right, @value, '=')).compileToFragments o
- if o.level <= LEVEL_LIST then fragments else @wrapInBraces fragments
-
-
-
-
-
-
-
-
- ¶
-
- Convert special math assignment operators like a **= b
to the equivalent
-extended form a = a ** b
and then compiles that.
-
-
-
- compileSpecialMath: (o) ->
- [left, right] = @variable.cacheReference o
- new Assign(left, new Op(@context[...-1], 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 instanceof Value and from.isSimpleNumber() and
- to instanceof Value 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'
- @isGenerator = !!@body.contains (node) ->
- node instanceof Op and node.operator in ['yield', 'yield*']
-
- children: ['params', 'body']
-
- isStatement: -> !!@ctor
-
- jumps: NO
-
- makeScope: (parentScope) -> new Scope parentScope, @body, this
-
-
-
-
-
-
-
-
- ¶
-
- 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) ->
-
- if @bound and o.scope.method?.bound
- @context = o.scope.method.context
-
-
-
-
-
-
-
-
- ¶
-
- Handle bound functions early.
-
-
-
- if @bound and not @context
- @context = '_this'
- wrapper = new Code [new Param new Literal @context], new Block [this]
- boundfunc = new Call(wrapper, [new Literal 'this'])
- boundfunc.updateLocationDataIfMissing @locationData
- return boundfunc.compileNode(o)
-
- o.scope = del(o, 'classScope') or @makeScope o.scope
- o.scope.shared = del(o, 'sharedScope')
- o.indent += TAB
- delete o.bare
- delete o.isExistentialEquals
- params = []
- exprs = []
- for param in @params when param not instanceof Expansion
- o.scope.parameter param.asReference o
- for param in @params when param.splat or param instanceof Expansion
- for p in @params when p not instanceof Expansion and p.name.value
- o.scope.add p.name.value, 'var', yes
- splats = new Assign new Value(new Arr(p.asReference o for p in @params)),
- new Value new Literal 'arguments'
- break
- 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
- code = 'function'
- code += '*' if @isGenerator
- 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
.
+ A shorthand {a, b, @c} = val
pattern-match.
- traverseChildren: (crossScope, func) ->
- super(crossScope, func) if crossScope
+ if obj.this
+ obj.properties[0].name
+ else
+ new PropertyName obj.unwrap().value
+ else
@@ -2960,10 +3021,23 @@ unless crossScope
is true
.
- Param
+ A regular array pattern-match.
+ new Literal expandedIdx or idx
+ name = obj.unwrap().value
+ acc = idx.unwrap() instanceof PropertyName
+ val = new Value new Literal(vvarText), [new (if acc then Access else Index) idx]
+ val = new Op '?', val, defaultValue if defaultValue
+ if name?
+ message = isUnassignable name
+ obj.error message if message
+ 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
+
@@ -2973,41 +3047,14 @@ unless crossScope
is true
.
- 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.
+ 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.
- 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"
- if @name instanceof Obj and @name.generated
- token = @name.objects[0].operatorToken
- token.error "unexpected #{token.value}"
-
- children: ['name', 'value']
-
- compileToFragments: (o) ->
- @name.compileToFragments o, LEVEL_LIST
-
- asReference: (o) ->
- return @reference if @reference
- node = @name
- if node.this
- name = node.properties[0].name.value
- name = "_#{name}" if name.reserved
- node = new Literal o.scope.freeVariable name
- else if node.isComplex()
- node = new Literal o.scope.freeVariable 'arg'
- node = new Value node
- node = new Splat node if @splat
- node.updateLocationDataIfMissing @locationData
- @reference = node
-
- isComplex: ->
- @name.isComplex()
+ compileConditional: (o) ->
+ [left, right] = @variable.cacheReference o
@@ -3018,17 +3065,19 @@ as well as be a splat, gathering up a group of parameters into an array.
- 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.
+ Disallow conditional assignment of undefined variables.
- eachName: (iterator, name = @name)->
- atParam = (obj) -> iterator "@#{obj.properties[0].name.value}", obj
+ if not left.properties.length and left.base instanceof Literal and
+ left.base not instanceof ThisLiteral 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
+ o.isExistentialEquals = true
+ new If(new Existence(left), right, type: 'if').addElse(new Assign(right, @value, '=')).compileToFragments o
+ else
+ fragments = new Op(@context[...-1], left, new Assign(right, @value, '=')).compileToFragments o
+ if o.level <= LEVEL_LIST then fragments else @wrapInBraces fragments
@@ -3039,6 +3088,296 @@ to that name.
+ Convert special math assignment operators like a **= b
to the equivalent
+extended form a = a ** b
and then compiles that.
+
+
+
+ compileSpecialMath: (o) ->
+ [left, right] = @variable.cacheReference o
+ new Assign(left, new Op(@context[...-1], 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?.isNumber() and to.isNumber()
+ 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'
+ @isGenerator = !!@body.contains (node) ->
+ (node instanceof Op and node.isYield()) or node instanceof YieldReturn
+
+ children: ['params', 'body']
+
+ isStatement: -> !!@ctor
+
+ jumps: NO
+
+ makeScope: (parentScope) -> new Scope parentScope, @body, this
+
+
+
+
+
+
+
+
+ ¶
+
+ 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) ->
+
+ if @bound and o.scope.method?.bound
+ @context = o.scope.method.context
+
+
+
+
+
+
+
+
+ ¶
+
+ Handle bound functions early.
+
+
+
+ if @bound and not @context
+ @context = '_this'
+ wrapper = new Code [new Param new IdentifierLiteral @context], new Block [this]
+ boundfunc = new Call(wrapper, [new ThisLiteral])
+ boundfunc.updateLocationDataIfMissing @locationData
+ return boundfunc.compileNode(o)
+
+ o.scope = del(o, 'classScope') or @makeScope o.scope
+ o.scope.shared = del(o, 'sharedScope')
+ o.indent += TAB
+ delete o.bare
+ delete o.isExistentialEquals
+ params = []
+ exprs = []
+ for param in @params when param not instanceof Expansion
+ o.scope.parameter param.asReference o
+ for param in @params when param.splat or param instanceof Expansion
+ for p in @params when p not instanceof Expansion and p.name.value
+ o.scope.add p.name.value, 'var', yes
+ splats = new Assign new Value(new Arr(p.asReference o for p in @params)),
+ new Value new IdentifierLiteral '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
+ code = 'function'
+ code += '*' if @isGenerator
+ 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) ->
+ message = isUnassignable @name.unwrapAll().value
+ @name.error message if message
+ if @name instanceof Obj and @name.generated
+ token = @name.objects[0].operatorToken
+ token.error "unexpected #{token.value}"
+
+ children: ['name', 'value']
+
+ compileToFragments: (o) ->
+ @name.compileToFragments o, LEVEL_LIST
+
+ asReference: (o) ->
+ return @reference if @reference
+ node = @name
+ if node.this
+ name = node.properties[0].name.value
+ name = "_#{name}" if name in JS_FORBIDDEN
+ node = new IdentifierLiteral o.scope.freeVariable name
+ else if node.isComplex()
+ node = new IdentifierLiteral o.scope.freeVariable 'arg'
+ node = new Value node
+ node = new Splat node if @splat
+ node.updateLocationDataIfMissing @locationData
+ @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) -> iterator "@#{obj.properties[0].name.value}", obj
+
+
+
+
+
+
-
+
- destructured parameter with default value
@@ -3086,11 +3425,11 @@ to that name.
- -
+
-
-
if obj instanceof Assign
- @eachName iterator, obj.value.unwrap()
+ if obj instanceof Assign
- -
+
-
+
+
if obj.value instanceof Assign
+ obj = obj.value
+ @eachName iterator, obj.value.unwrap()
+
+
+
+
+ -
+
-
+
- at-params within destructured parameters
{@foo}
@@ -3160,11 +3515,11 @@ to that name.
- -
+
-
- simple destructured parameters {foo}
@@ -3180,11 +3535,11 @@ to that name.
- -
+
-
Splat
@@ -3193,50 +3548,50 @@ to that name.
- -
+
-
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
+ exports.Splat = class Splat extends Base
- children: ['name']
+ children: ['name']
- isAssignable: YES
+ isAssignable: YES
- constructor: (name) ->
- @name = if name.compile then name else new Literal name
+ constructor: (name) ->
+ @name = if name.compile then name else new Literal name
- assigns: (name) ->
- @name.assigns name
+ assigns: (name) ->
+ @name.assigns name
- compileToFragments: (o) ->
- @name.compileToFragments o
+ compileToFragments: (o) ->
+ @name.compileToFragments o
- unwrap: -> @name
+ unwrap: -> @name
- -
+
-
Utility function that converts an arbitrary number of elements, mixed with
splats, to a proper array.
- @compileSplattedArray: (o, list, apply) ->
- index = -1
+ @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
@@ -3263,11 +3618,11 @@ splats, to a proper array.
-
-
+
-
Expansion
@@ -3276,37 +3631,37 @@ splats, to a proper array.
- -
+
-
-
exports.Expansion = class Expansion extends Base
+ exports.Expansion = class Expansion extends Base
- isComplex: NO
+ isComplex: NO
- compileNode: (o) ->
- @error 'Expansion must be used inside a destructuring assignment or parameter list'
+ compileNode: (o) ->
+ @error 'Expansion must be used inside a destructuring assignment or parameter list'
- asReference: (o) ->
+ asReference: (o) ->
this
- eachName: (iterator) ->
+ eachName: (iterator) ->
- -
+
-
While
@@ -3315,11 +3670,11 @@ parameter list.
- -
+
-
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
@@ -3327,77 +3682,77 @@ 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
+ 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']
+ children: ['condition', 'guard', 'body']
- isStatement: YES
+ isStatement: YES
- makeReturn: (res) ->
+ makeReturn: (res) ->
if res
super
else
- @returns = not @jumps loop: yes
+ @returns = not @jumps loop: yes
this
- addBody: (@body) ->
+ addBody: (@body) ->
this
- jumps: ->
- {expressions} = @body
+ jumps: ->
+ {expressions} = @body
return no unless expressions.length
for node in expressions
- return jumpNode if jumpNode = node.jumps loop: yes
+ return jumpNode if jumpNode = 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
+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) ->
+ compileNode: (o) ->
o.indent += TAB
set = ''
{body} = this
if body.isEmpty()
- body = @makeCode ''
+ body = @makeCode ''
else
- if @returns
+ if @returns
body.makeReturn rvar = o.scope.freeVariable 'results'
- set = "#{@tab}#{rvar} = [];\n"
- if @guard
+ set = "#{@tab}#{rvar} = [];\n"
+ if @guard
if body.expressions.length > 1
- body.expressions.unshift new If (new Parens @guard).invert(), new Literal "continue"
+ body.expressions.unshift new If (new Parens @guard).invert(), new StatementLiteral "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};"
+ 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
@@ -3406,39 +3761,39 @@ return an array containing the computed result of each iteration.
- -
+
-
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 ) ->
+ 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
+ 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
+ @operator = CONVERSIONS[op] or op
+ @first = first
+ @second = second
+ @flip = !!flip
return this
-
-
+
-
The map of conversions from CoffeeScript to JavaScript symbols.
@@ -3453,11 +3808,11 @@ CoffeeScript operations into their JavaScript equivalents.
- -
+
-
The map of invertible operators.
@@ -3467,42 +3822,40 @@ CoffeeScript operations into their JavaScript equivalents.
'!==': '==='
'===': '!=='
- children: ['first', 'second']
+ children: ['first', 'second']
- isSimpleNumber: NO
+ isNumber: ->
+ @isUnary() and @operator in ['+', '-'] and
+ @first instanceof Value and @first.isNumber()
- isYield: ->
- @operator in ['yield', 'yield*']
+ isYield: ->
+ @operator in ['yield', 'yield*']
- isYieldReturn: ->
- @isYield() and @first instanceof Return
+ isUnary: ->
+ not @second
- isUnary: ->
- not @second
-
- isComplex: ->
- not (@isUnary() and @operator in ['+', '-'] and
- @first instanceof Value and @first.isSimpleNumber())
+ isComplex: ->
+ not @isNumber()
- -
+
-
Am I capable of
Python-style comparison chaining?
- isChainable: ->
- @operator in ['<', '>', '>=', '<=', '===', '!==']
+ isChainable: ->
+ @operator in ['<', '>', '>=', '<=', '===', '!==']
- invert: ->
- if @isChainable() and @first.isChainable()
+ invert: ->
+ if @isChainable() and @first.isChainable()
allInvertable = yes
curr = this
while curr and curr.operator
@@ -3515,23 +3868,23 @@ CoffeeScript operations into their JavaScript equivalents.
curr.operator = INVERSIONS[curr.operator]
curr = curr.first
this
- else if op = INVERSIONS[@operator]
- @operator = op
- if @first.unwrap() instanceof Op
- @first.invert()
+ else if op = INVERSIONS[@operator]
+ @operator = op
+ if @first.unwrap() instanceof Op
+ @first.invert()
this
- else if @second
+ else if @second
new Parens(this).invert()
- else if @operator is '!' and (fst = @first.unwrap()) instanceof Op and
+ 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'
+ unfoldSoak: (o) ->
+ @operator in ['++', '--', 'delete'] and unfoldSoak o, this, 'first'
- generateDo: (exp) ->
+ generateDo: (exp) ->
passedParams = []
func = if exp instanceof Assign and (ref = exp.value.unwrap()) instanceof Code
ref
@@ -3547,314 +3900,8 @@ CoffeeScript operations into their JavaScript equivalents.
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 @compileYield o if @isYield()
- return @compileUnary o if @isUnary()
- return @compileChain o if isChain
- switch @operator
- when '?' then @compileExistence o
- when '**' then @compilePower o
- when '//' then @compileFloorDivision o
- when '%%' then @compileModulo o
- else
- lhs = @first.compileToFragments o, LEVEL_OP
- rhs = @second.compileToFragments o, LEVEL_OP
- answer = [].concat lhs, @makeCode(" #{@operator} "), rhs
- 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 @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, ''
-
- compileYield: (o) ->
- parts = []
- op = @operator
- if not o.scope.parent?
- @error 'yield statements must occur within a function generator.'
- if 'expression' in Object.keys(@first) and not (@first instanceof Throw)
- if @isYieldReturn()
- parts.push @first.compileToFragments o, LEVEL_TOP
- else if @first.expression?
- parts.push @first.expression.compileToFragments o, LEVEL_OP
- else
- parts.push [@makeCode "(#{op} "]
- parts.push @first.compileToFragments o, LEVEL_OP
- parts.push [@makeCode ")"]
- @joinFragmentArrays parts, ''
-
- compilePower: (o) ->
-
-
-
-
- -
-
-
-
- ¶
-
-
Make a Math.pow call
-
-
-
- pow = new Value new Literal('Math'), [new Access new Literal 'pow']
- new Call(pow, [@first, @second]).compileToFragments o
-
- compileFloorDivision: (o) ->
- floor = new Value new Literal('Math'), [new Access new Literal 'floor']
- div = new Op '/', @first, @second
- new Call(floor, [div]).compileToFragments o
-
- compileModulo: (o) ->
- mod = new Value new Literal utility 'modulo', o
- new Call(mod, [@first, @second]).compileToFragments o
-
- 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() and @array.base.objects.length
- 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) ->
- [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', o) + ".call("), @array.compileToFragments(o, LEVEL_LIST),
- @makeCode(", "), ref, @makeCode(") " + if @negated then '< 0' else '>= 0')
- return fragments if fragmentsToText(sub) is fragmentsToText(ref)
- fragments = sub.concat @makeCode(', '), fragments
- 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
- generatedErrorVariableName = o.scope.freeVariable 'error'
- placeholder = new Literal generatedErrorVariableName
- @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 (#{generatedErrorVariableName}) {}")]
- 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
-
-
+ compileNode: (o) ->
+ isChain = @isChainable() and @first.isChainable()
@@ -3865,17 +3912,30 @@ is optional, the catch is not.
- Simple node to throw an exception.
+ In chains, there’s no need to wrap bare obj literals in parens,
+as the chained expression is wrapped.
- exports.Throw = class Throw extends Base
- constructor: (@expression) ->
-
- children: ['expression']
-
- isStatement: YES
- jumps: NO
+ @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 ['--', '++']
+ message = isUnassignable @first.unwrapAll().value
+ @first.error message if message
+ return @compileYield o if @isYield()
+ return @compileUnary o if @isUnary()
+ return @compileChain o if isChain
+ switch @operator
+ when '?' then @compileExistence o
+ when '**' then @compilePower o
+ when '//' then @compileFloorDivision o
+ when '%%' then @compileModulo o
+ else
+ lhs = @first.compileToFragments o, LEVEL_OP
+ rhs = @second.compileToFragments o, LEVEL_OP
+ answer = [].concat lhs, @makeCode(" #{@operator} "), rhs
+ if o.level <= LEVEL_OP then answer else @wrapInBraces answer
@@ -3886,14 +3946,19 @@ is optional, the catch is not.
- A Throw is already a return, of sorts…
-
+ Mimic Python’s chained comparisons when multiple comparison operators are
+used sequentially. For example:
+bin/coffee -e 'console.log 50 < 65 > 10'
+true
+
- makeReturn: THIS
-
- compileNode: (o) ->
- [].concat @makeCode(@tab + "throw "), @expression.compileToFragments(o), @makeCode(";")
+ 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
@@ -3904,10 +3969,19 @@ is optional, the catch is not.
- Existence
+ Keep reference to the left expression, unless this an existential assignment
+ compileExistence: (o) ->
+ if @first.isComplex()
+ ref = new IdentifierLiteral 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
+
@@ -3917,26 +3991,44 @@ is optional, the catch is not.
- 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.
+ Compile a unary Op.
- exports.Existence = class Existence extends Base
- constructor: (@expression) ->
+ 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, ''
- children: ['expression']
+ compileYield: (o) ->
+ parts = []
+ op = @operator
+ unless o.scope.parent?
+ @error 'yield can only occur inside functions'
+ if 'expression' in Object.keys(@first) and not (@first instanceof Throw)
+ parts.push @first.expression.compileToFragments o, LEVEL_OP if @first.expression?
+ else
+ parts.push [@makeCode "("] if o.level >= LEVEL_PAREN
+ parts.push [@makeCode op]
+ parts.push [@makeCode " "] if @first.base?.value isnt ''
+ parts.push @first.compileToFragments o, LEVEL_OP
+ parts.push [@makeCode ")"] if o.level >= LEVEL_PAREN
+ @joinFragmentArrays parts, ''
- 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
+ compilePower: (o) ->
@@ -3947,12 +4039,24 @@ table.
- do not use strict equality here; it will break existing code
+ Make a Math.pow call
- code = "#{code} #{if @negated then '==' else '!='} null"
- [@makeCode(if o.level <= LEVEL_COND then code else "(#{code})")]
+ pow = new Value new IdentifierLiteral('Math'), [new Access new PropertyName 'pow']
+ new Call(pow, [@first, @second]).compileToFragments o
+
+ compileFloorDivision: (o) ->
+ floor = new Value new IdentifierLiteral('Math'), [new Access new PropertyName 'floor']
+ div = new Op '/', @first, @second
+ new Call(floor, [div]).compileToFragments o
+
+ compileModulo: (o) ->
+ mod = new Value new Literal utility 'modulo', o
+ new Call(mod, [@first, @second]).compileToFragments o
+
+ toString: (idt) ->
+ super idt, @constructor.name + ' ' + @operator
@@ -3963,10 +4067,23 @@ table.
- Parens
+ In
+ exports.In = class In extends Base
+ constructor: (@object, @array) ->
+
+ children: ['object', 'array']
+
+ invert: NEGATE
+
+ compileNode: (o) ->
+ if @array instanceof Value and @array.isArray() and @array.base.objects.length
+ for obj in @array.base.objects when obj instanceof Splat
+ hasSplat = yes
+ break
+
@@ -3976,30 +4093,32 @@ table.
- 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.
+ compileOrTest
only if we have an array literal with no splats
- exports.Parens = class Parens extends Base
- constructor: (@body) ->
+ return @compileOrTest o unless hasSplat
+ @compileLoopTest o
- children: ['body']
+ compileOrTest: (o) ->
+ [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
- unwrap : -> @body
- isComplex : -> @body.isComplex()
+ compileLoopTest: (o) ->
+ [sub, ref] = @object.cache o, LEVEL_LIST
+ fragments = [].concat @makeCode(utility('indexOf', o) + ".call("), @array.compileToFragments(o, LEVEL_LIST),
+ @makeCode(", "), ref, @makeCode(") " + if @negated then '< 0' else '>= 0')
+ return fragments if fragmentsToText(sub) is fragmentsToText(ref)
+ fragments = sub.concat @makeCode(', '), fragments
+ if o.level < LEVEL_LIST then fragments else @wrapInBraces fragments
- 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
+ toString: (idt) ->
+ super idt, @constructor.name + if @negated then '!' else ''
@@ -4010,7 +4129,7 @@ parentheses, but no longer — you can put in as many as you please.
- For
+ Try
@@ -4023,31 +4142,23 @@ parentheses, but no longer — you can put in as many as you please.
- 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.
-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.
+ A classic try/catch/finally block.
- 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
- @name.error 'cannot use own with for-in' if @own and not @object
- @returns = false
+ exports.Try = class Try extends Base
+ constructor: (@attempt, @errorVariable, @recovery, @ensure) ->
- children: ['body', 'source', 'guard', 'step']
+ 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
@@ -4058,106 +4169,36 @@ you can map and filter in a single pass.
- 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.
+ Compilation is more or less as you would expect – the finally clause
+is optional, the catch is not.
- compileNode: (o) ->
- body = Block.wrap [@body]
- [..., last] = body.expressions
- @returns = no if last?.jumps() instanceof Return
- source = if @range then @source.base else @source
- scope = o.scope
- name = @name and (@name.compile o, LEVEL_LIST) if not @pattern
- 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', single: true
- 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, isComplexOrAssignable
- stepNum = stepVar.match NUMBER
- name = ivar if @pattern
- varPart = ''
- guardPart = ''
- defPart = ''
- idt1 = @tab + TAB
- if @range
- forPartFragments = source.compileToFragments merge o,
- {index: ivar, name, @step, isComplex: isComplexOrAssignable}
- 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 = (parseNum(stepNum[0]) < 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', o}.call(#{svar}, #{kvar})) continue;" if @own
- bodyFragments = body.compileToFragments merge(o, indent: idt1), LEVEL_TOP
- if bodyFragments and (bodyFragments.length > 0)
- bodyFragments = [].concat @makeCode("\n"), bodyFragments, @makeCode("\n")
- [].concat defPartFragments, @makeCode("#{resultPart or ''}#{@tab}for ("),
- forPartFragments, @makeCode(") {#{guardPart}#{varPart}"), bodyFragments,
- @makeCode("#{@tab}}#{returnResult or ''}")
+ compileNode: (o) ->
+ o.indent += TAB
+ tryPart = @attempt.compileToFragments o, LEVEL_TOP
- 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
+ catchPart = if @recovery
+ generatedErrorVariableName = o.scope.freeVariable 'error', reserve: no
+ placeholder = new IdentifierLiteral generatedErrorVariableName
+ if @errorVariable
+ message = isUnassignable @errorVariable.unwrapAll().value
+ @errorVariable.error message if message
+ @recovery.unshift new Assign @errorVariable, placeholder
+ [].concat @makeCode(" catch ("), placeholder.compileToFragments(o), @makeCode(") {\n"),
+ @recovery.compileToFragments(o, LEVEL_TOP), @makeCode("\n#{@tab}}")
+ else unless @ensure or @recovery
+ generatedErrorVariableName = o.scope.freeVariable 'error', reserve: no
+ [@makeCode(" catch (#{generatedErrorVariableName}) {}")]
+ 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
@@ -4168,7 +4209,7 @@ some cannot.
- Switch
+ Throw
@@ -4181,47 +4222,17 @@ some cannot.
- A JavaScript switch statement. Converts into a returnable expression on-demand.
+ Simple node to throw an exception.
- exports.Switch = class Switch extends Base
- constructor: (@subject, @cases, @otherwise) ->
+ exports.Throw = class Throw extends Base
+ constructor: (@expression) ->
- children: ['subject', 'cases', 'otherwise']
+ children: ['expression']
- isStatement: YES
-
- jumps: (o = {block: yes}) ->
- for [conds, block] in @cases
- return jumpNode if jumpNode = 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
+ isStatement: YES
+ jumps: NO
@@ -4232,10 +4243,15 @@ some cannot.
- If
+ A Throw is already a return, of sorts…
+ makeReturn: THIS
+
+ compileNode: (o) ->
+ [].concat @makeCode(@tab + "throw "), @expression.compileToFragments(o), @makeCode(";")
+
@@ -4245,25 +4261,10 @@ some cannot.
- 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.
+ Existence
- 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()
-
@@ -4273,18 +4274,26 @@ because ternaries are already proper expressions, and don’t need conversion.
- Rewrite a chain of Ifs to add a default case as the final else.
+ 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.
- addElse: (elseBody) ->
- if @isChain
- @elseBodyNode().addElse elseBody
- else
- @isChain = elseBody instanceof If
- @elseBody = @ensureBlock elseBody
- @elseBody.updateLocationDataIfMissing elseBody.locationData
- this
+ exports.Existence = class Existence extends Base
+ constructor: (@expression) ->
+
+ children: ['expression']
+
+ invert: NEGATE
+
+ compileNode: (o) ->
+ @expression.front = @front
+ code = @expression.compile o, LEVEL_OP
+ if @expression.unwrap() instanceof IdentifierLiteral and not o.scope.check code
+ [cmp, cnj] = if @negated then ['===', '||'] else ['!==', '&&']
+ code = "typeof #{code} #{cmp} \"undefined\" #{cnj} #{code} #{cmp} null"
+ else
@@ -4295,28 +4304,12 @@ because ternaries are already proper expressions, and don’t need conversion.
- The If only compiles into a statement if either of its bodies needs
-to be a statement. Otherwise a conditional operator is safe.
+ do not use strict equality here; it will break existing code
- 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]
+ code = "#{code} #{if @negated then '==' else '!='} null"
+ [@makeCode(if o.level <= LEVEL_COND then code else "(#{code})")]
@@ -4327,32 +4320,10 @@ to be a statement. Otherwise a conditional operator is safe.
- Compile the If
as a regular if-else statement. Flattened chains
-force inner else bodies into statement form.
+ Parens
- 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
-
@@ -4362,19 +4333,30 @@ force inner else bodies into statement form.
- Compile the If
as a conditional operator.
+ 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.
- 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
+ exports.Parens = class Parens extends Base
+ constructor: (@body) ->
- unfoldSoak: ->
- @soak and this
+ 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
@@ -4385,7 +4367,7 @@ force inner else bodies into statement form.
- Constants
+ StringWithInterpolations
@@ -4398,11 +4380,13 @@ force inner else bodies into statement form.
-
+ Strings with interpolations are in fact just a variation of Parens
with
+string concatenation inside.
+
-UTILITIES =
+exports.StringWithInterpolations = class StringWithInterpolations extends Parens
@@ -4413,12 +4397,416 @@ UTILITIES =
+ 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.
+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
+ @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
+ @name.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]
+ [..., last] = body.expressions
+ @returns = no if last?.jumps() instanceof Return
+ source = if @range then @source.base else @source
+ scope = o.scope
+ name = @name and (@name.compile o, LEVEL_LIST) if not @pattern
+ 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', single: true
+ 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, isComplexOrAssignable
+ stepNum = Number stepVar if @step.isNumber()
+ name = ivar if @pattern
+ varPart = ''
+ guardPart = ''
+ defPart = ''
+ idt1 = @tab + TAB
+ if @range
+ forPartFragments = source.compileToFragments merge o,
+ {index: ivar, name, @step, isComplex: isComplexOrAssignable}
+ else
+ svar = @source.compile o, LEVEL_LIST
+ if (name or @own) and @source.unwrap() not instanceof IdentifierLiteral
+ 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
+ down = stepNum < 0
+ lvar = scope.freeVariable 'len' unless @step and stepNum? and down
+ 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 StatementLiteral "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', o}.call(#{svar}, #{kvar})) continue;" if @own
+ bodyFragments = body.compileToFragments merge(o, indent: idt1), LEVEL_TOP
+ if bodyFragments and (bodyFragments.length > 0)
+ bodyFragments = [].concat @makeCode("\n"), bodyFragments, @makeCode("\n")
+ [].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 IdentifierLiteral 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 jumpNode if jumpNode = 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
+ @elseBody.updateLocationDataIfMissing elseBody.locationData
+ 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
+
+
+
+
+
+
+
+
+ ¶
+
+ 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.
- extend: (o) -> "
+ extend: (o) -> "
function(child, parent) {
for (var key in parent) {
if (#{utility 'hasProp', o}.call(parent, key)) child[key] = parent[key];
@@ -4436,17 +4824,17 @@ to the superclass for super()
calls, and copies of any static prope
-
+
- bind: -> '
+ bind: -> '
function(fn, me){
return function(){
return fn.apply(me, arguments);
@@ -4457,17 +4845,17 @@ to the superclass for super()
calls, and copies of any static prope
-
+
- indexOf: -> "
+ indexOf: -> "
[].indexOf || function(item) {
for (var i = 0, l = this.length; i < l; i++) {
if (i in this && this[i] === item) return i;
@@ -4476,34 +4864,34 @@ to the superclass for super()
calls, and copies of any static prope
}
"
- modulo: -> """
+ modulo: -> """
function(a, b) { return (+a % (b = +b) + b) % b; }
"""
-
+
- hasProp: -> '{}.hasOwnProperty'
- slice : -> '[].slice'
+ hasProp: -> '{}.hasOwnProperty'
+ slice : -> '[].slice'
-
+
Levels indicate a node’s position in the AST. Useful for knowing if
parens are necessary or superfluous.
@@ -4520,11 +4908,11 @@ LEVEL_ACCESS = 6 #
-
+
Tabs are two spaces for pretty printing.
@@ -4532,38 +4920,16 @@ LEVEL_ACCESS = 6 #
TAB = ' '
-IDENTIFIER = /// ^ (?!\d) [$\w\x7f-\uffff]+ $ ///
-SIMPLENUM = /^[+-]?\d+$/
-HEXNUM = /^[+-]?0x[\da-f]+/i
-NUMBER = ///^[+-]?(?:
- 0x[\da-f]+ | # hex
- \d*\.?\d+ (?:e[+-]?\d+)? # decimal
-)$///i
+SIMPLENUM = /^[+-]?\d+$/
-
+
- ¶
-
- Is a literal value a string/regex?
-
-
-
- IS_STRING = /^['"]/
-IS_REGEX = /^\//
-
-
-
-
-
-
-
+
@@ -4584,11 +4950,11 @@ IS_REGEX = /^\//
-
+
ref = root.freeVariable name
root.assign ref, UTILITIES[name] o
root.utilities[name] = ref
-
-multident = (code, tab) ->
+
+multident = (code, tab) ->
code = code.replace /\n/g, '$&' + tab
- code.replace /\s+$/, ''
-
-
-
-
-
-
-
-
- ¶
-
- Parse a number (+- decimal/hexadecimal)
-Examples: 0, -1, 1, 2e3, 2e-3, -0xfe, 0xfe
-
-
-
- parseNum = (x) ->
- if not x?
- 0
- else if x.match HEXNUM
- parseInt x, 16
- else
- parseFloat x
-
-isLiteralArguments = (node) ->
+ code.replace /\s+$/, ''
+
+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
+
+isLiteralThis = (node) ->
+ (node instanceof ThisLiteral and not node.asKey) or
(node instanceof Code and node.bound) or
- (node instanceof Call and node.isSuper)
-
-isComplexOrAssignable = (node) -> node.isComplex() or node.isAssignable?()
+ node instanceof SuperCall
+
+isComplexOrAssignable = (node) -> node.isComplex() or node.isAssignable?()
-
+
Unfold a node’s child if soak, then tuck the node under created If
diff --git a/documentation/docs/optparse.html b/documentation/docs/optparse.html
index 67f59eb6..a11a70f2 100644
--- a/documentation/docs/optparse.html
+++ b/documentation/docs/optparse.html
@@ -138,7 +138,7 @@ option) list, and all subsequent arguments are left unparsed.
- exports.OptionParser = class OptionParser
+ exports.OptionParser = class OptionParser
@@ -151,12 +151,12 @@ option) list, and all subsequent arguments are left unparsed.
Initialize with a list of valid options, in the form:
[short-flag, long-flag, description]
-
Along with an an optional banner for the usage help.
+Along with an optional banner for the usage help.
- constructor: (rules, @banner) ->
- @rules = buildRules rules
+ constructor: (rules, @banner) ->
+ @rules = buildRules rules
@@ -176,8 +176,8 @@ you’re responsible for interpreting the options object.
- parse: (args) ->
- options = arguments: []
+ parse: (args) ->
+ options = arguments: []
skippingArgument = no
originalArgs = args
args = normalizeArguments args
@@ -208,7 +208,7 @@ non-option argument are treated as non-option arguments themselves
seenNonOptionArg = options.arguments.length > 0
unless seenNonOptionArg
matchedRule = no
- for rule in @rules
+ for rule in @rules
if rule.shortFlag is arg or rule.longFlag is arg
value = true
if rule.hasArgument
@@ -236,10 +236,10 @@ of the valid options, for --help
and such.
- help: ->
+ help: ->
lines = []
- lines.unshift "#{@banner}\n" if @banner
- for rule in @rules
+ 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 ' '
@@ -326,12 +326,12 @@ description of what the option does.
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])
+ name: longFlag.substr 2
+ shortFlag: shortFlag
+ longFlag: longFlag
+ description: description
+ hasArgument: !!(match and match[1])
+ isList: !!(match and match[2])
}
diff --git a/documentation/docs/register.html b/documentation/docs/register.html
index 1fcd9536..0fcbec9d 100644
--- a/documentation/docs/register.html
+++ b/documentation/docs/register.html
@@ -137,7 +137,7 @@ path = require loadFile = (module, filename) ->
- answer = CoffeeScript._compileFile filename, false
+ answer = CoffeeScript._compileFile filename, no, yes
module._compile answer, filename
@@ -173,8 +173,8 @@ This is a horrible thing that should not be required.
Module = require 'module'
-
- findExtension = (filename) ->
+
+ findExtension = (filename) ->
extensions = path.basename(filename).split '.'
@@ -210,12 +210,12 @@ This is a horrible thing that should not be required.
return curExtension if Module._extensions[curExtension]
'.js'
- Module::load = (filename) ->
- @filename = filename
- @paths = Module._nodeModulePaths path.dirname filename
+ Module::load = (filename) ->
+ @filename = filename
+ @paths = Module._nodeModulePaths path.dirname filename
extension = findExtension filename
Module._extensions[extension](this, filename)
- @loaded = true
+ @loaded = true
@@ -234,7 +234,7 @@ to fork both CoffeeScript files, and JavaScript files, directly.
if child_process
{fork} = child_process
binary = require.resolve '../../bin/coffee'
- child_process.fork = (path, args, options) ->
+ child_process.fork = (path, args, options) ->
if helpers.isCoffee path
unless Array.isArray args
options = args or {}
diff --git a/documentation/docs/repl.html b/documentation/docs/repl.html
index 3b7067ef..9e4928cb 100644
--- a/documentation/docs/repl.html
+++ b/documentation/docs/repl.html
@@ -126,10 +126,10 @@ CoffeeScript = require require './helpers'
replDefaults =
- prompt: 'coffee> ',
- historyFile: path.join process.env.HOME, '.coffee_history' if process.env.HOME
- historyMaxInputSize: 10240
- eval: (input, context, filename, cb) ->
+ prompt: 'coffee> ',
+ historyFile: path.join process.env.HOME, '.coffee_history' if process.env.HOME
+ historyMaxInputSize: 10240
+ eval: (input, context, filename, cb) ->
@@ -208,7 +208,7 @@ parens. Unwrap all that.
referencedVars = (
- token[1] for token in tokens when token.variable
+ token[1] for token in tokens when token[0] is 'IDENTIFIER'
)
@@ -242,7 +242,7 @@ parens. Unwrap all that.
ast = new Block [
new Assign (new Value new Literal '_'), ast, '='
]
- js = ast.compile {bare: yes, locals: Object.keys(context), referencedVars}
+ js = ast.compile {bare: yes, locals: Object.keys(context), referencedVars}
cb null, runInContext js, context, filename
catch err
@@ -261,14 +261,14 @@ parens. Unwrap all that.
updateSyntaxError err, input
cb err
-
-runInContext = (js, context, filename) ->
+
+runInContext = (js, context, filename) ->
if context is global
vm.runInThisContext js, filename
else
vm.runInContext js, context, filename
-
-addMultilineHandler = (repl) ->
+
+addMultilineHandler = (repl) ->
{rli, inputStream, outputStream} = repl
@@ -287,10 +287,10 @@ parens. Unwrap all that.
origPrompt = repl._prompt ? repl.prompt
multiline =
- enabled: off
- initialPrompt: origPrompt.replace /^[^> ]*/, (x) -> x.replace /./g, '-'
- prompt: origPrompt.replace /^[^> ]*>?/, (x) -> x.replace /./g, '.'
- buffer: ''
+ enabled: off
+ initialPrompt: origPrompt.replace /^[^> ]*/, (x) -> x.replace /./g, '-'
+ prompt: origPrompt.replace /^[^> ]*>?/, (x) -> x.replace /./g, '.'
+ buffer: ''
@@ -504,13 +504,13 @@ parens. Unwrap all that.
repl.rli.history.shift() if repl.rli.history[0] is ''
- repl.rli.historyIndex = -1
+ 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
+ if code and code.length and code isnt '.history' and code isnt '.exit' and lastLine isnt code
@@ -528,7 +528,7 @@ parens. Unwrap all that.
fs.write fd, "#{code}\n"
lastLine = code
- repl.on 'exit', -> fs.close fd
+ repl.on 'exit', -> fs.close fd
@@ -544,12 +544,12 @@ parens. Unwrap all that.
repl.commands[getCommandId(repl, 'history')] =
- help: 'Show command history'
- action: ->
+ help: 'Show command history'
+ action: ->
repl.outputStream.write "#{repl.rli.history[..].reverse().join '\n'}\n"
repl.displayPrompt()
-
-getCommandId = (repl, commandName) ->
+
+getCommandId = (repl, commandName) ->
@@ -567,9 +567,9 @@ parens. Unwrap all that.
commandsHaveLeadingDot = repl.commands['.help']?
if commandsHaveLeadingDot then ".#{commandName}" else commandName
-module.exports =
- start: (opts = {}) ->
- [major, minor, build] = process.versions.node.split('.').map (n) -> parseInt(n)
+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"
@@ -580,7 +580,7 @@ parens. Unwrap all that.
opts = merge replDefaults, opts
repl = nodeREPL.start opts
runInContext opts.prelude, repl.context, 'prelude' if opts.prelude
- repl.on 'exit', -> repl.outputStream.write '\n' if not repl.rli.closed
+ repl.on 'exit', -> repl.outputStream.write '\n' if not repl.rli.closed
addMultilineHandler repl
addHistory repl, opts.historyFile, opts.historyMaxInputSize if opts.historyFile
diff --git a/documentation/docs/rewriter.html b/documentation/docs/rewriter.html
index 52d7dc61..d2310b02 100644
--- a/documentation/docs/rewriter.html
+++ b/documentation/docs/rewriter.html
@@ -169,7 +169,7 @@ its internal array of tokens.
¶
Helpful snippet for debugging:
-console.log (t[0] + '/' + t[1] for t in @tokens).join ' '
+console.log (t[0] + '/' + t[1] for t in @tokens).join ' '
@@ -185,20 +185,20 @@ its internal array of tokens.
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
-like this. The order of these passes matters — indentation must be
+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()
- @closeOpenCalls()
- @closeOpenIndexes()
- @normalizeLines()
- @tagPostfixConditionals()
- @addImplicitBracesAndParens()
- @addLocationDataToGeneratedTokens()
- @tokens
+ rewrite: (@tokens) ->
+ @removeLeadingNewlines()
+ @closeOpenCalls()
+ @closeOpenIndexes()
+ @normalizeLines()
+ @tagPostfixConditionals()
+ @addImplicitBracesAndParens()
+ @addLocationDataToGeneratedTokens()
+ @tokens
@@ -217,13 +217,13 @@ our feet.
- scanTokens: (block) ->
+ scanTokens: (block) ->
{tokens} = this
i = 0
i += block.call this, token, i, tokens while token = tokens[i]
true
- detectEnd: (i, condition, action) ->
+ detectEnd: (i, condition, action) ->
{tokens} = this
levels = 0
while token = tokens[i]
@@ -250,9 +250,9 @@ dispatch them here.
- removeLeadingNewlines: ->
- break for [tag], i in @tokens when tag isnt 'TERMINATOR'
- @tokens.splice 0, i if i
+ removeLeadingNewlines: ->
+ break for [tag], i in @tokens when tag isnt 'TERMINATOR'
+ @tokens.splice 0, i if i
@@ -269,16 +269,16 @@ calls that close on the same line, just before their outdent.
- closeOpenCalls: ->
- condition = (token, i) ->
+ closeOpenCalls: ->
+ condition = (token, i) ->
token[0] in [')', 'CALL_END'] or
- token[0] is 'OUTDENT' and @tag(i - 1) is ')'
+ 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'
- 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'
+ @scanTokens (token, i) ->
+ @detectEnd i + 1, condition, action if token[0] is 'CALL_START'
1
@@ -295,15 +295,15 @@ Match it with its paired close.
- closeOpenIndexes: ->
- condition = (token, i) ->
+ closeOpenIndexes: ->
+ condition = (token, i) ->
token[0] in [']', 'INDEX_END']
-
- action = (token, i) ->
+
+ action = (token, i) ->
token[0] = 'INDEX_END'
- @scanTokens (token, i) ->
- @detectEnd i + 1, condition, action if token[0] is 'INDEX_START'
+ @scanTokens (token, i) ->
+ @detectEnd i + 1, condition, action if token[0] is 'INDEX_START'
1
@@ -321,13 +321,13 @@ or null (wildcard). Returns the index of the match or -1 if no match.
- indexOfTag: (i, pattern...) ->
+ indexOfTag: (i, pattern...) ->
fuzz = 0
for j in [0 ... pattern.length]
- fuzz += 2 while @tag(i + j + fuzz) is 'HERECOMMENT'
+ 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 -1 if @tag(i + j + fuzz) not in pattern[j]
+ return -1 if @tag(i + j + fuzz) not in pattern[j]
i + j + fuzz - 1
@@ -345,16 +345,14 @@ skipping over ‘HERECOMMENT’s.
- looksObjectish: (j) ->
- return yes if @indexOfTag(j, '@', null, ':') > -1 or @indexOfTag(j, null, ':') > -1
- index = @indexOfTag(j, EXPRESSION_START)
- if index > -1
+ looksObjectish: (j) ->
+ return yes if @indexOfTag(j, '@', null, ':') > -1 or @indexOfTag(j, null, ':') > -1
+ index = @indexOfTag(j, EXPRESSION_START)
+ if index > -1
end = null
- @detectEnd index + 1, ((token) -> token[0] in EXPRESSION_END), ((token, i) -> end = i)
- return yes if @tag(end + 1) is ':'
- no
-
-
+ @detectEnd index + 1, ((token) -> token[0] in EXPRESSION_END), ((token, i) -> end = i)
+ return yes if @tag(end + 1) is ':'
+ no
@@ -371,16 +369,16 @@ containing balanced expression.
- findTagsBackwards: (i, tags) ->
+ 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
+ @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
+ @tag(i) in tags
@@ -396,7 +394,7 @@ add them.
- addImplicitBracesAndParens: ->
+ addImplicitBracesAndParens: ->
@@ -414,11 +412,11 @@ add them.
stack = []
start = null
- @scanTokens (token, i, tokens) ->
+ @scanTokens (token, i, tokens) ->
[tag] = token
[prevTag] = prevToken = if i > 0 then tokens[i - 1] else []
[nextTag] = if i < tokens.length - 1 then tokens[i + 1] else []
- stackTop = -> stack[stack.length - 1]
+ stackTop = -> stack[stack.length - 1]
startIdx = i
@@ -435,7 +433,7 @@ and spliced, when returning for getting a new token.
- forward = (n) -> i - startIdx + n
+ forward = (n) -> i - startIdx + n
@@ -450,9 +448,9 @@ and spliced, when returning for getting a new token.
- inImplicit = -> stackTop()?[2]?.ours
- inImplicitCall = -> inImplicit() and stackTop()?[0] is '('
- inImplicitObject = -> inImplicit() and stackTop()?[0] is '{'
+ inImplicit = -> stackTop()?[2]?.ours
+ inImplicitCall = -> inImplicit() and stackTop()?[0] is '('
+ inImplicitObject = -> inImplicit() and stackTop()?[0] is '{'
@@ -468,28 +466,28 @@ class declaration or if-conditionals)
- inImplicitControl = -> inImplicit and stackTop()?[0] is 'CONTROL'
-
- startImplicitCall = (j) ->
+ inImplicitControl = -> inImplicit and stackTop()?[0] is 'CONTROL'
+
+ startImplicitCall = (j) ->
idx = j ? i
- stack.push ['(', idx, ours: yes]
+ stack.push ['(', idx, ours: yes]
tokens.splice idx, 0, generate 'CALL_START', '('
i += 1 if not j?
-
- endImplicitCall = ->
+
+ endImplicitCall = ->
stack.pop()
tokens.splice i, 0, generate 'CALL_END', ')', ['', 'end of input', token[2]]
i += 1
-
- startImplicitObject = (j, startsLine = yes) ->
+
+ startImplicitObject = (j, startsLine = yes) ->
idx = j ? i
- stack.push ['{', idx, sameLine: yes, startsLine: startsLine, ours: yes]
+ stack.push ['{', idx, sameLine: yes, startsLine: startsLine, ours: yes]
val = new String '{'
val.generated = yes
tokens.splice idx, 0, generate '{', val, token
i += 1 if not j?
-
- endImplicitObject = (j) ->
+
+ endImplicitObject = (j) ->
j = j ? i
stack.pop()
tokens.splice j, 0, generate '}', '}', token
@@ -510,7 +508,7 @@ class declaration or if-conditionals)
if inImplicitCall() and tag in ['IF', 'TRY', 'FINALLY', 'CATCH',
'CLASS', 'SWITCH']
- stack.push ['CONTROL', i, ours: true]
+ stack.push ['CONTROL', i, ours: true]
return forward(1)
if tag is 'INDENT' and inImplicit()
@@ -612,19 +610,19 @@ f a, f() b, f? c, h[0] d etc.
Implicit call taking an implicit indented object as first argument.
f
- a: b
- c: d
+ a: b
+ c: d
and
f
1
- a: b
- b: c
+ 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
+ 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.
@@ -632,8 +630,8 @@ that creates grammatical ambiguities.
if tag in IMPLICIT_FUNC and
- @indexOfTag(i + 1, 'INDENT') > -1 and @looksObjectish(i + 2) and
- not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH',
+ @indexOfTag(i + 1, 'INDENT') > -1 and @looksObjectish(i + 2) and
+ not @findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH',
'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])
startImplicitCall i + 1
stack.push ['INDENT', i + 2]
@@ -668,10 +666,10 @@ that creates grammatical ambiguities.
s = switch
- when @tag(i - 1) in EXPRESSION_END then start[1]
- when @tag(i - 2) is '@' then i - 2
+ when @tag(i - 1) in EXPRESSION_END then start[1]
+ when @tag(i - 2) is '@' then i - 2
else i - 1
- s -= 2 while @tag(s - 2) is 'HERECOMMENT'
+ s -= 2 while @tag(s - 2) is 'HERECOMMENT'
@@ -686,9 +684,9 @@ that creates grammatical ambiguities.
- @insideForDeclaration = nextTag is 'FOR'
+ @insideForDeclaration = nextTag is 'FOR'
- startsLine = s is 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine
+ startsLine = s is 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine
@@ -705,8 +703,8 @@ that creates grammatical ambiguities.
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 '{')
+ 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)
@@ -723,9 +721,9 @@ that creates grammatical ambiguities.
End implicit calls when chaining method calls
like e.g.:
-f ->
+f ->
a
-.g b, ->
+.g b, ->
c
.h a
and also
@@ -773,7 +771,7 @@ return a: 1, b: 2 unless true
- else if inImplicitObject() and not @insideForDeclaration and sameLine and
+ else if inImplicitObject() and not @insideForDeclaration and sameLine and
tag isnt 'TERMINATOR' and prevTag isnt ':'
endImplicitObject()
@@ -793,7 +791,7 @@ the continuation of an object.
else if inImplicitObject() and tag is 'TERMINATOR' and prevTag isnt ',' and
- not (startsLine and @looksObjectish(i + 1))
+ not (startsLine and @looksObjectish(i + 1))
return forward 1 if nextTag is 'HERECOMMENT'
endImplicitObject()
else
@@ -812,17 +810,17 @@ the continuation of an object.
and what comes after doesn’t look like it belongs.
This is used for trailing commas and calls, like:
x =
- a: b,
- c: d,
+ 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
- not @insideForDeclaration and
- (nextTag isnt 'TERMINATOR' or not @looksObjectish(i + 2))
+ if tag is ',' and not @looksObjectish(i + 1) and inImplicitObject() and
+ not @insideForDeclaration and
+ (nextTag isnt 'TERMINATOR' or not @looksObjectish(i + 2))
@@ -859,21 +857,21 @@ array further up the stack, so give it a chance.
- addLocationDataToGeneratedTokens: ->
- @scanTokens (token, i, tokens) ->
+ 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
+ {first_line: line, first_column: column} = nextLocation
else if prevLocation = tokens[i - 1]?[2]
- {last_line: line, last_column: column} = prevLocation
+ {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
+ first_line: line
+ first_column: column
+ last_line: line
+ last_column: column
return 1
@@ -893,39 +891,39 @@ blocks are added.
- normalizeLines: ->
+ normalizeLines: ->
starter = indent = outdent = null
-
- condition = (token, i) ->
+
+ condition = (token, i) ->
token[1] isnt ';' and token[0] in SINGLE_CLOSERS and
- not (token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE) and
+ not (token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE) and
not (token[0] is 'ELSE' and starter isnt 'THEN') and
not (token[0] in ['CATCH', 'FINALLY'] and starter in ['->', '=>']) or
- token[0] in CALL_CLOSERS and @tokens[i - 1].newLine
+ token[0] in CALL_CLOSERS and @tokens[i - 1].newLine
+
+ action = (token, i) ->
+ @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
- action = (token, i) ->
- @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
-
- @scanTokens (token, i, tokens) ->
+ @scanTokens (token, i, tokens) ->
[tag] = token
if tag is 'TERMINATOR'
- if @tag(i + 1) is 'ELSE' and @tag(i - 1) isnt 'OUTDENT'
- tokens.splice i, 1, @indentation()...
+ if @tag(i + 1) is 'ELSE' and @tag(i - 1) isnt 'OUTDENT'
+ tokens.splice i, 1, @indentation()...
return 1
- if @tag(i + 1) in EXPRESSION_CLOSE
+ if @tag(i + 1) in EXPRESSION_CLOSE
tokens.splice i, 1
return 0
if tag is 'CATCH'
- for j in [1..2] when @tag(i + j) in ['OUTDENT', 'TERMINATOR', 'FINALLY']
- tokens.splice i + j, 0, @indentation()...
+ 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')
+ 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 tokens[i]
+ [indent, outdent] = @indentation tokens[i]
indent.fromThen = true if starter is 'THEN'
tokens.splice i + 1, 0, indent
- @detectEnd i + 2, condition, action
+ @detectEnd i + 2, condition, action
tokens.splice i, 1 if tag is 'THEN'
return 1
return 1
@@ -944,23 +942,23 @@ different precedence.
- tagPostfixConditionals: ->
+ tagPostfixConditionals: ->
original = null
-
- condition = (token, i) ->
+
+ condition = (token, i) ->
[tag] = token
- [prevTag] = @tokens[i - 1]
+ [prevTag] = @tokens[i - 1]
tag is 'TERMINATOR' or (tag is 'INDENT' and prevTag not in SINGLE_LINERS)
-
- action = (token, i) ->
+
+ action = (token, i) ->
if token[0] isnt 'INDENT' or (token.generated and not token.fromThen)
original[0] = 'POST_' + original[0]
- @scanTokens (token, i) ->
+ @scanTokens (token, i) ->
return 1 unless token[0] is 'IF'
original = token
- @detectEnd i + 1, condition, action
+ @detectEnd i + 1, condition, action
return 1
@@ -976,7 +974,7 @@ different precedence.
- indentation: (origin) ->
+ indentation: (origin) ->
indent = ['INDENT', 2]
outdent = ['OUTDENT', 2]
if origin
@@ -986,7 +984,7 @@ different precedence.
indent.explicit = outdent.explicit = yes
[indent, outdent]
- generate: generate
+ generate: generate
@@ -1001,7 +999,7 @@ different precedence.
- tag: (i) -> @tokens[i]?[0]
+ tag: (i) -> @tokens[i]?[0]
@@ -1067,7 +1065,7 @@ look things up from either end.
- exports.INVERSES = INVERSES = {}
+ exports.INVERSES = INVERSES = {}
@@ -1117,7 +1115,7 @@ EXPRESSION_END = []
- IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']
+ IMPLICIT_FUNC = ['IDENTIFIER', 'PROPERTY', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']
@@ -1133,9 +1131,11 @@ EXPRESSION_END = []
IMPLICIT_CALL = [
- 'IDENTIFIER', 'NUMBER', 'STRING', 'STRING_START', 'JS', 'REGEX', 'REGEX_START'
- 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL'
- 'UNDEFINED', 'UNARY', 'YIELD', 'UNARY_MATH', 'SUPER', 'THROW'
+ 'IDENTIFIER', 'PROPERTY', 'NUMBER', 'INFINITY', 'NAN'
+ 'STRING', 'STRING_START', 'REGEX', 'REGEX_START', 'JS'
+ 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS'
+ 'UNDEFINED', 'NULL', 'BOOL'
+ 'UNARY', 'YIELD', 'UNARY_MATH', 'SUPER', 'THROW'
'@', '->', '=>', '[', '(', '{', '--', '++'
]
diff --git a/documentation/docs/scope.html b/documentation/docs/scope.html
index 34ff76e4..4a396367 100644
--- a/documentation/docs/scope.html
+++ b/documentation/docs/scope.html
@@ -124,7 +124,7 @@ with external scopes.
- exports.Scope = class Scope
+ exports.Scope = class Scope
@@ -143,10 +143,10 @@ and therefore should be avoided when generating variables.
- constructor: (@parent, @expressions, @method, @referencedVars) ->
- @variables = [{name: 'arguments', type: 'arguments'}]
- @positions = {}
- @utilities = {} unless @parent
+ constructor: (@parent, @expressions, @method, @referencedVars) ->
+ @variables = [{name: 'arguments', type: 'arguments'}]
+ @positions = {}
+ @utilities = {} unless @parent
@@ -161,7 +161,7 @@ and therefore should be avoided when generating variables.
- @root = @parent?.root ? this
+ @root = @parent?.root ? this
@@ -176,12 +176,12 @@ and therefore should be avoided when generating variables.
- 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
+ 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
+ @positions[name] = @variables.push({name, type}) - 1
@@ -200,9 +200,9 @@ function object that has a name filled in, or bottoms out.
- namedMethod: ->
- return @method if @method?.name or !@parent
- @parent.namedMethod()
+ namedMethod: ->
+ return @method if @method?.name or !@parent
+ @parent.namedMethod()
@@ -218,9 +218,9 @@ already exist.
- find: (name) ->
- return yes if @check name
- @add name, 'var'
+ find: (name) ->
+ return yes if @check name
+ @add name, 'var'
no
@@ -237,9 +237,9 @@ scope. No var
required for internal references.
- parameter: (name) ->
- return if @shared and @parent.check name, yes
- @add name, 'param'
+ parameter: (name) ->
+ return if @shared and @parent.check name, yes
+ @add name, 'param'
@@ -255,8 +255,8 @@ walks up to the root scope.
- check: (name) ->
- !!(@type(name) or @parent?.check(name))
+ check: (name) ->
+ !!(@type(name) or @parent?.check(name))
@@ -271,11 +271,17 @@ walks up to the root scope.
- temporary: (name, index, single=false) ->
+ temporary: (name, index, single=false) ->
if single
- (index + parseInt name, 36).toString(36).replace /\d/g, 'a'
+ startCode = name.charCodeAt(0)
+ endCode = 'z'.charCodeAt(0)
+ diff = endCode - startCode
+ newCode = startCode + index % (diff + 1)
+ letter = String.fromCharCode(newCode)
+ num = index // (diff + 1)
+ "#{letter}#{num or ''}"
else
- name + (index or '')
+ "#{name}#{index or ''}"
@@ -290,8 +296,8 @@ walks up to the root scope.
- type: (name) ->
- return v.type for v in @variables when v.name is name
+ type: (name) ->
+ return v.type for v in @variables when v.name is name
null
@@ -308,13 +314,13 @@ compiler-generated variable. _var
, _var2
, and so on…
- freeVariable: (name, options={}) ->
+ freeVariable: (name, options={}) ->
index = 0
loop
- temp = @temporary name, index, options.single
- break unless @check(temp) or temp in @root.referencedVars
+ temp = @temporary name, index, options.single
+ break unless @check(temp) or temp in @root.referencedVars
index++
- @add temp, 'var', yes if options.reserve ? true
+ @add temp, 'var', yes if options.reserve ? true
temp
@@ -331,9 +337,9 @@ compiler-generated variable. _var
, _var2
, and so on…
- assign: (name, value) ->
- @add name, {value, assigned: yes}, yes
- @hasAssignments = yes
+ assign: (name, value) ->
+ @add name, {value, assigned: yes}, yes
+ @hasAssignments = yes
@@ -348,8 +354,8 @@ compiler-generated variable. _var
, _var2
, and so on…
- hasDeclarations: ->
- !!@declaredVariables().length
+ hasDeclarations: ->
+ !!@declaredVariables().length
@@ -364,8 +370,8 @@ compiler-generated variable. _var
, _var2
, and so on…
- declaredVariables: ->
- (v.name for v in @variables when v.type is 'var').sort()
+ declaredVariables: ->
+ (v.name for v in @variables when v.type is 'var').sort()
@@ -381,8 +387,8 @@ of this scope.
- assignedVariables: ->
- "#{v.name} = #{v.type.value}" for v in @variables when v.type.assigned
+ 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 0d9bf1aa..67525c1b 100644
--- a/documentation/docs/sourcemap.html
+++ b/documentation/docs/sourcemap.html
@@ -144,15 +144,15 @@ positions for a single line of output JavaScript code.
class LineMap
- constructor: (@line) ->
- @columns = []
+ constructor: (@line) ->
+ @columns = []
- add: (column, [sourceLine, sourceColumn], options={}) ->
- return if @columns[column] and options.noReplace
- @columns[column] = {line: @line, column, sourceLine, sourceColumn}
+ 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)
+ sourceLocation: (column) ->
+ column-- until (mapping = @columns[column]) or (column <= 0)
mapping and [mapping.sourceLine, mapping.sourceColumn]
@@ -186,8 +186,8 @@ through the arrays of line and column buffer to produce it.
class SourceMap
- constructor: ->
- @lines = []
+ constructor: ->
+ @lines = []
@@ -205,9 +205,9 @@ effect.
- add: (sourceLocation, generatedLocation, options = {}) ->
+ add: (sourceLocation, generatedLocation, options = {}) ->
[line, column] = generatedLocation
- lineMap = (@lines[line] or= new LineMap(line))
+ lineMap = (@lines[line] or= new LineMap(line))
lineMap.add column, sourceLocation, options
@@ -224,8 +224,8 @@ code.
- sourceLocation: ([line, column]) ->
- line-- until (lineMap = @lines[line]) or (line <= 0)
+ sourceLocation: ([line, column]) ->
+ line-- until (lineMap = @lines[line]) or (line <= 0)
lineMap and lineMap.sourceLocation column
@@ -257,7 +257,7 @@ set “sources” and “file”, respectively.
- generate: (options = {}, code = null) ->
+ generate: (options = {}, code = null) ->
writingline = 0
lastColumn = 0
lastSourceLine = 0
@@ -265,7 +265,7 @@ set “sources” and “file”, respectively.
needComma = no
buffer = ""
- for lineMap, lineNumber in @lines when lineMap
+ for lineMap, lineNumber in @lines when lineMap
for mapping in lineMap.columns when mapping
while writingline < mapping.line
lastColumn = 0
@@ -306,7 +306,7 @@ column for the current line:
- buffer += @encodeVlq mapping.column - lastColumn
+ buffer += @encodeVlq mapping.column - lastColumn
lastColumn = mapping.column
@@ -322,7 +322,7 @@ column for the current line:
- buffer += @encodeVlq 0
+ buffer += @encodeVlq 0
@@ -337,7 +337,7 @@ column for the current line:
- buffer += @encodeVlq mapping.sourceLine - lastSourceLine
+ buffer += @encodeVlq mapping.sourceLine - lastSourceLine
lastSourceLine = mapping.sourceLine
@@ -353,7 +353,7 @@ column for the current line:
- buffer += @encodeVlq mapping.sourceColumn - lastSourceColumn
+ buffer += @encodeVlq mapping.sourceColumn - lastSourceColumn
lastSourceColumn = mapping.sourceColumn
needComma = yes
@@ -371,16 +371,16 @@ column for the current line:
v3 =
- version: 3
- file: options.generatedFile or ''
- sourceRoot: options.sourceRoot or ''
- sources: options.sourceFiles or ['']
- names: []
- mappings: buffer
+ version: 3
+ file: options.generatedFile or ''
+ sourceRoot: options.sourceRoot or ''
+ sources: options.sourceFiles or ['']
+ names: []
+ mappings: buffer
- v3.sourcesContent = [code] if options.inline
+ v3.sourcesContent = [code] if options.inlineMap
- JSON.stringify v3, null, 2
+ v3
@@ -416,7 +416,7 @@ bits of the original value encoded into the first byte of the VLQ encoded value.
VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT # 0010 0000
VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1 # 0001 1111
- encodeVlq: (value) ->
+ encodeVlq: (value) ->
answer = ''
@@ -466,7 +466,7 @@ bits of the original value encoded into the first byte of the VLQ encoded value.
nextChunk = valueToEncode & VLQ_VALUE_MASK
valueToEncode = valueToEncode >> VLQ_SHIFT
nextChunk |= VLQ_CONTINUATION_BIT if valueToEncode
- answer += @encodeBase64 nextChunk
+ answer += @encodeBase64 nextChunk
answer
@@ -497,7 +497,7 @@ bits of the original value encoded into the first byte of the VLQ encoded value.
BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
- encodeBase64: (value) ->
+ encodeBase64: (value) ->
BASE64_CHARS[value] or throw new Error "Cannot Base64 encode value: #{value}"
@@ -513,7 +513,7 @@ bits of the original value encoded into the first byte of the VLQ encoded value.
- module.exports = SourceMap
+ module.exports = SourceMap
diff --git a/documentation/index.html.js b/documentation/index.html.js
index f6a9674d..47ba6768 100644
--- a/documentation/index.html.js
+++ b/documentation/index.html.js
@@ -112,7 +112,7 @@
Latest Version:
- 1.10.0
+ 1.11.0
npm install -g coffee-script
diff --git a/documentation/js/aliases.js b/documentation/js/aliases.js
index dfa07732..1c50fafe 100644
--- a/documentation/js/aliases.js
+++ b/documentation/js/aliases.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var volume, winner;
if (ignition === true) {
diff --git a/documentation/js/array_comprehensions.js b/documentation/js/array_comprehensions.js
index 1bcf8a8c..c7118c4e 100644
--- a/documentation/js/array_comprehensions.js
+++ b/documentation/js/array_comprehensions.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var courses, dish, food, foods, i, j, k, l, len, len1, len2, ref;
ref = ['toast', 'cheese', 'wine'];
diff --git a/documentation/js/block_comment.js b/documentation/js/block_comment.js
index 235f935f..aad31090 100644
--- a/documentation/js/block_comment.js
+++ b/documentation/js/block_comment.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
/*
SkinnyMochaHalfCaffScript Compiler v1.0
diff --git a/documentation/js/cake_tasks.js b/documentation/js/cake_tasks.js
index 15e3b14c..69b16a2f 100644
--- a/documentation/js/cake_tasks.js
+++ b/documentation/js/cake_tasks.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var fs;
fs = require('fs');
diff --git a/documentation/js/chaining.js b/documentation/js/chaining.js
index 6090320a..fbe4bf30 100644
--- a/documentation/js/chaining.js
+++ b/documentation/js/chaining.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
$('body').click(function(e) {
return $('.box').fadeIn('fast').addClass('.active');
}).css('background', 'white');
diff --git a/documentation/js/classes.js b/documentation/js/classes.js
index b99dca10..e6b284b6 100644
--- a/documentation/js/classes.js
+++ b/documentation/js/classes.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var Animal, Horse, Snake, sam, tom,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
diff --git a/documentation/js/comparisons.js b/documentation/js/comparisons.js
index 5efe7733..4af2b99f 100644
--- a/documentation/js/comparisons.js
+++ b/documentation/js/comparisons.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var cholesterol, healthy;
cholesterol = 127;
diff --git a/documentation/js/conditionals.js b/documentation/js/conditionals.js
index c7d30a19..e550ff26 100644
--- a/documentation/js/conditionals.js
+++ b/documentation/js/conditionals.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var date, mood;
if (singing) {
diff --git a/documentation/js/constructor_destructuring.js b/documentation/js/constructor_destructuring.js
index 96f9aa24..72422477 100644
--- a/documentation/js/constructor_destructuring.js
+++ b/documentation/js/constructor_destructuring.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var Person, tim;
Person = (function() {
diff --git a/documentation/js/default_args.js b/documentation/js/default_args.js
index 9a42b308..6214e2fe 100644
--- a/documentation/js/default_args.js
+++ b/documentation/js/default_args.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var fill;
fill = function(container, liquid) {
diff --git a/documentation/js/do.js b/documentation/js/do.js
index dec849a2..0ffa7342 100644
--- a/documentation/js/do.js
+++ b/documentation/js/do.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var filename, fn, i, len;
fn = function(filename) {
diff --git a/documentation/js/embedded.js b/documentation/js/embedded.js
index 8ecb4f2d..bb475208 100644
--- a/documentation/js/embedded.js
+++ b/documentation/js/embedded.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var hi;
hi = function() {
diff --git a/documentation/js/existence.js b/documentation/js/existence.js
index 893c8fbb..db6e31c7 100644
--- a/documentation/js/existence.js
+++ b/documentation/js/existence.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var footprints, solipsism, speed;
if ((typeof mind !== "undefined" && mind !== null) && (typeof world === "undefined" || world === null)) {
diff --git a/documentation/js/expansion.js b/documentation/js/expansion.js
index 8cfdb59c..1c870df9 100644
--- a/documentation/js/expansion.js
+++ b/documentation/js/expansion.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var first, last, ref, text;
text = "Every literary critic believes he will outwit history and have the last word";
diff --git a/documentation/js/expressions.js b/documentation/js/expressions.js
index 955de558..9f672d88 100644
--- a/documentation/js/expressions.js
+++ b/documentation/js/expressions.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var eldest, grade;
grade = function(student) {
diff --git a/documentation/js/expressions_assignment.js b/documentation/js/expressions_assignment.js
index d12a70f1..098781cb 100644
--- a/documentation/js/expressions_assignment.js
+++ b/documentation/js/expressions_assignment.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var one, six, three, two;
six = (one = 1) + (two = 2) + (three = 3);
diff --git a/documentation/js/expressions_comprehension.js b/documentation/js/expressions_comprehension.js
index c4a6e690..46099157 100644
--- a/documentation/js/expressions_comprehension.js
+++ b/documentation/js/expressions_comprehension.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var globals, name;
globals = ((function() {
diff --git a/documentation/js/expressions_try.js b/documentation/js/expressions_try.js
index 4c5721b8..10d952a4 100644
--- a/documentation/js/expressions_try.js
+++ b/documentation/js/expressions_try.js
@@ -1,8 +1,7 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var error;
alert((function() {
- var error1;
try {
return nonexistent / void 0;
} catch (error1) {
diff --git a/documentation/js/fat_arrow.js b/documentation/js/fat_arrow.js
index e4ecbb03..d98eef16 100644
--- a/documentation/js/fat_arrow.js
+++ b/documentation/js/fat_arrow.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var Account;
Account = function(customer, cart) {
diff --git a/documentation/js/functions.js b/documentation/js/functions.js
index 0215eaa3..d5ce97b3 100644
--- a/documentation/js/functions.js
+++ b/documentation/js/functions.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var cube, square;
square = function(x) {
diff --git a/documentation/js/generators.js b/documentation/js/generators.js
index 3d6207d4..a9f6afd0 100644
--- a/documentation/js/generators.js
+++ b/documentation/js/generators.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var perfectSquares;
perfectSquares = function*() {
@@ -6,7 +6,7 @@ perfectSquares = function*() {
num = 0;
while (true) {
num += 1;
- (yield num * num);
+ yield num * num;
}
};
diff --git a/documentation/js/heredocs.js b/documentation/js/heredocs.js
index bdc0a7ed..4a963bb0 100644
--- a/documentation/js/heredocs.js
+++ b/documentation/js/heredocs.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var html;
html = "\n cup of coffeescript\n";
diff --git a/documentation/js/heregexes.js b/documentation/js/heregexes.js
index 9206161b..5750b80a 100644
--- a/documentation/js/heregexes.js
+++ b/documentation/js/heregexes.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var OPERATOR;
OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/;
diff --git a/documentation/js/interpolation.js b/documentation/js/interpolation.js
index e15acb27..f0b7d7fc 100644
--- a/documentation/js/interpolation.js
+++ b/documentation/js/interpolation.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var author, quote, sentence;
author = "Wittgenstein";
diff --git a/documentation/js/modules.js b/documentation/js/modules.js
index 9fdfcd9a..f04c030a 100644
--- a/documentation/js/modules.js
+++ b/documentation/js/modules.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
import 'local-file.coffee';
import 'coffee-script';
diff --git a/documentation/js/modulo.js b/documentation/js/modulo.js
index 6177461b..ac4460bf 100644
--- a/documentation/js/modulo.js
+++ b/documentation/js/modulo.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var modulo = function(a, b) { return (+a % (b = +b) + b) % b; };
-7 % 5 === -2;
diff --git a/documentation/js/multiple_return_values.js b/documentation/js/multiple_return_values.js
index 50cf6f80..68a6cb0c 100644
--- a/documentation/js/multiple_return_values.js
+++ b/documentation/js/multiple_return_values.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var city, forecast, ref, temp, weatherReport;
weatherReport = function(location) {
diff --git a/documentation/js/object_comprehensions.js b/documentation/js/object_comprehensions.js
index 5b1a6005..036e40b5 100644
--- a/documentation/js/object_comprehensions.js
+++ b/documentation/js/object_comprehensions.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var age, ages, child, yearsOld;
yearsOld = {
diff --git a/documentation/js/object_extraction.js b/documentation/js/object_extraction.js
index e70929b9..b6679a4d 100644
--- a/documentation/js/object_extraction.js
+++ b/documentation/js/object_extraction.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var city, futurists, name, ref, ref1, street;
futurists = {
diff --git a/documentation/js/objects_and_arrays.js b/documentation/js/objects_and_arrays.js
index 733bc35e..b626ce79 100644
--- a/documentation/js/objects_and_arrays.js
+++ b/documentation/js/objects_and_arrays.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var bitlist, kids, singers, song;
song = ["do", "re", "mi", "fa", "so"];
diff --git a/documentation/js/objects_reserved.js b/documentation/js/objects_reserved.js
index b8439559..a3bf1491 100644
--- a/documentation/js/objects_reserved.js
+++ b/documentation/js/objects_reserved.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
$('.account').attr({
"class": 'active'
});
diff --git a/documentation/js/overview.js b/documentation/js/overview.js
index ae0b47d4..82017054 100644
--- a/documentation/js/overview.js
+++ b/documentation/js/overview.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var cubes, list, math, num, number, opposite, race, square,
slice = [].slice;
diff --git a/documentation/js/parallel_assignment.js b/documentation/js/parallel_assignment.js
index 7e064b50..f64baa7e 100644
--- a/documentation/js/parallel_assignment.js
+++ b/documentation/js/parallel_assignment.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var ref, theBait, theSwitch;
theBait = 1000;
diff --git a/documentation/js/patterns_and_splats.js b/documentation/js/patterns_and_splats.js
index 5874527e..4500feb1 100644
--- a/documentation/js/patterns_and_splats.js
+++ b/documentation/js/patterns_and_splats.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var close, contents, i, open, ref, tag,
slice = [].slice;
diff --git a/documentation/js/prototypes.js b/documentation/js/prototypes.js
index 9b77850f..4fb32f1b 100644
--- a/documentation/js/prototypes.js
+++ b/documentation/js/prototypes.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
String.prototype.dasherize = function() {
return this.replace(/_/g, "-");
};
diff --git a/documentation/js/range_comprehensions.js b/documentation/js/range_comprehensions.js
index abf703e2..e1be9530 100644
--- a/documentation/js/range_comprehensions.js
+++ b/documentation/js/range_comprehensions.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var countdown, num;
countdown = (function() {
diff --git a/documentation/js/scope.js b/documentation/js/scope.js
index bdc6c3e8..9b8a888c 100644
--- a/documentation/js/scope.js
+++ b/documentation/js/scope.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var changeNumbers, inner, outer;
outer = 1;
diff --git a/documentation/js/slices.js b/documentation/js/slices.js
index 0476f4ab..5d1efa58 100644
--- a/documentation/js/slices.js
+++ b/documentation/js/slices.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var copy, end, middle, numbers, start;
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
diff --git a/documentation/js/soaks.js b/documentation/js/soaks.js
index dc07e180..5948b74e 100644
--- a/documentation/js/soaks.js
+++ b/documentation/js/soaks.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var ref, zip;
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 34f72d45..e260478e 100644
--- a/documentation/js/splats.js
+++ b/documentation/js/splats.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var awardMedals, contenders, gold, rest, silver,
slice = [].slice;
diff --git a/documentation/js/splices.js b/documentation/js/splices.js
index 00a212cd..04a5f3b9 100644
--- a/documentation/js/splices.js
+++ b/documentation/js/splices.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var numbers, ref;
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
diff --git a/documentation/js/strings.js b/documentation/js/strings.js
index 052181e2..3543745b 100644
--- a/documentation/js/strings.js
+++ b/documentation/js/strings.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var mobyDick;
mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world...";
diff --git a/documentation/js/switch.js b/documentation/js/switch.js
index f76d5936..732d1df1 100644
--- a/documentation/js/switch.js
+++ b/documentation/js/switch.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
switch (day) {
case "Mon":
go(work);
diff --git a/documentation/js/switch_with_no_expression.js b/documentation/js/switch_with_no_expression.js
index 87280ecb..8430216c 100644
--- a/documentation/js/switch_with_no_expression.js
+++ b/documentation/js/switch_with_no_expression.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var grade, score;
score = 76;
diff --git a/documentation/js/try.js b/documentation/js/try.js
index 9f85c4c5..7f5f737c 100644
--- a/documentation/js/try.js
+++ b/documentation/js/try.js
@@ -1,5 +1,5 @@
-// Generated by CoffeeScript 1.10.0
-var error, error1;
+// Generated by CoffeeScript 1.11.0
+var error;
try {
allHellBreaksLoose();
diff --git a/documentation/js/while.js b/documentation/js/while.js
index 634a8c67..8491a2e2 100644
--- a/documentation/js/while.js
+++ b/documentation/js/while.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.11.0
var lyrics, num;
if (this.studyingEconomics) {
diff --git a/extras/coffee-script.js b/extras/coffee-script.js
index 06671c21..994a32df 100644
--- a/extras/coffee-script.js
+++ b/extras/coffee-script.js
@@ -1,12 +1,12 @@
/**
- * CoffeeScript Compiler v1.10.0
+ * CoffeeScript Compiler v1.11.0
* 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"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,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=s=function(e,t){var n;for(n="";t>0;)1&t&&(n+=e),t>>>=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],t=0,i=e.length;i>t;t++)n=e[t],n&&r.push(n);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,s;for(n=[],r=0,s=e.length;s>r;r++)t=e[r],"[object Array]"===Object.prototype.toString.call(t)?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.some=null!=(r=Array.prototype.some)?r:function(e){var t,n,i;for(n=0,i=this.length;i>n;n++)if(t=this[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,s,o;for(s=e.split("\n"),o=[],n=0,r=s.length;r>n;n++)t=s[n],i&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(i=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){return"object"==typeof i&&i.updateLocationDataIfMissing&&i.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?t.first_line+1+":"+(t.first_column+1)+"-"+(t.last_line+1+":"+(t.last_column+1)):"No location data"},e.baseFileName=function(e,t,n){var i,r;return null==t&&(t=!1),null==n&&(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],t&&e.indexOf(".")>=0?(i=e.split("."),i.pop(),"coffee"===i[i.length-1]&&i.length>1&&i.pop(),i.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=o,n.stack=""+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===o&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=""+e),e},o=function(){var e,t,n,i,r,o,a,c,l,h,u,p,d,f,m;return this.code&&this.location?(u=this.location,a=u.first_line,o=u.first_column,l=u.last_line,c=u.last_column,null==l&&(l=a),null==c&&(c=o),r=this.filename||"[stdin]",e=this.code.split("\n")[a],m=o,i=a===l?c+1:e.length,h=e.slice(0,m).replace(/[^\s]/g," ")+s("^",i-m),"undefined"!=typeof process&&null!==process&&(n=(null!=(p=process.stdout)?p.isTTY:void 0)&&!(null!=(d=process.env)?d.NODE_DISABLE_COLORS:void 0)),(null!=(f=this.colorful)?f:n)&&(t=function(e){return"[1;31m"+e+"[0m"},e=e.slice(0,m)+t(e.slice(m,i))+e.slice(i),h=t(h)),r+":"+(a+1)+":"+(o+1)+": error: "+this.message+"\n"+e+"\n"+h):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case" ":return"space";case"\n":return"newline";case"\r":return"carriage return";case" ":return"tab";default:return e}}}.call(this),t.exports}(),require["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,l,h,u,p,d,f,m,g,v,b,y,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n&&(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){var i,o,a,c,l;for(l=this.tokens,i=0;c=l[e];){if(0===i&&t.call(this,c,e))return n.call(this,c,e);if(!c||0>i)return n.call(this,c,e-1);o=c[0],k.call(s,o)>=0?i+=1:(a=c[0],k.call(r,a)>=0&&(i-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,r;for(i=this.tokens,e=t=0,n=i.length;n>t&&(r=i[e][0],"TERMINATOR"===r);e=++t);return e?this.tokens.splice(0,e):void 0},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return")"===(n=e[0])||"CALL_END"===n||"OUTDENT"===e[0]&&")"===this.tag(t-1)},e=function(e,t){return this.tokens["OUTDENT"===e[0]?t-1:t][0]="CALL_END"},this.scanTokens(function(n,i){return"CALL_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e){var t;return"]"===(t=e[0])||"INDEX_END"===t},e=function(e){return e[0]="INDEX_END"},this.scanTokens(function(n,i){return"INDEX_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.indexOfTag=function(){var e,t,n,i,r,s,o;for(t=arguments[0],r=arguments.length>=2?w.call(arguments,1):[],e=0,n=i=0,s=r.length;s>=0?s>i:i>s;n=s>=0?++i:--i){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=r[n]&&("string"==typeof r[n]&&(r[n]=[r[n]]),o=this.tag(t+n+e),0>k.call(r[n],o)))return-1}return t+n+e-1},e.prototype.looksObjectish=function(e){var t,n;return this.indexOfTag(e,"@",null,":")>-1||this.indexOfTag(e,null,":")>-1?!0:(n=this.indexOfTag(e,s),n>-1&&(t=null,this.detectEnd(n+1,function(e){var t;return t=e[0],k.call(r,t)>=0},function(e,n){return t=n}),":"===this.tag(t+1))?!0:!1)},e.prototype.findTagsBackwards=function(e,t){var n,i,o,a,c,l,h;for(n=[];e>=0&&(n.length||(a=this.tag(e),0>k.call(t,a)&&(c=this.tag(e),0>k.call(s,c)||this.tokens[e].generated)&&(l=this.tag(e),0>k.call(u,l))));)i=this.tag(e),k.call(r,i)>=0&&n.push(this.tag(e)),o=this.tag(e),k.call(s,o)>=0&&n.length&&n.pop(),e-=1;return h=this.tag(e),k.call(t,h)>=0},e.prototype.addImplicitBracesAndParens=function(){var e,t;return e=[],t=null,this.scanTokens(function(i,h,p){var d,m,g,v,b,y,w,T,C,F,E,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U;if(U=i[0],E=(N=h>0?p[h-1]:[])[0],C=(p.length-1>h?p[h+1]:[])[0],j=function(){return e[e.length-1]},M=h,g=function(e){return h-M+e},v=function(){var e,t;return null!=(e=j())?null!=(t=e[2])?t.ours:void 0:void 0},b=function(){var e;return v()&&"("===(null!=(e=j())?e[0]:void 0)},w=function(){var e;return v()&&"{"===(null!=(e=j())?e[0]:void 0)},y=function(){var e;return v&&"CONTROL"===(null!=(e=j())?e[0]:void 0)},B=function(t){var n;return n=null!=t?t:h,e.push(["(",n,{ours:!0}]),p.splice(n,0,f("CALL_START","(")),null==t?h+=1:void 0},d=function(){return e.pop(),p.splice(h,0,f("CALL_END",")",["","end of input",i[2]])),h+=1},V=function(t,n){var r,s;return null==n&&(n=!0),r=null!=t?t:h,e.push(["{",r,{sameLine:!0,startsLine:n,ours:!0}]),s=new String("{"),s.generated=!0,p.splice(r,0,f("{",s,i)),null==t?h+=1:void 0},m=function(t){return t=null!=t?t:h,e.pop(),p.splice(t,0,f("}","}",i)),h+=1},b()&&("IF"===U||"TRY"===U||"FINALLY"===U||"CATCH"===U||"CLASS"===U||"SWITCH"===U))return e.push(["CONTROL",h,{ours:!0}]),g(1);if("INDENT"===U&&v()){if("=>"!==E&&"->"!==E&&"["!==E&&"("!==E&&","!==E&&"{"!==E&&"TRY"!==E&&"ELSE"!==E&&"="!==E)for(;b();)d();return y()&&e.pop(),e.push([U,h]),g(1)}if(k.call(s,U)>=0)return e.push([U,h]),g(1);if(k.call(r,U)>=0){for(;v();)b()?d():w()?m():e.pop();t=e.pop()}if((k.call(c,U)>=0&&i.spaced||"?"===U&&h>0&&!p[h-1].spaced)&&(k.call(o,C)>=0||k.call(l,C)>=0&&!(null!=(L=p[h+1])?L.spaced:void 0)&&!(null!=(x=p[h+1])?x.newLine:void 0)))return"?"===U&&(U=i[0]="FUNC_EXIST"),B(h+1),g(2);if(k.call(c,U)>=0&&this.indexOfTag(h+1,"INDENT")>-1&&this.looksObjectish(h+2)&&!this.findTagsBackwards(h,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return B(h+1),e.push(["INDENT",h+2]),g(3);if(":"===U){for(I=function(){var e;switch(!1){case e=this.tag(h-1),0>k.call(r,e):return t[1];case"@"!==this.tag(h-2):return h-2;default:return h-1}}.call(this);"HERECOMMENT"===this.tag(I-2);)I-=2;return this.insideForDeclaration="FOR"===C,P=0===I||(S=this.tag(I-1),k.call(u,S)>=0)||p[I-1].newLine,j()&&(D=j(),$=D[0],O=D[1],("{"===$||"INDENT"===$&&"{"===this.tag(O-1))&&(P||","===this.tag(I-1)||"{"===this.tag(I-1)))?g(1):(V(I,!!P),g(2))}if(w()&&k.call(u,U)>=0&&(j()[2].sameLine=!1),T="OUTDENT"===E||N.newLine,k.call(a,U)>=0||k.call(n,U)>=0&&T)for(;v();)if(R=j(),$=R[0],O=R[1],A=R[2],_=A.sameLine,P=A.startsLine,b()&&","!==E)d();else if(w()&&!this.insideForDeclaration&&_&&"TERMINATOR"!==U&&":"!==E)m();else{if(!w()||"TERMINATOR"!==U||","===E||P&&this.looksObjectish(h+1))break;if("HERECOMMENT"===C)return g(1);m()}if(!(","!==U||this.looksObjectish(h+1)||!w()||this.insideForDeclaration||"TERMINATOR"===C&&this.looksObjectish(h+2)))for(F="OUTDENT"===C?1:0;w();)m(h+F);return g(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,r,s,o,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(s=null!=(a=n[t+1])?a[2]:void 0)?(r=s.first_line,i=s.first_column):(o=null!=(c=n[t-1])?c[2]:void 0)?(r=o.last_line,i=o.last_column):r=i=0,e[2]={first_line:r,first_column:i,last_line:r,last_column:i},1):1})},e.prototype.normalizeLines=function(){var e,t,r,s,o;return o=r=s=null,t=function(e,t){var r,s,a,c;return";"!==e[1]&&(r=e[0],k.call(p,r)>=0)&&!("TERMINATOR"===e[0]&&(s=this.tag(t+1),k.call(i,s)>=0))&&!("ELSE"===e[0]&&"THEN"!==o)&&!!("CATCH"!==(a=e[0])&&"FINALLY"!==a||"->"!==o&&"=>"!==o)||(c=e[0],k.call(n,c)>=0&&this.tokens[t-1].newLine)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,s)},this.scanTokens(function(n,a,c){var l,h,u,p,f,m;if(m=n[0],"TERMINATOR"===m){if("ELSE"===this.tag(a+1)&&"OUTDENT"!==this.tag(a-1))return c.splice.apply(c,[a,1].concat(w.call(this.indentation()))),1;if(u=this.tag(a+1),k.call(i,u)>=0)return c.splice(a,1),0}if("CATCH"===m)for(l=h=1;2>=h;l=++h)if("OUTDENT"===(p=this.tag(a+l))||"TERMINATOR"===p||"FINALLY"===p)return c.splice.apply(c,[a+l,0].concat(w.call(this.indentation()))),2+l;return k.call(d,m)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==m||"IF"!==this.tag(a+1))?(o=m,f=this.indentation(c[a]),r=f[0],s=f[1],"THEN"===o&&(r.fromThen=!0),c.splice(a+1,0,r),this.detectEnd(a+2,t,e),"THEN"===m&&c.splice(a,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,i;return i=e[0],n=this.tokens[t-1][0],"TERMINATOR"===i||"INDENT"===i&&0>k.call(d,n)},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,r){return"IF"!==i[0]?1:(n=i,this.detectEnd(r+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return t=["INDENT",2],n=["OUTDENT",2],e?(t.generated=n.generated=!0,t.origin=n.origin=e):t.explicit=n.explicit=!0,[t,n]},e.prototype.generate=f,e.prototype.tag=function(e){var t;return null!=(t=this.tokens[e])?t[0]:void 0},e}(),t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=h={},s=[],r=[],m=0,v=t.length;v>m;m++)b=t[m],g=b[0],y=b[1],s.push(h[y]=g),r.push(h[g]=y);i=["CATCH","THEN","ELSE","FINALLY"].concat(r),c=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],o=["IDENTIFIER","NUMBER","STRING","STRING_START","JS","REGEX","REGEX_START","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","YIELD","UNARY_MATH","SUPER","THROW","@","->","=>","[","(","{","--","++"],l=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],u=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"]}.call(this),t.exports}(),require["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,l,h,u,p,d,f,m,g,v,b,y,k,w,T,C,F,E,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,lt,ht,ut=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};ot=require("./rewriter"),P=ot.Rewriter,w=ot.INVERSES,at=require("./helpers"),nt=at.count,lt=at.starts,tt=at.compact,ct=at.repeat,it=at.invertLiterate,st=at.locationDataToString,ht=at.throwSyntaxError,e.Lexer=S=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,r,s;for(null==t&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.seenFor=!1,this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;this.chunk=e.slice(r);)if(n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n,t.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:r};return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i.tag,i.origin[2]),t.rewrite===!1?this.tokens:(new P).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(z,""),et.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=it(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,r,c,l,h,u,p,d,f,m,g,b,y;return(h=v.exec(this.chunk))?(l=h[0],r=h[1],t=h[2],c=r.length,u=void 0,"own"===r&&"FOR"===this.tag()?(this.token("OWN",r),r.length):"from"===r&&"YIELD"===this.tag()?(this.token("FROM",r),r.length):(d=this.tokens,p=d[d.length-1],i=t||null!=p&&("."===(f=p[0])||"?."===f||"::"===f||"?::"===f||!p.spaced&&"@"===p[0]),b="IDENTIFIER",!i&&(ut.call(F,r)>=0||ut.call(a,r)>=0)&&(b=r.toUpperCase(),"WHEN"===b&&(m=this.tag(),ut.call(N,m)>=0)?b="LEADING_WHEN":"FOR"===b?this.seenFor=!0:"UNLESS"===b?b="IF":ut.call(J,b)>=0?b="UNARY":ut.call(B,b)>=0&&("INSTANCEOF"!==b&&this.seenFor?(b="FOR"+b,this.seenFor=!1):(b="RELATION","!"===this.value()&&(u=this.tokens.pop(),r="!"+r)))),ut.call(C,r)>=0&&(i?(b="IDENTIFIER",r=new String(r),r.reserved=!0):ut.call(V,r)>=0&&this.error("reserved word '"+r+"'",{length:r.length})),i||(ut.call(s,r)>=0&&(e=r,r=o[r]),b=function(){switch(r){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 b}}()),y=this.token(b,r,0,c),e&&(y.origin=[b,e,y[2]]),y.variable=!i,u&&(g=[u[2].first_line,u[2].first_column],y[2].first_line=g[0],y[2].first_column=g[1]),t&&(n=l.lastIndexOf(":"),this.token(":",":",n,t.length)),l.length)):0},e.prototype.numberToken=function(){var e,t,n,i,r;return(n=I.exec(this.chunk))?(i=n[0],t=i.length,/^0[BOX]/.test(i)?this.error("radix prefix in '"+i+"' must be lowercase",{offset:1}):/E/.test(i)&&!/^0x/.test(i)?this.error("exponential notation in '"+i+"' must be indicated with a lowercase 'e'",{offset:i.indexOf("E")}):/^0\d*[89]/.test(i)?this.error("decimal literal '"+i+"' must not be prefixed with '0'",{length:t}):/^0\d+/.test(i)&&this.error("octal literal '"+i+"' must be prefixed with '0o'",{length:t}),(r=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(r[1],8).toString(16)),(e=/^0b([01]+)/.exec(i))&&(i="0x"+parseInt(e[1],2).toString(16)),this.token("NUMBER",i,0,t),t):0},e.prototype.stringToken=function(){var e,t,n,i,r,s,o,a,c,l,h,u,m,g,v,b;if(h=(Y.exec(this.chunk)||[])[0],!h)return 0;if(g=function(){switch(h){case"'":return W;case'"':return q;case"'''":return f;case'"""':return p}}(),s=3===h.length,u=this.matchWithInterpolations(g,h),b=u.tokens,r=u.index,e=b.length-1,n=h.charAt(0),s){for(a=null,i=function(){var e,t,n;for(n=[],o=e=0,t=b.length;t>e;o=++e)v=b[o],"NEOSTRING"===v[0]&&n.push(v[1]);return n}().join("#{}");l=d.exec(i);)t=l[1],(null===a||(m=t.length)>0&&a.length>m)&&(a=t);a&&(c=RegExp("^"+a,"gm")),this.mergeInterpolationTokens(b,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),0===i&&(n=n.replace(E,"")),i===e&&(n=n.replace(K,"")),c&&(n=n.replace(c,"")),n}}(this))}else this.mergeInterpolationTokens(b,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),n=n.replace(G,function(t,r){return 0===i&&0===r||i===e&&r+t.length===n.length?"":" "})}}(this));return r},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&((n=u.exec(e))&&this.error("block comments cannot contain "+n[0],{offset:n.index,length:n[0].length}),t.indexOf("\n")>=0&&(t=t.replace(RegExp("\\n"+ct(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",t,0,e.length)),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=T.exec(this.chunk))?(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length):0},e.prototype.regexToken=function(){var e,t,n,r,s,o,a,c,l,h,u,p,d;switch(!1){case!(o=M.exec(this.chunk)):this.error("regular expressions cannot begin with "+o[2],{offset:o.index+o[1].length});break;case!(o=this.matchWithInterpolations(m,"///")):d=o.tokens,s=o.index;break;case!(o=$.exec(this.chunk)):if(p=o[0],e=o[1],t=o[2],this.validateEscapes(e,{isRegex:!0,offsetInChunk:1}),s=p.length,l=this.tokens,c=l[l.length-1],c)if(c.spaced&&(h=c[0],ut.call(i,h)>=0)){if(!t||O.test(p))return 0}else if(u=c[0],ut.call(A,u)>=0)return 0;t||this.error("missing / (unclosed regex)");break;default:return 0}switch(r=j.exec(this.chunk.slice(s))[0],n=s+r.length,a=this.makeToken("REGEX",null,0,n),!1){case!!Z.test(r):this.error("invalid regular expression flags "+r,{offset:s,length:r.length});break;case!(p||1===d.length):null==e&&(e=this.formatHeregex(d[0][1])),this.token("REGEX",""+this.makeDelimitedLiteral(e,{delimiter:"/"})+r,0,n,a);break;default:this.token("REGEX_START","(",0,0,a),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(d,{delimiter:'"',"double":!0},this.formatHeregex),r&&(this.token(",",",",s,0),this.token("STRING",'"'+r+'"',s,r.length)),this.token(")",")",n,0),this.token("REGEX_END",")",n,0)}return n},e.prototype.lineToken=function(){var e,t,n,i,r;if(!(n=R.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,r=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),r-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(r>this.indent){if(i)return this.indebt=r-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=r,t.length;e=r-this.indent+this.outdebt,this.token("INDENT",e,t.length-r,r),this.indents.push(e),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=r}else this.baseIndent>r?this.error("missing indentation",{offset:t.length}):(this.indebt=0,this.outdentToken(this.indent-r,i,t.length));return t.length},e.prototype.outdentToken=function(e,t,n){var i,r,s,o;for(i=this.indent-e;e>0;)s=this.indents[this.indents.length-1],s?s===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.outdebt>s?(this.outdebt-=s,e-=s):(r=this.indents.pop()+this.outdebt,n&&(o=this.chunk[n],ut.call(b,o)>=0)&&(i-=r-e,e=r),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",e,0,n),e-=r):e=0;for(r&&(this.outdebt-=e);";"===this.value();)this.tokens.pop();return"TERMINATOR"===this.tag()||t||this.token("TERMINATOR","\n",n,0),this.indent=i,this},e.prototype.whitespaceToken=function(){var e,t,n,i;return(e=et.exec(this.chunk))||(t="\n"===this.chunk.charAt(0))?(i=this.tokens,n=i[i.length-1],n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0):0},e.prototype.newlineToken=function(e){for(;";"===this.value();)this.tokens.pop();return"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return"\\"===this.value()&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,s,o,a,c,u,p,d;if((e=_.exec(this.chunk))?(d=e[0],r.test(d)&&this.tagParameters()):d=this.chunk.charAt(0),u=d,n=this.tokens,t=n[n.length-1],"="===d&&t&&(!t[1].reserved&&(s=t[1],ut.call(C,s)>=0)&&(t.origin&&(t=t.origin),this.error("reserved word '"+t[1]+"' can't be assigned",t[2])),"||"===(o=t[1])||"&&"===o))return t[0]="COMPOUND_ASSIGN",t[1]+="=",d.length;if(";"===d)this.seenFor=!1,u="TERMINATOR";else if(ut.call(D,d)>=0)u="MATH";else if(ut.call(l,d)>=0)u="COMPARE";else if(ut.call(h,d)>=0)u="COMPOUND_ASSIGN";else if(ut.call(J,d)>=0)u="UNARY";else if(ut.call(Q,d)>=0)u="UNARY_MATH";else if(ut.call(U,d)>=0)u="SHIFT";else if(ut.call(x,d)>=0||"?"===d&&(null!=t?t.spaced:void 0))u="LOGIC";else if(t&&!t.spaced)if("("===d&&(a=t[0],ut.call(i,a)>=0))"?"===t[0]&&(t[0]="FUNC_EXIST"),u="CALL_START";else if("["===d&&(c=t[0],ut.call(y,c)>=0))switch(u="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(p=this.makeToken(u,d),d){case"(":case"{":case"[":this.ends.push({tag:w[d],origin:p});break;case")":case"}":case"]":this.pair(d)}return this.tokens.push(p),d.length},e.prototype.tagParameters=function(){var e,t,n,i;if(")"!==this.tag())return this;for(t=[],i=this.tokens,e=i.length,i[--e][0]="PARAM_END";n=i[--e];)switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return"("===n[0]?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.matchWithInterpolations=function(t,n){var i,r,s,o,a,c,l,h,u,p,d,f,m,g,v;if(v=[],h=n.length,this.chunk.slice(0,h)!==n)return null;for(m=this.chunk.slice(h);;){if(g=t.exec(m)[0],this.validateEscapes(g,{isRegex:"/"===n.charAt(0),offsetInChunk:h}),v.push(this.makeToken("NEOSTRING",g,h)),m=m.slice(g.length),h+=g.length,"#{"!==m.slice(0,2))break;p=this.getLineAndColumnFromChunk(h+1),c=p[0],r=p[1],d=(new e).tokenize(m.slice(1),{line:c,column:r,untilBalanced:!0}),l=d.tokens,o=d.index,o+=1,u=l[0],i=l[l.length-1],u[0]=u[1]="(",i[0]=i[1]=")",i.origin=["","end of interpolation",i[2]],"TERMINATOR"===(null!=(f=l[1])?f[0]:void 0)&&l.splice(1,1),v.push(["TOKENS",l]),m=m.slice(o),h+=o}return m.slice(0,n.length)!==n&&this.error("missing "+n,{length:n.length}),s=v[0],a=v[v.length-1],s[2].first_column-=n.length,a[2].last_column+=n.length,0===a[1].length&&(a[2].last_column-=1),{tokens:v,index:h+n.length}},e.prototype.mergeInterpolationTokens=function(e,t,n){var i,r,s,o,a,c,l,h,u,p,d,f,m,g,v,b;for(e.length>1&&(u=this.token("STRING_START","(",0,0)),s=this.tokens.length,o=a=0,l=e.length;l>a;o=++a){switch(g=e[o],m=g[0],b=g[1],m){case"TOKENS":if(2===b.length)continue;h=b[0],v=b;break;case"NEOSTRING":if(i=n(g[1],o),0===i.length){if(0!==o)continue;r=this.tokens.length}2===o&&null!=r&&this.tokens.splice(r,2),g[0]="STRING",g[1]=this.makeDelimitedLiteral(i,t),h=g,v=[g]}this.tokens.length>s&&(p=this.token("+","+"),p[2]={first_line:h[2].first_line,first_column:h[2].first_column,last_line:h[2].first_line,last_column:h[2].first_column}),(d=this.tokens).push.apply(d,v)}return u?(c=e[e.length-1],u.origin=["STRING",null,{first_line:u[2].first_line,first_column:u[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],f=this.token("STRING_END",")"),f[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}):void 0},e.prototype.pair=function(e){var t,n,i,r,s;return i=this.ends,n=i[i.length-1],e!==(s=null!=n?n.tag:void 0)?("OUTDENT"!==s&&this.error("unmatched "+e),r=this.indents,t=r[r.length-1],this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,r,s;return 0===e?[this.chunkLine,this.chunkColumn]:(s=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),i=nt(s,"\n"),t=this.chunkColumn,i>0?(r=s.split("\n"),n=r[r.length-1],t=n.length):t+=s.length,[this.chunkLine+i,t])},e.prototype.makeToken=function(e,t,n,i){var r,s,o,a,c;return null==n&&(n=0),null==i&&(i=t.length),s={},o=this.getLineAndColumnFromChunk(n),s.first_line=o[0],s.first_column=o[1],r=Math.max(0,i-1),a=this.getLineAndColumnFromChunk(n+r),s.last_line=a[0],s.last_column=a[1],c=[e,t,s]},e.prototype.token=function(e,t,n,i,r){var s;return s=this.makeToken(e,t,n,i),r&&(s.origin=r),this.tokens.push(s),s},e.prototype.tag=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[0]:void 0},e.prototype.value=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[1]:void 0},e.prototype.unfinished=function(){var e;return L.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"UNARY_MATH"===e||"+"===e||"-"===e||"YIELD"===e||"**"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.formatString=function(e){return e.replace(X,"$1")},e.prototype.formatHeregex=function(e){return e.replace(g,"$1$2")},e.prototype.validateEscapes=function(e,t){var n,i,r,s,o,a,c,l;return null==t&&(t={}),s=k.exec(e),!s||(s[0],n=s[1],a=s[2],i=s[3],l=s[4],t.isRegex&&a&&"0"!==a.charAt(0))?void 0:(o=a?"octal escape sequences are not allowed":"invalid escape sequence",r="\\"+(a||i||l),this.error(o+" "+r,{offset:(null!=(c=t.offsetInChunk)?c:0)+s.index+n.length,length:r.length}))},e.prototype.makeDelimitedLiteral=function(e,t){var n;return null==t&&(t={}),""===e&&"/"===t.delimiter&&(e="(?:)"),n=RegExp("(\\\\\\\\)|(\\\\0(?=[1-7]))|\\\\?("+t.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),e=e.replace(n,function(e,n,i,r,s,o,a,c,l){switch(!1){case!n:return t.double?n+n:n;case!i:return"\\x00";case!r:return"\\"+r;case!s:return"\\n";case!o:return"\\r";case!a:return"\\u2028";case!c:return"\\u2029";case!l:return t.double?"\\"+l:l}}),""+t.delimiter+e+t.delimiter},e.prototype.error=function(e,t){var n,i,r,s,o,a;return null==t&&(t={}),r="first_line"in t?t:(o=this.getLineAndColumnFromChunk(null!=(s=t.offset)?s:0),i=o[0],n=o[1],o,{first_line:i,first_column:n,last_column:n+(null!=(a=t.length)?a:1)-1}),ht(e,r)},e}(),F=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],a=["undefined","then","unless","until","loop","of","by","when"],o={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},s=function(){var e;e=[];for(rt in o)e.push(rt);return e}(),a=a.concat(s),V=["case","default","function","var","void","with","const","let","enum","export","import","native","implements","interface","package","private","protected","public","static"],H=["arguments","eval","yield*"],C=F.concat(V).concat(H),e.RESERVED=V.concat(F).concat(a).concat(H),e.STRICT_PROSCRIBED=H,t=65279,v=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,I=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,_=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,et=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,r=/^[-=]>/,R=/^(?:\n[^\n\S]*)+/,T=/^`[^\\`]*(?:\\.[^\\`]*)*`/,Y=/^(?:'''|"""|'|")/,W=/^(?:[^\\']|\\[\s\S])*/,q=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,f=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,p=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,X=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,G=/\s*\n\s*/g,d=/\n+([^\n\S]*)(?=\S)/g,$=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,j=/^\w*/,Z=/^(?!.*(.).*\1)[imgy]*$/,m=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/,g=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,M=/^(\/|\/{3}\s*)(\*)/,O=/^\/=?\s/,u=/\*\//,L=/^\s*(?:,|\??\.(?![.\d])|::)/,k=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/,E=/^[^\n\S]*\n/,K=/\n[^\n\S]*$/,z=/\s+$/,h=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],J=["NEW","TYPEOF","DELETE","DO"],Q=["!","~"],x=["&&","||","&","|","^"],U=["<<",">>",">>>"],l=["==","!=","<",">","<=",">="],D=["*","/","%","//","%%"],B=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],i=["IDENTIFIER",")","]","?","@","THIS","SUPER"],y=i.concat(["NUMBER","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),A=y.concat(["++","--"]),N=["INDENT","OUTDENT","TERMINATOR"],b=[")","}","]"]}.call(this),t.exports}(),require["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[1,20],i=[1,75],r=[1,71],s=[1,76],o=[1,77],a=[1,73],c=[1,74],l=[1,50],h=[1,52],u=[1,53],p=[1,54],d=[1,55],f=[1,45],m=[1,46],g=[1,27],v=[1,60],b=[1,61],y=[1,70],k=[1,43],w=[1,26],T=[1,58],C=[1,59],F=[1,57],E=[1,38],N=[1,44],L=[1,56],x=[1,65],S=[1,66],D=[1,67],R=[1,68],A=[1,42],I=[1,64],_=[1,29],O=[1,30],$=[1,31],j=[1,32],M=[1,33],B=[1,34],V=[1,35],P=[1,78],U=[1,6,26,34,109],G=[1,88],H=[1,81],q=[1,80],X=[1,79],W=[1,82],Y=[1,83],K=[1,84],z=[1,85],J=[1,86],Q=[1,87],Z=[1,91],et=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],tt=[1,97],nt=[1,98],it=[1,99],rt=[1,100],st=[1,102],ot=[1,103],at=[1,96],ct=[2,115],lt=[1,6,25,26,34,56,61,64,73,74,75,76,78,80,81,85,91,92,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],ht=[2,82],ut=[1,108],pt=[2,61],dt=[1,112],ft=[1,117],mt=[1,118],gt=[1,120],vt=[1,6,25,26,34,46,56,61,64,73,74,75,76,78,80,81,85,91,92,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],bt=[2,79],yt=[1,6,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],kt=[1,155],wt=[1,157],Tt=[1,152],Ct=[1,6,25,26,34,46,56,61,64,73,74,75,76,78,80,81,85,87,91,92,93,98,100,109,111,112,113,117,118,133,136,137,140,141,142,143,144,145,146,147,148,149],Ft=[2,98],Et=[1,6,25,26,34,49,56,61,64,73,74,75,76,78,80,81,85,91,92,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],Nt=[1,6,25,26,34,46,49,56,61,64,73,74,75,76,78,80,81,85,87,91,92,93,98,100,109,111,112,113,117,118,124,125,133,136,137,140,141,142,143,144,145,146,147,148,149],Lt=[1,207],xt=[1,206],St=[1,6,25,26,34,38,56,61,64,73,74,75,76,78,80,81,85,91,92,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],Dt=[2,59],Rt=[1,217],At=[6,25,26,56,61],It=[6,25,26,46,56,61,64],_t=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,136,137,143,145,146,147,148],Ot=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133],$t=[73,74,75,76,78,81,91,92],jt=[1,236],Mt=[2,136],Bt=[1,6,25,26,34,46,56,61,64,73,74,75,76,78,80,81,85,91,92,93,98,100,109,111,112,113,117,118,124,125,133,136,137,142,143,144,145,146,147,148],Vt=[1,245],Pt=[6,25,26,61,93,98],Ut=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,118,133],Gt=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,112,118,133],Ht=[124,125],qt=[61,124,125],Xt=[1,256],Wt=[6,25,26,61,85],Yt=[6,25,26,49,61,85],Kt=[6,25,26,46,49,61,85],zt=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,136,137,145,146,147,148],Jt=[11,28,30,32,33,36,37,40,41,42,43,44,52,53,54,58,59,80,83,86,90,95,96,97,103,107,108,111,113,115,117,126,132,134,135,136,137,138,140,141],Qt=[2,125],Zt=[6,25,26],en=[2,60],tn=[1,270],nn=[1,271],rn=[1,6,25,26,34,56,61,64,80,85,93,98,100,105,106,109,111,112,113,117,118,128,130,133,136,137,142,143,144,145,146,147,148],sn=[26,128,130],on=[1,6,26,34,56,61,64,80,85,93,98,100,109,112,118,133],an=[2,74],cn=[1,293],ln=[1,294],hn=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,128,133,136,137,142,143,144,145,146,147,148],un=[1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,113,117,118,133],pn=[1,305],dn=[1,306],fn=[6,25,26,61],mn=[1,6,25,26,34,56,61,64,80,85,93,98,100,105,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],gn=[25,61],vn={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,String:31,STRING:32,STRING_START:33,STRING_END:34,Regex:35,REGEX:36,REGEX_START:37,REGEX_END:38,Literal:39,JS:40,DEBUGGER:41,UNDEFINED:42,NULL:43,BOOL:44,Assignable:45,"=":46,AssignObj:47,ObjAssignable:48,":":49,SimpleObjAssignable:50,ThisProperty:51,RETURN:52,HERECOMMENT:53,PARAM_START:54,ParamList:55,PARAM_END:56,FuncGlyph:57,"->":58,"=>":59,OptComma:60,",":61,Param:62,ParamVar:63,"...":64,Array:65,Object:66,Splat:67,SimpleAssignable:68,Accessor:69,Parenthetical:70,Range:71,This:72,".":73,"?.":74,"::":75,"?::":76,Index:77,INDEX_START:78,IndexValue:79,INDEX_END:80,INDEX_SOAK:81,Slice:82,"{":83,AssignList:84,"}":85,CLASS:86,EXTENDS:87,OptFuncExist:88,Arguments:89,SUPER:90,FUNC_EXIST:91,CALL_START:92,CALL_END:93,ArgList:94,THIS:95,"@":96,"[":97,"]":98,RangeDots:99,"..":100,Arg:101,SimpleArgs:102,TRY:103,Catch:104,FINALLY:105,CATCH:106,THROW:107,"(":108,")":109,WhileSource:110,WHILE:111,WHEN:112,UNTIL:113,Loop:114,LOOP:115,ForBody:116,FOR:117,BY:118,ForStart:119,ForSource:120,ForVariables:121,OWN:122,ForValue:123,FORIN:124,FOROF:125,SWITCH:126,Whens:127,ELSE:128,When:129,LEADING_WHEN:130,IfBlock:131,IF:132,POST_IF:133,UNARY:134,UNARY_MATH:135,"-":136,"+":137,YIELD:138,FROM:139,"--":140,"++":141,"?":142,MATH:143,"**":144,SHIFT:145,COMPARE:146,LOGIC:147,RELATION:148,COMPOUND_ASSIGN:149,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",32:"STRING",33:"STRING_START",34:"STRING_END",36:"REGEX",37:"REGEX_START",38:"REGEX_END",40:"JS",41:"DEBUGGER",42:"UNDEFINED",43:"NULL",44:"BOOL",46:"=",49:":",52:"RETURN",53:"HERECOMMENT",54:"PARAM_START",56:"PARAM_END",58:"->",59:"=>",61:",",64:"...",73:".",74:"?.",75:"::",76:"?::",78:"INDEX_START",80:"INDEX_END",81:"INDEX_SOAK",83:"{",85:"}",86:"CLASS",87:"EXTENDS",90:"SUPER",91:"FUNC_EXIST",92:"CALL_START",93:"CALL_END",95:"THIS",96:"@",97:"[",98:"]",100:"..",103:"TRY",105:"FINALLY",106:"CATCH",107:"THROW",108:"(",109:")",111:"WHILE",112:"WHEN",113:"UNTIL",115:"LOOP",117:"FOR",118:"BY",122:"OWN",124:"FORIN",125:"FOROF",126:"SWITCH",128:"ELSE",130:"LEADING_WHEN",132:"IF",133:"POST_IF",134:"UNARY",135:"UNARY_MATH",136:"-",137:"+",138:"YIELD",139:"FROM",140:"--",141:"++",142:"?",143:"MATH",144:"**",145:"SHIFT",146:"COMPARE",147:"LOGIC",148:"RELATION",149:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[31,1],[31,3],[35,1],[35,3],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[16,3],[16,4],[16,5],[47,1],[47,3],[47,5],[47,3],[47,5],[47,1],[50,1],[50,1],[48,1],[48,1],[9,2],[9,1],[10,1],[14,5],[14,2],[57,1],[57,1],[60,0],[60,1],[55,0],[55,1],[55,3],[55,4],[55,6],[62,1],[62,2],[62,3],[62,1],[63,1],[63,1],[63,1],[63,1],[67,2],[68,1],[68,2],[68,2],[68,1],[45,1],[45,1],[45,1],[12,1],[12,1],[12,1],[12,1],[12,1],[69,2],[69,2],[69,2],[69,2],[69,1],[69,1],[77,3],[77,2],[79,1],[79,1],[66,4],[84,0],[84,1],[84,3],[84,4],[84,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[88,0],[88,1],[89,2],[89,4],[72,1],[72,1],[51,2],[65,2],[65,4],[99,1],[99,1],[71,5],[82,3],[82,2],[82,2],[82,1],[94,1],[94,3],[94,4],[94,4],[94,6],[101,1],[101,1],[101,1],[102,1],[102,3],[18,2],[18,3],[18,4],[18,5],[104,3],[104,3],[104,2],[23,2],[70,3],[70,5],[110,2],[110,4],[110,2],[110,4],[19,2],[19,2],[19,2],[19,1],[114,2],[114,2],[20,2],[20,2],[20,2],[116,2],[116,4],[116,2],[119,2],[119,3],[123,1],[123,1],[123,1],[123,1],[121,1],[121,3],[120,2],[120,2],[120,4],[120,4],[120,4],[120,6],[120,6],[21,5],[21,7],[21,4],[21,6],[127,1],[127,2],[129,3],[129,4],[131,3],[131,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,i,r,s,o){var a=s.length-1;
-switch(r){case 1:return this.$=i.addLocationDataFn(o[a],o[a])(new i.Block);case 2:return this.$=s[a];case 3:this.$=i.addLocationDataFn(o[a],o[a])(i.Block.wrap([s[a]]));break;case 4:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].push(s[a]));break;case 5:this.$=s[a-1];break;case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 27:case 32:case 34:case 47:case 48:case 49:case 50:case 51:case 59:case 60:case 70:case 71:case 72:case 73:case 78:case 79:case 82:case 86:case 92:case 136:case 137:case 139:case 169:case 170:case 186:case 192:this.$=s[a];break;case 10:case 25:case 26:case 28:case 30:case 33:case 35:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(s[a]));break;case 23:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Block);break;case 24:case 31:case 93:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-1]);break;case 29:case 149:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Parens(s[a-1]));break;case 36:this.$=i.addLocationDataFn(o[a],o[a])(new i.Undefined);break;case 37:this.$=i.addLocationDataFn(o[a],o[a])(new i.Null);break;case 38:this.$=i.addLocationDataFn(o[a],o[a])(new i.Bool(s[a]));break;case 39:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a]));break;case 40:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a]));break;case 41:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1]));break;case 42:case 75:case 80:case 81:case 83:case 84:case 85:case 171:case 172:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(s[a]));break;case 43:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),s[a],"object",{operatorToken:i.addLocationDataFn(o[a-1])(new i.Literal(s[a-1]))}));break;case 44:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(s[a-4])),s[a-1],"object",{operatorToken:i.addLocationDataFn(o[a-3])(new i.Literal(s[a-3]))}));break;case 45:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),s[a],null,{operatorToken:i.addLocationDataFn(o[a-1])(new i.Literal(s[a-1]))}));break;case 46:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(s[a-4])),s[a-1],null,{operatorToken:i.addLocationDataFn(o[a-3])(new i.Literal(s[a-3]))}));break;case 52:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Return(s[a]));break;case 53:this.$=i.addLocationDataFn(o[a],o[a])(new i.Return);break;case 54:this.$=i.addLocationDataFn(o[a],o[a])(new i.Comment(s[a]));break;case 55:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Code(s[a-3],s[a],s[a-1]));break;case 56:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Code([],s[a],s[a-1]));break;case 57:this.$=i.addLocationDataFn(o[a],o[a])("func");break;case 58:this.$=i.addLocationDataFn(o[a],o[a])("boundfunc");break;case 61:case 98:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 62:case 99:case 131:case 173:this.$=i.addLocationDataFn(o[a],o[a])([s[a]]);break;case 63:case 100:case 132:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].concat(s[a]));break;case 64:case 101:case 133:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-3].concat(s[a]));break;case 65:case 102:case 135:this.$=i.addLocationDataFn(o[a-5],o[a])(s[a-5].concat(s[a-2]));break;case 66:this.$=i.addLocationDataFn(o[a],o[a])(new i.Param(s[a]));break;case 67:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Param(s[a-1],null,!0));break;case 68:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Param(s[a-2],s[a]));break;case 69:case 138:this.$=i.addLocationDataFn(o[a],o[a])(new i.Expansion);break;case 74:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Splat(s[a-1]));break;case 76:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].add(s[a]));break;case 77:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(s[a-1],[].concat(s[a])));break;case 87:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a]));break;case 88:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a],"soak"));break;case 89:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"))),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 90:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"),"soak")),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 91:this.$=i.addLocationDataFn(o[a],o[a])(new i.Access(new i.Literal("prototype")));break;case 94:this.$=i.addLocationDataFn(o[a-1],o[a])(i.extend(s[a],{soak:!0}));break;case 95:this.$=i.addLocationDataFn(o[a],o[a])(new i.Index(s[a]));break;case 96:this.$=i.addLocationDataFn(o[a],o[a])(new i.Slice(s[a]));break;case 97:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Obj(s[a-2],s[a-3].generated));break;case 103:this.$=i.addLocationDataFn(o[a],o[a])(new i.Class);break;case 104:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(null,null,s[a]));break;case 105:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(null,s[a]));break;case 106:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(null,s[a-1],s[a]));break;case 107:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(s[a]));break;case 108:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(s[a-1],null,s[a]));break;case 109:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(s[a-2],s[a]));break;case 110:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Class(s[a-3],s[a-1],s[a]));break;case 111:case 112:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(s[a-2],s[a],s[a-1]));break;case 113:this.$=i.addLocationDataFn(o[a],o[a])(new i.Call("super",[new i.Splat(new i.Literal("arguments"))]));break;case 114:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Call("super",s[a]));break;case 115:this.$=i.addLocationDataFn(o[a],o[a])(!1);break;case 116:this.$=i.addLocationDataFn(o[a],o[a])(!0);break;case 117:this.$=i.addLocationDataFn(o[a-1],o[a])([]);break;case 118:case 134:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-2]);break;case 119:case 120:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(new i.Literal("this")));break;case 121:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(i.addLocationDataFn(o[a-1])(new i.Literal("this")),[i.addLocationDataFn(o[a])(new i.Access(s[a]))],"this"));break;case 122:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Arr([]));break;case 123:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Arr(s[a-2]));break;case 124:this.$=i.addLocationDataFn(o[a],o[a])("inclusive");break;case 125:this.$=i.addLocationDataFn(o[a],o[a])("exclusive");break;case 126:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Range(s[a-3],s[a-1],s[a-2]));break;case 127:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Range(s[a-2],s[a],s[a-1]));break;case 128:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(s[a-1],null,s[a]));break;case 129:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(null,s[a],s[a-1]));break;case 130:this.$=i.addLocationDataFn(o[a],o[a])(new i.Range(null,null,s[a]));break;case 140:this.$=i.addLocationDataFn(o[a-2],o[a])([].concat(s[a-2],s[a]));break;case 141:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Try(s[a]));break;case 142:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Try(s[a-1],s[a][0],s[a][1]));break;case 143:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Try(s[a-2],null,null,s[a]));break;case 144:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Try(s[a-3],s[a-2][0],s[a-2][1],s[a]));break;case 145:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-1],s[a]]);break;case 146:this.$=i.addLocationDataFn(o[a-2],o[a])([i.addLocationDataFn(o[a-1])(new i.Value(s[a-1])),s[a]]);break;case 147:this.$=i.addLocationDataFn(o[a-1],o[a])([null,s[a]]);break;case 148:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Throw(s[a]));break;case 150:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Parens(s[a-2]));break;case 151:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a]));break;case 152:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{guard:s[a]}));break;case 153:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a],{invert:!0}));break;case 154:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{invert:!0,guard:s[a]}));break;case 155:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].addBody(s[a]));break;case 156:case 157:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([s[a-1]]))));break;case 158:this.$=i.addLocationDataFn(o[a],o[a])(s[a]);break;case 159:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(s[a]));break;case 160:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(i.addLocationDataFn(o[a])(i.Block.wrap([s[a]]))));break;case 161:case 162:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a-1],s[a]));break;case 163:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a],s[a-1]));break;case 164:this.$=i.addLocationDataFn(o[a-1],o[a])({source:i.addLocationDataFn(o[a])(new i.Value(s[a]))});break;case 165:this.$=i.addLocationDataFn(o[a-3],o[a])({source:i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),step:s[a]});break;case 166:this.$=i.addLocationDataFn(o[a-1],o[a])(function(){return s[a].own=s[a-1].own,s[a].name=s[a-1][0],s[a].index=s[a-1][1],s[a]}());break;case 167:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a]);break;case 168:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return s[a].own=!0,s[a]}());break;case 174:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-2],s[a]]);break;case 175:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a]});break;case 176:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a],object:!0});break;case 177:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a]});break;case 178:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a],object:!0});break;case 179:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],step:s[a]});break;case 180:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],guard:s[a-2],step:s[a]});break;case 181:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],step:s[a-2],guard:s[a]});break;case 182:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Switch(s[a-3],s[a-1]));break;case 183:this.$=i.addLocationDataFn(o[a-6],o[a])(new i.Switch(s[a-5],s[a-3],s[a-1]));break;case 184:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Switch(null,s[a-1]));break;case 185:this.$=i.addLocationDataFn(o[a-5],o[a])(new i.Switch(null,s[a-3],s[a-1]));break;case 187:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].concat(s[a]));break;case 188:this.$=i.addLocationDataFn(o[a-2],o[a])([[s[a-1],s[a]]]);break;case 189:this.$=i.addLocationDataFn(o[a-3],o[a])([[s[a-2],s[a-1]]]);break;case 190:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}));break;case 191:this.$=i.addLocationDataFn(o[a-4],o[a])(s[a-4].addElse(i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}))));break;case 193:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].addElse(s[a]));break;case 194:case 195:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([s[a-2]])),{type:s[a-1],statement:!0}));break;case 196:case 197:case 200:case 201:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op(s[a-1],s[a]));break;case 198:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("-",s[a]));break;case 199:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("+",s[a]));break;case 202:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-2].concat(s[a-1]),s[a]));break;case 203:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a]));break;case 204:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a]));break;case 205:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a-1],null,!0));break;case 206:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a-1],null,!0));break;case 207:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Existence(s[a-1]));break;case 208:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("+",s[a-2],s[a]));break;case 209:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("-",s[a-2],s[a]));break;case 210:case 211:case 212:case 213:case 214:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-1],s[a-2],s[a]));break;case 215:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return"!"===s[a-1].charAt(0)?new i.Op(s[a-1].slice(1),s[a-2],s[a]).invert():new i.Op(s[a-1],s[a-2],s[a])}());break;case 216:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a],s[a-1]));break;case 217:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1],s[a-3]));break;case 218:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a],s[a-2]));break;case 219:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Extends(s[a-2],s[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{1:[3]},{1:[2,2],6:P},t(U,[2,3]),t(U,[2,6],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(U,[2,7],{119:69,110:92,116:93,111:x,113:S,117:R,133:Z}),t(et,[2,11],{88:94,69:95,77:101,73:tt,74:nt,75:it,76:rt,78:st,81:ot,91:at,92:ct}),t(et,[2,12],{77:101,88:104,69:105,73:tt,74:nt,75:it,76:rt,78:st,81:ot,91:at,92:ct}),t(et,[2,13]),t(et,[2,14]),t(et,[2,15]),t(et,[2,16]),t(et,[2,17]),t(et,[2,18]),t(et,[2,19]),t(et,[2,20]),t(et,[2,21]),t(et,[2,22]),t(et,[2,8]),t(et,[2,9]),t(et,[2,10]),t(lt,ht,{46:[1,106]}),t(lt,[2,83]),t(lt,[2,84]),t(lt,[2,85]),t(lt,[2,86]),t([1,6,25,26,34,38,56,61,64,73,74,75,76,78,80,81,85,91,93,98,100,109,111,112,113,117,118,133,136,137,142,143,144,145,146,147,148],[2,113],{89:107,92:ut}),t([6,25,56,61],pt,{55:109,62:110,63:111,27:113,51:114,65:115,66:116,28:i,64:dt,83:y,96:ft,97:mt}),{24:119,25:gt},{7:121,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:123,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:124,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:125,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:127,8:126,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,139:[1,128],140:B,141:V},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:132,51:63,65:47,66:48,68:129,70:23,71:24,72:25,83:y,90:w,95:T,96:C,97:F,108:L},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:132,51:63,65:47,66:48,68:133,70:23,71:24,72:25,83:y,90:w,95:T,96:C,97:F,108:L},t(vt,bt,{87:[1,137],140:[1,134],141:[1,135],149:[1,136]}),t(et,[2,192],{128:[1,138]}),{24:139,25:gt},{24:140,25:gt},t(et,[2,158]),{24:141,25:gt},{7:142,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(yt,[2,103],{39:22,70:23,71:24,72:25,65:47,66:48,29:49,35:51,27:62,51:63,31:72,12:130,13:131,45:132,24:144,68:146,25:gt,28:i,30:r,32:s,33:o,36:a,37:c,40:l,41:h,42:u,43:p,44:d,83:y,87:[1,145],90:w,95:T,96:C,97:F,108:L}),{7:147,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,142,143,144,145,146,147,148],[2,53],{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,70:23,71:24,72:25,57:28,68:36,131:37,110:39,114:40,116:41,65:47,66:48,29:49,35:51,27:62,51:63,119:69,31:72,8:122,7:148,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:l,41:h,42:u,43:p,44:d,52:f,53:m,54:g,58:v,59:b,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,115:D,126:A,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V}),t(et,[2,54]),t(vt,[2,80]),t(vt,[2,81]),t(lt,[2,32]),t(lt,[2,33]),t(lt,[2,34]),t(lt,[2,35]),t(lt,[2,36]),t(lt,[2,37]),t(lt,[2,38]),{4:149,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,150],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:151,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,94:153,95:T,96:C,97:F,98:Tt,101:154,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(lt,[2,119]),t(lt,[2,120],{27:158,28:i}),{25:[2,57]},{25:[2,58]},t(Ct,[2,75]),t(Ct,[2,78]),{7:159,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:160,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:161,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:163,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:162,25:gt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{27:168,28:i,51:169,65:170,66:171,71:164,83:y,96:ft,97:F,121:165,122:[1,166],123:167},{120:172,124:[1,173],125:[1,174]},t([6,25,61,85],Ft,{31:72,84:175,47:176,48:177,50:178,10:179,29:180,27:181,51:182,28:i,30:r,32:s,33:o,53:m,96:ft}),t(Et,[2,26]),t(Et,[2,27]),t(lt,[2,30]),{12:130,13:183,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:132,51:63,65:47,66:48,68:184,70:23,71:24,72:25,83:y,90:w,95:T,96:C,97:F,108:L},t(Nt,[2,25]),t(Et,[2,28]),{4:185,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(U,[2,5],{7:4,8:5,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,70:23,71:24,72:25,57:28,68:36,131:37,110:39,114:40,116:41,65:47,66:48,29:49,35:51,27:62,51:63,119:69,31:72,5:186,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:l,41:h,42:u,43:p,44:d,52:f,53:m,54:g,58:v,59:b,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,111:x,113:S,115:D,117:R,126:A,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V}),t(et,[2,207]),{7:187,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:188,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:189,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:190,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:191,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:192,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:193,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:194,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:195,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,157]),t(et,[2,162]),{7:196,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,156]),t(et,[2,161]),{89:197,92:ut},t(Ct,[2,76]),{92:[2,116]},{27:198,28:i},{27:199,28:i},t(Ct,[2,91],{27:200,28:i}),{27:201,28:i},t(Ct,[2,92]),{7:203,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:Lt,65:47,66:48,68:36,70:23,71:24,72:25,79:202,82:204,83:y,86:k,90:w,95:T,96:C,97:F,99:205,100:xt,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{77:208,78:st,81:ot},{89:209,92:ut},t(Ct,[2,77]),{6:[1,211],7:210,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,212],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(St,[2,114]),{7:215,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,93:[1,213],94:214,95:T,96:C,97:F,101:154,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([6,25],Dt,{60:218,56:[1,216],61:Rt}),t(At,[2,62]),t(At,[2,66],{46:[1,220],64:[1,219]}),t(At,[2,69]),t(It,[2,70]),t(It,[2,71]),t(It,[2,72]),t(It,[2,73]),{27:158,28:i},{7:215,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,94:153,95:T,96:C,97:F,98:Tt,101:154,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,56]),{4:222,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,221],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,136,137,143,144,145,146,147,148],[2,196],{119:69,110:89,116:90,142:X}),{110:92,111:x,113:S,116:93,117:R,119:69,133:Z},t(_t,[2,197],{119:69,110:89,116:90,142:X,144:Y}),t(_t,[2,198],{119:69,110:89,116:90,142:X,144:Y}),t(_t,[2,199],{119:69,110:89,116:90,142:X,144:Y}),t(et,[2,200],{119:69,110:92,116:93}),t(Ot,[2,201],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{7:223,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,203],{73:bt,74:bt,75:bt,76:bt,78:bt,81:bt,91:bt,92:bt}),{69:95,73:tt,74:nt,75:it,76:rt,77:101,78:st,81:ot,88:94,91:at,92:ct},{69:105,73:tt,74:nt,75:it,76:rt,77:101,78:st,81:ot,88:104,91:at,92:ct},t($t,ht),t(et,[2,204],{73:bt,74:bt,75:bt,76:bt,78:bt,81:bt,91:bt,92:bt}),t(et,[2,205]),t(et,[2,206]),{6:[1,226],7:224,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,225],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:227,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{24:228,25:gt,132:[1,229]},t(et,[2,141],{104:230,105:[1,231],106:[1,232]}),t(et,[2,155]),t(et,[2,163]),{25:[1,233],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{127:234,129:235,130:jt},t(et,[2,104]),{7:237,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(yt,[2,107],{24:238,25:gt,73:bt,74:bt,75:bt,76:bt,78:bt,81:bt,91:bt,92:bt,87:[1,239]}),t(Ot,[2,148],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ot,[2,52],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{6:P,109:[1,240]},{4:241,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([6,25,61,98],Mt,{119:69,110:89,116:90,99:242,64:[1,243],100:xt,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Bt,[2,122]),t([6,25,98],Dt,{60:244,61:Vt}),t(Pt,[2,131]),{7:215,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,94:246,95:T,96:C,97:F,101:154,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Pt,[2,137]),t(Pt,[2,138]),t(Nt,[2,121]),{24:247,25:gt,110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},t(Ut,[2,151],{119:69,110:89,116:90,111:x,112:[1,248],113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ut,[2,153],{119:69,110:89,116:90,111:x,112:[1,249],113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(et,[2,159]),t(Gt,[2,160],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,133,136,137,142,143,144,145,146,147,148],[2,164],{118:[1,250]}),t(Ht,[2,167]),{27:168,28:i,51:169,65:170,66:171,83:y,96:ft,97:mt,121:251,123:167},t(Ht,[2,173],{61:[1,252]}),t(qt,[2,169]),t(qt,[2,170]),t(qt,[2,171]),t(qt,[2,172]),t(et,[2,166]),{7:253,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:254,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([6,25,85],Dt,{60:255,61:Xt}),t(Wt,[2,99]),t(Wt,[2,42],{49:[1,257]}),t(Yt,[2,50],{46:[1,258]}),t(Wt,[2,47]),t(Yt,[2,51]),t(Kt,[2,48]),t(Kt,[2,49]),{38:[1,259],69:105,73:tt,74:nt,75:it,76:rt,77:101,78:st,81:ot,88:104,91:at,92:ct},t($t,bt),{6:P,34:[1,260]},t(U,[2,4]),t(zt,[2,208],{119:69,110:89,116:90,142:X,143:W,144:Y}),t(zt,[2,209],{119:69,110:89,116:90,142:X,143:W,144:Y}),t(_t,[2,210],{119:69,110:89,116:90,142:X,144:Y}),t(_t,[2,211],{119:69,110:89,116:90,142:X,144:Y}),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,145,146,147,148],[2,212],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y}),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,146,147],[2,213],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,148:Q}),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,147],[2,214],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,148:Q}),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,118,133,146,147,148],[2,215],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K}),t(Gt,[2,195],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Gt,[2,194],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(St,[2,111]),t(Ct,[2,87]),t(Ct,[2,88]),t(Ct,[2,89]),t(Ct,[2,90]),{80:[1,261]},{64:Lt,80:[2,95],99:262,100:xt,110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{80:[2,96]},{7:263,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,80:[2,130],83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Jt,[2,124]),t(Jt,Qt),t(Ct,[2,94]),t(St,[2,112]),t(Ot,[2,39],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{7:264,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:265,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(St,[2,117]),t([6,25,93],Dt,{60:266,61:Vt}),t(Pt,Mt,{119:69,110:89,116:90,64:[1,267],111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{57:268,58:v,59:b},t(Zt,en,{63:111,27:113,51:114,65:115,66:116,62:269,28:i,64:dt,83:y,96:ft,97:mt}),{6:tn,25:nn},t(At,[2,67]),{7:272,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(rn,[2,23]),{6:P,26:[1,273]},t(Ot,[2,202],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ot,[2,216],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{7:274,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:275,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Ot,[2,219],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(et,[2,193]),{7:276,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,142],{105:[1,277]}),{24:278,25:gt},{24:281,25:gt,27:279,28:i,66:280,83:y},{127:282,129:235,130:jt},{26:[1,283],128:[1,284],129:285,130:jt},t(sn,[2,186]),{7:287,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,102:286,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(on,[2,105],{119:69,110:89,116:90,24:288,25:gt,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(et,[2,108]),{7:289,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(lt,[2,149]),{6:P,26:[1,290]},{7:291,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t([11,28,30,32,33,36,37,40,41,42,43,44,52,53,54,58,59,83,86,90,95,96,97,103,107,108,111,113,115,117,126,132,134,135,136,137,138,140,141],Qt,{6:an,25:an,61:an,98:an}),{6:cn,25:ln,98:[1,292]},t([6,25,26,93,98],en,{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,70:23,71:24,72:25,57:28,68:36,131:37,110:39,114:40,116:41,65:47,66:48,29:49,35:51,27:62,51:63,119:69,31:72,8:122,67:156,7:215,101:295,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:l,41:h,42:u,43:p,44:d,52:f,53:m,54:g,58:v,59:b,64:wt,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,111:x,113:S,115:D,117:R,126:A,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V}),t(Zt,Dt,{60:296,61:Vt}),t(hn,[2,190]),{7:297,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:298,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:299,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Ht,[2,168]),{27:168,28:i,51:169,65:170,66:171,83:y,96:ft,97:mt,123:300},t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,113,117,133],[2,175],{119:69,110:89,116:90,112:[1,301],118:[1,302],136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(un,[2,176],{119:69,110:89,116:90,112:[1,303],136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{6:pn,25:dn,85:[1,304]},t([6,25,26,85],en,{31:72,48:177,50:178,10:179,29:180,27:181,51:182,47:307,28:i,30:r,32:s,33:o,53:m,96:ft}),{7:308,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,309],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:310,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,311],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(lt,[2,31]),t(Et,[2,29]),t(Ct,[2,93]),{7:312,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,80:[2,128],83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{80:[2,129],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},t(Ot,[2,40],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{26:[1,313],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{6:cn,25:ln,93:[1,314]},t(Pt,an),{24:315,25:gt},t(At,[2,63]),{27:113,28:i,51:114,62:316,63:111,64:dt,65:115,66:116,83:y,96:ft,97:mt},t(fn,pt,{62:110,63:111,27:113,51:114,65:115,66:116,55:317,28:i,64:dt,83:y,96:ft,97:mt}),t(At,[2,68],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(rn,[2,24]),{26:[1,318],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},t(Ot,[2,218],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{24:319,25:gt,110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{24:320,25:gt},t(et,[2,143]),{24:321,25:gt},{24:322,25:gt},t(mn,[2,147]),{26:[1,323],128:[1,324],129:285,130:jt},t(et,[2,184]),{24:325,25:gt},t(sn,[2,187]),{24:326,25:gt,61:[1,327]},t(gn,[2,139],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(et,[2,106]),t(on,[2,109],{119:69,110:89,116:90,24:328,25:gt,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{109:[1,329]},{98:[1,330],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},t(Bt,[2,123]),{7:215,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,101:331,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:215,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,64:wt,65:47,66:48,67:156,68:36,70:23,71:24,72:25,83:y,86:k,90:w,94:332,95:T,96:C,97:F,101:154,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Pt,[2,132]),{6:cn,25:ln,26:[1,333]},t(Gt,[2,152],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Gt,[2,154],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Gt,[2,165],{119:69,110:89,116:90,111:x,113:S,117:R,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ht,[2,174]),{7:334,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:335,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:336,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Bt,[2,97]),{10:179,27:181,28:i,29:180,30:r,31:72,32:s,33:o,47:337,48:177,50:178,51:182,53:m,96:ft},t(fn,Ft,{31:72,47:176,48:177,50:178,10:179,29:180,27:181,51:182,84:338,28:i,30:r,32:s,33:o,53:m,96:ft}),t(Wt,[2,100]),t(Wt,[2,43],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{7:339,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(Wt,[2,45],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{7:340,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{80:[2,127],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},t(et,[2,41]),t(St,[2,118]),t(et,[2,55]),t(At,[2,64]),t(Zt,Dt,{60:341,61:Rt}),t(et,[2,217]),t(hn,[2,191]),t(et,[2,144]),t(mn,[2,145]),t(mn,[2,146]),t(et,[2,182]),{24:342,25:gt},{26:[1,343]},t(sn,[2,188],{6:[1,344]}),{7:345,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},t(et,[2,110]),t(lt,[2,150]),t(lt,[2,126]),t(Pt,[2,133]),t(Zt,Dt,{60:346,61:Vt}),t(Pt,[2,134]),t([1,6,25,26,34,56,61,64,80,85,93,98,100,109,111,112,113,117,133],[2,177],{119:69,110:89,116:90,118:[1,347],136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(un,[2,179],{119:69,110:89,116:90,112:[1,348],136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ot,[2,178],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Wt,[2,101]),t(Zt,Dt,{60:349,61:Xt}),{26:[1,350],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{26:[1,351],110:89,111:x,113:S,116:90,117:R,119:69,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q},{6:tn,25:nn,26:[1,352]},{26:[1,353]},t(et,[2,185]),t(sn,[2,189]),t(gn,[2,140],{119:69,110:89,116:90,111:x,113:S,117:R,133:G,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),{6:cn,25:ln,26:[1,354]},{7:355,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{7:356,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:l,41:h,42:u,43:p,44:d,45:21,51:63,52:f,53:m,54:g,57:28,58:v,59:b,65:47,66:48,68:36,70:23,71:24,72:25,83:y,86:k,90:w,95:T,96:C,97:F,103:E,107:N,108:L,110:39,111:x,113:S,114:40,115:D,116:41,117:R,119:69,126:A,131:37,132:I,134:_,135:O,136:$,137:j,138:M,140:B,141:V},{6:pn,25:dn,26:[1,357]},t(Wt,[2,44]),t(Wt,[2,46]),t(At,[2,65]),t(et,[2,183]),t(Pt,[2,135]),t(Ot,[2,180],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Ot,[2,181],{119:69,110:89,116:90,136:H,137:q,142:X,143:W,144:Y,145:K,146:z,147:J,148:Q}),t(Wt,[2,102])],defaultActions:{60:[2,57],61:[2,58],96:[2,116],204:[2,96]},parseError:function(e,t){if(!t.recoverable)throw Error(e);
-this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||p,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],r=[null],s=[],o=this.table,a="",c=0,l=0,h=0,u=2,p=1,d=s.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,f.yylloc===void 0&&(f.yylloc={});var v=f.yylloc;s.push(v);var b=f.options&&f.options.ranges;this.parseError="function"==typeof m.yy.parseError?m.yy.parseError:Object.getPrototypeOf(this).parseError;for(var y,k,w,T,C,F,E,N,L,x={};;){if(w=i[i.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((null===y||y===void 0)&&(y=t()),T=o[w]&&o[w][y]),T===void 0||!T.length||!T[0]){var S="";L=[];for(F in o[w])this.terminals_[F]&&F>u&&L.push("'"+this.terminals_[F]+"'");S=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(c+1)+": Unexpected "+(y==p?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(S,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:v,expected:L})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+y);switch(T[0]){case 1:i.push(y),r.push(f.yytext),s.push(f.yylloc),i.push(T[1]),y=null,k?(y=k,k=null):(l=f.yyleng,a=f.yytext,c=f.yylineno,v=f.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[T[1]][1],x.$=r[r.length-E],x._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(x._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),C=this.performAction.apply(x,[a,l,c,m.yy,T[1],r,s].concat(d)),C!==void 0)return C;E&&(i=i.slice(0,2*-1*E),r=r.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[T[1]][0]),r.push(x.$),s.push(x._$),N=o[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0}};return e.prototype=vn,vn.Parser=e,new e}();return require!==void 0&&e!==void 0&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=require("fs").readFileSync(require("path").normalize(t[1]),"utf8");return e.parser.parse(n)},t!==void 0&&require.main===t&&e.main(process.argv.slice(1))),t.exports}(),require["./scope"]=function(){var e={},t={exports:e};return function(){var t,n=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e.Scope=t=function(){function e(e,t,n,i){var r,s;this.parent=e,this.expressions=t,this.method=n,this.referencedVars=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(this.utilities={}),this.root=null!=(r=null!=(s=this.parent)?s.root:void 0)?r:this}return e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return(null!=(e=this.method)?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){return this.shared&&this.parent.check(e,!0)?void 0:this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||(null!=(t=this.parent)?t.check(e):void 0))},e.prototype.temporary=function(e,t,n){return null==n&&(n=!1),n?(t+parseInt(e,36)).toString(36).replace(/\d/g,"a"):e+(t||"")},e.prototype.type=function(e){var t,n,i,r;for(i=this.variables,t=0,n=i.length;n>t;t++)if(r=i[t],r.name===e)return r.type;return null},e.prototype.freeVariable=function(e,t){var i,r,s;for(null==t&&(t={}),i=0;;){if(s=this.temporary(e,i,t.single),!(this.check(s)||n.call(this.root.referencedVars,s)>=0))break;i++}return(null!=(r=t.reserve)?r:!0)&&this.add(s,"var",!0),s},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;return function(){var t,n,i,r;for(i=this.variables,r=[],t=0,n=i.length;n>t;t++)e=i[t],"var"===e.type&&r.push(e.name);return r}.call(this).sort()},e.prototype.assignedVariables=function(){var e,t,n,i,r;for(n=this.variables,i=[],e=0,t=n.length;t>e;e++)r=n[e],r.type.assigned&&i.push(r.name+" = "+r.type.value);return i},e}()}.call(this),t.exports}(),require["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,l,h,u,p,d,f,m,g,v,b,y,k,w,T,C,F,E,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,lt,ht,ut,pt,dt,ft,mt,gt,vt,bt,yt,kt=function(e,t){function n(){this.constructor=e}for(var i in t)wt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},wt={}.hasOwnProperty,Tt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},Ct=[].slice;Error.stackTraceLimit=1/0,P=require("./scope").Scope,dt=require("./lexer"),$=dt.RESERVED,V=dt.STRICT_PROSCRIBED,ft=require("./helpers"),et=ft.compact,rt=ft.flatten,it=ft.extend,ht=ft.merge,tt=ft.del,gt=ft.starts,nt=ft.ends,mt=ft.some,Z=ft.addLocationDataFn,lt=ft.locationDataToString,vt=ft.throwSyntaxError,e.extend=it,e.addLocationDataFn=Z,Q=function(){return!0},D=function(){return!1},X=function(){return this},S=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?": "+lt(this.locationData):"")},e}(),st=function(e){var t;return function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.code);return r}().join("")},e.Base=r=function(){function e(){}return e.prototype.compile=function(e,t){return st(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=it({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==L&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var n,i,r,a,l,h,u;return(a=this.jumps())&&a.error("cannot use a pure statement in an expression"),e.sharedScope=!0,r=new c([],s.wrap([this])),n=[],((i=this.contains(at))||this.contains(ct))&&(n=[new x("this")],i?(l="apply",n.push(new x("arguments"))):l="call",r=new z(r,[new t(new x(l))])),h=new o(r,n).compileNode(e),(r.isGenerator||(null!=(u=r.base)?u.isGenerator:void 0))&&(h.unshift(this.makeCode("(yield* ")),h.push(this.makeCode(")"))),h},e.prototype.cache=function(e,t,n){var r,s,o;return r=null!=n?n(this):this.isComplex(),r?(s=new x(e.scope.freeVariable("ref")),o=new i(s,this),t?[o.compileToFragments(e,t),[this.makeCode(s.value)]]:[o,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 M(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 h))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+q)}),n},e.prototype.eachChild=function(e){var t,n,i,r,s,o,a,c;if(!this.children)return this;for(a=this.children,i=0,s=a.length;s>i;i++)if(t=a[i],this[t])for(c=rt([this[t]]),r=0,o=c.length;o>r;r++)if(n=c[r],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var i;return i=t(n),i!==!1?n.traverseChildren(e,t):void 0})},e.prototype.invert=function(){return new I("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=D,e.prototype.jumps=D,e.prototype.isComplex=Q,e.prototype.isChainable=D,e.prototype.isAssignable=D,e.prototype.unwrap=X,e.prototype.unfoldSoak=D,e.prototype.assigns=D,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return vt(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,r,s,o;for(n=[],r=s=0,o=e.length;o>s;r=++s)i=e[r],r&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=s=function(e){function t(e){this.expressions=et(rt(e||[]))}return kt(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,i,r;for(r=this.expressions,n=0,i=r.length;i>n;n++)if(t=r[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,r,s;for(s=this.expressions,n=0,r=s.length;r>n;n++)if(t=s[n],i=t.jumps(e))return i},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof h)){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,r,s,o,a,c,l,h;for(this.tab=e.indent,h=e.level===L,i=[],l=this.expressions,s=o=0,a=l.length;a>o;s=++o)c=l[s],c=c.unwrapAll(),c=c.unfoldSoak(e)||c,c instanceof t?i.push(c.compileNode(e)):h?(c.front=!0,r=c.compileToFragments(e),c.isStatement(e)||(r.unshift(this.makeCode(""+this.tab)),r.push(this.makeCode(";"))),i.push(r)):i.push(c.compileToFragments(e,F));return h?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>=F?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,r,s,o,a,c,l,u,p;for(e.indent=e.bare?"":q,e.level=L,this.spaced=!0,e.scope=new P(null,this,null,null!=(l=e.referencedVars)?l:[]),u=e.locals||[],r=0,s=u.length;s>r;r++)o=u[r],e.scope.parameter(o);return a=[],e.bare||(c=function(){var e,n,r,s;for(r=this.expressions,s=[],i=e=0,n=r.length;n>e&&(t=r[i],t.unwrap()instanceof h);i=++e)s.push(t);return s}.call(this),p=this.expressions.slice(c.length),this.expressions=c,c.length&&(a=this.compileNode(ht(e,{indent:""})),a.push(this.makeCode("\n"))),this.expressions=p),n=this.compileWithDeclarations(e),e.bare?n:[].concat(a,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,r,s,o,a,c,l,u,p,d,f,m;for(r=[],c=[],l=this.expressions,s=o=0,a=l.length;a>o&&(i=l[s],i=i.unwrap(),i instanceof h||i instanceof x);s=++o);return e=ht(e,{level:L}),s&&(d=this.expressions.splice(s,9e9),u=[this.spaced,!1],m=u[0],this.spaced=u[1],p=[this.compileNode(e),m],r=p[0],this.spaced=p[1],this.expressions=d),c=this.compileNode(e),f=e.scope,f.expressions===this&&(n=e.scope.hasDeclarations(),t=f.hasAssignments,n||t?(s&&r.push(this.makeCode("\n")),r.push(this.makeCode(this.tab+"var ")),n&&r.push(this.makeCode(f.declaredVariables().join(", "))),t&&(n&&r.push(this.makeCode(",\n"+(this.tab+q))),r.push(this.makeCode(f.assignedVariables().join(",\n"+(this.tab+q))))),r.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):r.length&&c.length&&r.push(this.makeCode("\n"))),r.concat(c)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(r),e.Literal=x=function(e){function t(e){this.value=e}return kt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=D,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){return"break"!==this.value||(null!=e?e.loop:void 0)||(null!=e?e.block:void 0)?"continue"!==this.value||(null!=e?e.loop:void 0)?void 0:this:this},t.prototype.compileNode=function(e){var t,n,i;return n="this"===this.value?(null!=(i=e.scope.method)?i.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(r),e.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=T?"(void 0)":"void 0")]},t}(r),e.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(r),e.Bool=function(e){function t(e){this.val=e}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(r),e.Return=M=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.jumps=X,t.prototype.compileToFragments=function(e,n){var i,r;return i=null!=(r=this.expression)?r.makeReturn():void 0,!i||i instanceof t?t.__super__.compileToFragments.call(this,e,n):i.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t,n,i;return t=[],n=null!=(i=this.expression)?"function"==typeof i.isYieldReturn?i.isYieldReturn():void 0:void 0,n||t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,N))),n||t.push(this.makeCode(";")),t},t}(r),e.Value=z=function(e){function t(e,n,i){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],i&&(this[i]=!0),this)}return kt(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(n)},t.prototype.isRange=function(){return this.bareLiteral(j)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.bareLiteral(x)&&B.test(this.base.value)},t.prototype.isString=function(){return this.bareLiteral(x)&&b.test(this.base.value)},t.prototype.isRegex=function(){return this.bareLiteral(x)&&v.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,i;for(i=this.properties.concat(this.base),e=0,t=i.length;t>e;e++)if(n=i[e],n.soak||n instanceof o)return!1;return!0},t.prototype.isNotCallable=function(){return this.isSimpleNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof A&&(!e||this.base.generated)},t.prototype.isSplice=function(){var e,t;return t=this.properties,e=t[t.length-1],e instanceof U},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&1===this.properties.length&&"prototype"!==(null!=(t=this.properties[0].name)?t.value:void 0)},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,s,o,a;return a=this.properties,s=a[a.length-1],2>this.properties.length&&!this.base.isComplex()&&!(null!=s?s.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new x(e.scope.freeVariable("base")),n=new t(new O(new i(r,n)))),s?(s.isComplex()&&(o=new x(e.scope.freeVariable("name")),s=new w(new i(o,s.index)),o=new w(o)),[n.add(s),new t(r||n.base,[o||s])]):[n,r])},t.prototype.compileNode=function(e){var t,n,i,r,s;for(this.base.front=this.front,s=this.properties,t=this.base.compileToFragments(e,s.length?T:null),(this.base instanceof O||s.length)&&B.test(st(t))&&t.push(this.makeCode(".")),n=0,i=s.length;i>n;n++)r=s[n],t.push.apply(t,r.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,s,o,a,c,l,h,p,d,f;if(o=n.base.unfoldSoak(e))return(p=o.body.properties).push.apply(p,n.properties),o;for(d=n.properties,s=a=0,c=d.length;c>a;s=++a)if(l=d[s],l.soak)return l.soak=!1,r=new t(n.base,n.properties.slice(0,s)),f=new t(n.base,n.properties.slice(s)),r.isComplex()&&(h=new x(e.scope.freeVariable("ref")),r=new O(new i(h,r)),f.base=h),new y(new u(r),f,{soak:!0});return!1}}(this)()},t}(r),e.Comment=h=function(e){function t(e){this.comment=e}return kt(t,e),t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.compileNode=function(e,t){var n,i;return i=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *"),n="/*"+ut(i,this.tab)+(Tt.call(i,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===L&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(r),e.Call=o=function(e){function n(e,t,n){this.args=null!=t?t:[],this.soak=n,this.isNew=!1,this.isSuper="super"===e,this.variable=this.isSuper?null:e,e instanceof z&&e.isNotCallable()&&e.error("literal is not a function")}return kt(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,r,s,o,a,c,l,h;return a=e.scope.namedMethod(),(null!=a?a.klass:void 0)?(o=a.klass,c=a.name,h=a.variable,o.isComplex()&&(s=new x(e.scope.parent.freeVariable("base")),r=new z(new O(new i(s,o))),h.base=r,h.properties.splice(0,o.properties.length)),(c.isComplex()||c instanceof w&&c.index.isAssignable())&&(l=new x(e.scope.parent.freeVariable("name")),c=new w(new i(l,c.index)),h.properties.pop(),h.properties.push(c)),n=[new t(new x("__super__"))],a["static"]&&n.push(new t(new x("constructor"))),n.push(null!=l?new w(l):c),new z(null!=s?s:o,n).compile(e)):(null!=a?a.ctor:void 0)?a.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},n.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},n.prototype.unfoldSoak=function(e){var t,i,r,s,o,a,c,l,h;if(this.soak){if(this.variable){if(i=bt(e,this,"variable"))return i;c=new z(this.variable).cacheReference(e),s=c[0],h=c[1]}else s=new x(this.superReference(e)),h=new z(s);return h=new n(h,this.args),h.isNew=this.isNew,s=new x("typeof "+s.compile(e)+' === "function"'),new y(s,new z(h),{soak:!0})}for(t=this,a=[];;)if(t.variable instanceof n)a.push(t),t=t.variable;else{if(!(t.variable instanceof z))break;if(a.push(t),!((t=t.variable.base)instanceof n))break}for(l=a.reverse(),r=0,o=l.length;o>r;r++)t=l[r],i&&(t.variable instanceof n?t.variable=i:t.variable.base=i),i=bt(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,l,h;if(null!=(l=this.variable)&&(l.front=this.front),r=G.compileSplattedArray(e,this.args,!0),r.length)return this.compileSplat(e,r);for(i=[],h=this.args,n=o=0,a=h.length;a>o;n=++o)t=h[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,F));return s=[],this.isSuper?(c=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(c+=", "),s.push(this.makeCode(c))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,T)),s.push(this.makeCode("("))),s.push.apply(s,i),s.push(this.makeCode(")")),s},n.prototype.compileSplat=function(e,t){var n,i,r,s,o,a;return this.isSuper?[].concat(this.makeCode(this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+q,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,F),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new z(this.variable),(o=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,F),this.makeCode(")"),o.compileToFragments(e))):(r=i.compileToFragments(e,T),B.test(st(r))&&(r=this.wrapInBraces(r)),o?(a=st(r),r.push.apply(r,o.compileToFragments(e))):a="null",n=n.concat(r)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},n}(r),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return kt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new o(new z(new x(yt("extend",e))),[this.child,this.parent]).compileToFragments(e)},t}(r),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return kt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(st(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=D,t}(r),e.Index=w=function(e){function t(e){this.index=e}return kt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,N),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(r),e.Range=j=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return kt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,r,s,o;return e=ht(e,{top:!0}),t=tt(e,"isComplex"),n=this.cacheToCodeFragments(this.from.cache(e,F,t)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,F,t)),this.toC=i[0],this.toVar=i[1],(o=tt(e,"step"))&&(r=this.cacheToCodeFragments(o.cache(e,F,t)),this.step=r[0],this.stepVar=r[1]),s=[this.fromVar.match(R),this.toVar.match(R)],this.fromNum=s[0],this.toNum=s[1],this.stepVar?this.stepNum=this.stepVar.match(R):void 0},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,l,h,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=this.fromNum&&this.toNum,s=tt(e,"index"),o=tt(e,"name"),l=o&&o!==s,f=s+" = "+this.fromC,this.toC!==this.toVar&&(f+=", "+this.toC),this.step!==this.stepVar&&(f+=", "+this.step),h=[s+" <"+this.equals,s+" >"+this.equals],c=h[0],r=h[1],n=this.stepNum?pt(this.stepNum[0])>0?c+" "+this.toVar:r+" "+this.toVar:a?(u=[pt(this.fromNum[0]),pt(this.toNum[0])],i=u[0],d=u[1],u,d>=i?c+" "+d:r+" "+d):(t=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,t+" ? "+c+" "+this.toVar+" : "+r+" "+this.toVar),p=this.stepVar?s+" += "+this.stepVar:a?l?d>=i?"++"+s:"--"+s:d>=i?s+"++":s+"--":l?t+" ? ++"+s+" : --"+s:t+" ? "+s+"++ : "+s+"--",l&&(f=o+" = "+f),l&&(p=o+" = "+p),[this.makeCode(f+"; "+n+"; "+p)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,r,s,o,a,c,l,h,u,p,d;return this.fromNum&&this.toNum&&20>=Math.abs(this.fromNum-this.toNum)?(l=function(){p=[];for(var e=h=+this.fromNum,t=+this.toNum;t>=h?t>=e:e>=t;t>=h?e++:e--)p.push(e);return p}.apply(this),this.exclusive&&l.pop(),[this.makeCode("["+l.join(", ")+"]")]):(o=this.tab+q,s=e.scope.freeVariable("i",{single:!0}),u=e.scope.freeVariable("results"),c="\n"+o+u+" = [];",this.fromNum&&this.toNum?(e.index=s,n=st(this.compileNode(e))):(d=s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=this.fromVar+" <= "+this.toVar,n="var "+d+"; "+i+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+s+"++ : "+s+"--"),a="{ "+u+".push("+s+"); }\n"+o+"return "+u+";\n"+e.indent,r=function(e){return null!=e?e.contains(at):void 0},(r(this.from)||r(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+o+"for ("+n+")"+a+"}).apply(this"+(null!=t?t:"")+")")])},t}(r),e.Slice=U=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return kt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;return s=this.range,o=s.to,i=s.from,r=i&&i.compileToFragments(e,N)||[this.makeCode("0")],o&&(t=o.compileToFragments(e,N),n=st(t),(this.range.exclusive||-1!==+n)&&(a=", "+(this.range.exclusive?n:B.test(n)?""+(+n+1):(t=o.compileToFragments(e,T),"+"+st(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+st(r)+(a||"")+")")]},t}(r),e.Obj=A=function(e){function n(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return kt(n,e),n.prototype.children=["properties"],n.prototype.compileNode=function(e){var n,r,s,o,a,c,l,u,p,d,f,m,g,v,b,y,k,w,T,C,F;if(T=this.properties,this.generated)for(l=0,g=T.length;g>l;l++)y=T[l],y instanceof z&&y.error("cannot have an implicit value in an implicit object");for(r=p=0,v=T.length;v>p&&(w=T[r],!((w.variable||w).base instanceof O));r=++p);for(s=T.length>r,a=e.indent+=q,m=this.lastNonComment(this.properties),n=[],s&&(k=e.scope.freeVariable("obj"),n.push(this.makeCode("(\n"+a+k+" = "))),n.push(this.makeCode("{"+(0===T.length||0===r?"}":"\n"))),o=f=0,b=T.length;b>f;o=++f)w=T[o],o===r&&(0!==o&&n.push(this.makeCode("\n"+a+"}")),n.push(this.makeCode(",\n"))),u=o===T.length-1||o===r-1?"":w===m||w instanceof h?"\n":",\n",c=w instanceof h?"":a,s&&r>o&&(c+=q),w instanceof i&&("object"!==w.context&&w.operatorToken.error("unexpected "+w.operatorToken.value),w.variable instanceof z&&w.variable.hasProperties()&&w.variable.error("invalid object key")),w instanceof z&&w["this"]&&(w=new i(w.properties[0].name,w,"object")),w instanceof h||(r>o?(w instanceof i||(w=new i(w,w,"object")),(w.variable.base||w.variable).asKey=!0):(w instanceof i?(d=w.variable,F=w.value):(C=w.base.cache(e),d=C[0],F=C[1]),w=new i(new z(new x(k),[new t(d)]),F))),c&&n.push(this.makeCode(c)),n.push.apply(n,w.compileToFragments(e,L)),u&&n.push(this.makeCode(u));return s?n.push(this.makeCode(",\n"+a+k+"\n"+this.tab+")")):0!==T.length&&n.push(this.makeCode("\n"+this.tab+"}")),this.front&&!s?this.wrapInBraces(n):n},n.prototype.assigns=function(e){var t,n,i,r;for(r=this.properties,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},n}(r),e.Arr=n=function(e){function t(e){this.objects=e||[]}return kt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=q,t=G.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,r;for(i=this.objects,r=[],t=0,n=i.length;n>t;t++)a=i[t],r.push(a.compileToFragments(e,F));return r}.call(this),r=s=0,o=n.length;o>s;r=++s)i=n[r],r&&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,r;for(r=this.objects,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},t}(r),e.Class=a=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new s,this.boundFuncs=[],this.body.classBody=!0}return kt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n,i;return this.variable?(n=this.variable.properties,i=n[n.length-1],e=i?i instanceof t&&i.name.value:this.variable.base.value,Tt.call(V,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof x&&"this"===t.value?t.value=e:t instanceof c&&t.bound?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,r,s,o;for(o=this.boundFuncs,i=0,r=o.length;r>i;i++)n=o[i],s=new z(new x("this"),[new t(n)]).compile(e),this.ctor.body.unshift(new x(s+" = "+yt("bind",e)+"("+s+", this)"))},n.prototype.addProperties=function(e,n,r){var s,o,a,l,h,u;return u=e.base.properties.slice(0),l=function(){var e;for(e=[];o=u.shift();)o instanceof i&&(a=o.variable.base,delete o.context,h=o.value,"constructor"===a.value?(this.ctor&&o.error("cannot define more than one constructor in a class"),h.bound&&o.error("cannot define a constructor as a bound function"),h instanceof c?o=this.ctor=h:(this.externalCtor=r.classScope.freeVariable("class"),o=new i(new x(this.externalCtor),h))):o.variable["this"]?h["static"]=!0:(s=a.isComplex()?new w(a):new t(a),o.variable=new z(new x(n),[new t(new x("prototype")),s]),h instanceof c&&h.bound&&(this.boundFuncs.push(a),h.bound=!1))),e.push(o);return e}.call(this),et(l)},n.prototype.walkBody=function(e,t){return this.traverseChildren(!1,function(r){return function(o){var a,c,l,h,u,p,d;if(a=!0,o instanceof n)return!1;if(o instanceof s){for(d=c=o.expressions,l=h=0,u=d.length;u>h;l=++h)p=d[l],p instanceof i&&p.variable.looksStatic(e)?p.value["static"]=!0:p instanceof z&&p.isObject(!0)&&(a=!1,c[l]=r.addProperties(p,e,t));o.expressions=c=rt(c)}return a&&!(o instanceof n)}}(this))},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof h||n instanceof z&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new c,this.externalCtor?this.ctor.body.push(new x(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new x(e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},n.prototype.compileNode=function(e){var t,n,r,a,l,h,u,p,f;return(a=this.body.jumps())&&a.error("Class bodies cannot contain pure statements"),(n=this.body.contains(at))&&n.error("Class bodies shouldn't reference arguments"),u=this.determineName()||"_Class",u.reserved&&(u="_"+u),h=new x(u),r=new c([],s.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(u),this.walkBody(u,e),this.ensureConstructor(u),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(h),this.parent&&(f=new x(e.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new d(h,f)),r.params.push(new _(f)),t.push(this.parent)),(p=this.body.expressions).unshift.apply(p,this.directives),l=new O(new o(r,t)),this.variable&&(l=new i(this.variable,l)),l.compileToFragments(e)},n}(r),e.Assign=i=function(e){function n(e,t,n,i){var r,s,o;this.variable=e,this.value=t,this.context=n,null==i&&(i={}),this.param=i.param,this.subpattern=i.subpattern,this.operatorToken=i.operatorToken,o=s=this.variable.unwrapAll().value,r=Tt.call(V,o)>=0,r&&"object"!==this.context&&this.variable.error('variable name may not be "'+s+'"')
-}return kt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===L&&null!=this.context&&Tt.call(this.context,"?")>=0},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return bt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,l,h,u,p,d,f,m;if(i=this.variable instanceof z){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(l=this.context)||"&&="===l||"?="===l)return this.compileConditional(e);if("**="===(h=this.context)||"//="===h||"%%="===h)return this.compileSpecialMath(e)}return this.value instanceof c&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):(null!=(u=this.variable.properties)?u.length:void 0)>=2&&(p=this.variable.properties,o=p.length>=3?Ct.call(p,0,r=p.length-2):(r=0,[]),a=p[r++],s=p[r++],"prototype"===(null!=(d=a.name)?d.value:void 0)&&(this.value.klass=new z(this.variable.base,o),this.value.name=s,this.value.variable=this.variable))),this.context||(m=this.variable.unwrapAll(),m.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned'),("function"==typeof m.hasProperties?m.hasProperties():void 0)||(this.param?e.scope.add(m.value,"var"):e.scope.find(m.value))),f=this.value.compileToFragments(e,F),i&&this.variable.base instanceof A&&(this.variable.front=!0),n=this.variable.compileToFragments(e,F),"object"===this.context?n.concat(this.makeCode(": "),f):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),f),F>=e.level?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,r,s,o,a,c,l,h,u,d,f,m,v,b,y,k,T,C,N,S,D,R,A,_,O,j,M,B;if(_=e.level===L,j=this.value,y=this.variable.base.objects,!(k=y.length))return s=j.compileToFragments(e),e.level>=E?this.wrapInBraces(s):s;if(b=y[0],1===k&&b instanceof p&&b.error("Destructuring assignment has no target"),u=this.variable.isObject(),_&&1===k&&!(b instanceof G))return o=null,b instanceof n&&"object"===b.context?(C=b,N=C.variable,h=N.base,b=C.value,b instanceof n&&(o=b.value,b=b.variable)):(b instanceof n&&(o=b.value,b=b.variable),h=u?b["this"]?b.properties[0].name:b:new x(0)),i=g.test(h.unwrap().value),j=new z(j),j.properties.push(new(i?t:w)(h)),S=b.unwrap().value,Tt.call($,S)>=0&&b.error("assignment to a reserved word: "+b.compile(e)),o&&(j=new I("?",j,o)),new n(b,j,null,{param:this.param}).compileToFragments(e,L);for(M=j.compileToFragments(e,F),B=st(M),r=[],a=!1,(!g.test(B)||this.variable.assigns(B))&&(r.push([this.makeCode((T=e.scope.freeVariable("ref"))+" = ")].concat(Ct.call(M))),M=[this.makeCode(T)],B=T),l=f=0,m=y.length;m>f;l=++f){if(b=y[l],h=l,!a&&b instanceof G)v=b.name.unwrap().value,b=b.unwrap(),O=k+" <= "+B+".length ? "+yt("slice",e)+".call("+B+", "+l,(A=k-l-1)?(d=e.scope.freeVariable("i",{single:!0}),O+=", "+d+" = "+B+".length - "+A+") : ("+d+" = "+l+", [])"):O+=") : []",O=new x(O),a=d+"++";else{if(!a&&b instanceof p){(A=k-l-1)&&(1===A?a=B+".length - 1":(d=e.scope.freeVariable("i",{single:!0}),O=new x(d+" = "+B+".length - "+A),a=d+"++",r.push(O.compileToFragments(e,F))));continue}(b instanceof G||b instanceof p)&&b.error("multiple splats/expansions are disallowed in an assignment"),o=null,b instanceof n&&"object"===b.context?(D=b,R=D.variable,h=R.base,b=D.value,b instanceof n&&(o=b.value,b=b.variable)):(b instanceof n&&(o=b.value,b=b.variable),h=u?b["this"]?b.properties[0].name:b:new x(a||h)),v=b.unwrap().value,i=g.test(h.unwrap().value),O=new z(new x(B),[new(i?t:w)(h)]),o&&(O=new I("?",O,o))}null!=v&&Tt.call($,v)>=0&&b.error("assignment to a reserved word: "+b.compile(e)),r.push(new n(b,O,null,{param:this.param,subpattern:!0}).compileToFragments(e,F))}return _||this.subpattern||r.push(M),c=this.joinFragmentArrays(r,", "),F>e.level?c:this.wrapInBraces(c)},n.prototype.compileConditional=function(e){var t,i,r,s;return r=this.variable.cacheReference(e),i=r[0],s=r[1],!i.properties.length&&i.base instanceof x&&"this"!==i.base.value&&!e.scope.check(i.base.value)&&this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Tt.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new y(new u(i),s,{type:"if"}).addElse(new n(s,this.value,"=")).compileToFragments(e)):(t=new I(this.context.slice(0,-1),i,new n(s,this.value,"=")).compileToFragments(e),F>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return i=this.variable.cacheReference(e),t=i[0],r=i[1],new n(t,new I(this.context.slice(0,-1),r,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,s,o,a,c,l,h,u,p;return a=this.variable.properties.pop().range,i=a.from,h=a.to,n=a.exclusive,o=this.variable.compile(e),i?(c=this.cacheToCodeFragments(i.cache(e,E)),r=c[0],s=c[1]):r=s="0",h?i instanceof z&&i.isSimpleNumber()&&h instanceof z&&h.isSimpleNumber()?(h=h.compile(e)-s,n||(h+=1)):(h=h.compile(e,T)+" - "+s,n||(h+=" + 1")):h="9e9",l=this.value.cache(e,F),u=l[0],p=l[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+r+", "+h+"].concat("),u,this.makeCode(")), "),p),e.level>L?this.wrapInBraces(t):t},n}(r),e.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new s,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){var t;return e instanceof I&&("yield"===(t=e.operator)||"yield*"===t)})}return kt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=D,t.prototype.makeScope=function(e){return new P(e,this.body,this)},t.prototype.compileNode=function(e){var r,a,c,l,h,u,d,f,m,g,v,b,k,w,C,F,E,N,L,S,D,R,A,O,$,j,M,B,V,P,U,G,H;if(this.bound&&(null!=(A=e.scope.method)?A.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",H=new t([new _(new x(this.context))],new s([this])),a=new o(H,[new x("this")]),a.updateLocationDataIfMissing(this.locationData),a.compileNode(e);for(e.scope=tt(e,"classScope")||this.makeScope(e.scope),e.scope.shared=tt(e,"sharedScope"),e.indent+=q,delete e.bare,delete e.isExistentialEquals,L=[],l=[],O=this.params,u=0,m=O.length;m>u;u++)N=O[u],N instanceof p||e.scope.parameter(N.asReference(e));for($=this.params,d=0,g=$.length;g>d;d++)if(N=$[d],N.splat||N instanceof p){for(j=this.params,f=0,v=j.length;v>f;f++)E=j[f],E instanceof p||!E.name.value||e.scope.add(E.name.value,"var",!0);V=new i(new z(new n(function(){var t,n,i,r;for(i=this.params,r=[],n=0,t=i.length;t>n;n++)E=i[n],r.push(E.asReference(e));return r}.call(this))),new z(new x("arguments")));break}for(M=this.params,F=0,b=M.length;b>F;F++)N=M[F],N.isComplex()?(U=R=N.asReference(e),N.value&&(U=new I("?",R,N.value)),l.push(new i(new z(N.name),U,"=",{param:!0}))):(R=N,N.value&&(C=new x(R.name.value+" == null"),U=new i(new z(N.name),N.value,"="),l.push(new y(C,U)))),V||L.push(R);for(G=this.body.isEmpty(),V&&l.unshift(V),l.length&&(B=this.body.expressions).unshift.apply(B,l),h=S=0,k=L.length;k>S;h=++S)E=L[h],L[h]=E.compileToFragments(e),e.scope.parameter(st(L[h]));for(P=[],this.eachParamName(function(e,t){return Tt.call(P,e)>=0&&t.error("multiple parameters named "+e),P.push(e)}),G||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],h=D=0,w=L.length;w>D;h=++D)E=L[h],h&&r.push(this.makeCode(", ")),r.push.apply(r,E);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Ct.call(r)):this.front||e.level>=T?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,s;for(r=this.params,s=[],t=0,n=r.length;n>t;t++)i=r[t],s.push(i.eachName(e));return s},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=_=function(e){function t(e,t,n){var i,r,s;this.name=e,this.value=t,this.splat=n,r=i=this.name.unwrapAll().value,Tt.call(V,r)>=0&&this.name.error('parameter name "'+i+'" is not allowed'),this.name instanceof A&&this.name.generated&&(s=this.name.objects[0].operatorToken,s.error("unexpected "+s.value))}return kt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,F)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t=n.properties[0].name.value,t.reserved&&(t="_"+t),n=new x(e.scope.freeVariable(t))):n.isComplex()&&(n=new x(e.scope.freeVariable("arg"))),n=new z(n),this.splat&&(n=new G(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,s,o,a,c;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof x)return e(t.value,t);if(t instanceof z)return n(t);for(c=t.objects,r=0,s=c.length;s>r;r++)a=c[r],a instanceof i&&null==a.context&&(a=a.variable),a instanceof i?this.eachName(e,a.value.unwrap()):a instanceof G?(o=a.name.unwrap(),e(o.value,o)):a instanceof z?a.isArray()||a.isObject()?this.eachName(e,a.base):a["this"]?n(a):e(a.base.value,a.base):a instanceof p||a.error("illegal parameter "+a.compile())},t}(r),e.Splat=G=function(e){function t(e){this.name=e.compile?e:new x(e)}return kt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=Q,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,s,o,a,c,l,h,u,p,d,f;for(h=-1;(f=n[++h])&&!(f instanceof t););if(h>=n.length)return[];if(1===n.length)return f=n[0],c=f.compileToFragments(e,F),i?c:[].concat(f.makeCode(yt("slice",e)+".call("),c,f.makeCode(")"));for(r=n.slice(h),l=u=0,d=r.length;d>u;l=++u)f=r[l],o=f.compileToFragments(e,F),r[l]=f instanceof t?[].concat(f.makeCode(yt("slice",e)+".call("),o,f.makeCode(")")):[].concat(f.makeCode("["),o,f.makeCode("]"));return 0===h?(f=n[0],a=f.joinFragmentArrays(r.slice(1),", "),r[0].concat(f.makeCode(".concat("),a,f.makeCode(")"))):(s=function(){var t,i,r,s;for(r=n.slice(0,h),s=[],t=0,i=r.length;i>t;t++)f=r[t],s.push(f.compileToFragments(e,F));return s}(),s=n[0].joinFragmentArrays(s,", "),a=n[h].joinFragmentArrays(r,", "),p=n[n.length-1],[].concat(n[0].makeCode("["),s,n[h].makeCode("].concat("),a,p.makeCode(")")))},t}(r),e.Expansion=p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isComplex=D,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=J=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 kt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=Q,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(t=0,i=e.length;i>t;t++)if(r=e[t],n=r.jumps({loop:!0}))return n;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=q,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new y(new O(this.guard).invert(),new x("continue"))):this.guard&&(n=s.wrap([new y(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,L),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,N),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=I=function(e){function n(e,t,n,i){if("in"===e)return new k(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof c&&t.bound||t["do"])&&(t=new O(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,s;return kt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},s={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isSimpleNumber=D,n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isYieldReturn=function(){return this.isYield()&&this.first instanceof M},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof z&&this.first.isSimpleNumber())},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in s),t=t.first;if(!e)return new O(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=s[t.operator],t=t.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new O(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&bt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,s,a,l,h,u;for(l=[],n=e instanceof i&&(h=e.value.unwrap())instanceof c?h:e,u=n.params||[],r=0,s=u.length;s>r;r++)a=u[r],a.value?(l.push(a.value),delete a.value):l.push(a);return t=new o(e,l),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,s,o;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(r=this.operator)||"++"===r)&&(s=this.first.unwrapAll().value,Tt.call(V,s)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,E),o=this.second.compileToFragments(e,E),t=[].concat(i,this.makeCode(" "+this.operator+" "),o),E>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,E),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,E)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new x(e.scope.freeVariable("ref")),t=new O(new i(n,this.first))):(t=this.first,n=t),new y(new u(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof u?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=T?new O(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new O(this.first)),i.push(this.first.compileToFragments(e,E)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield statements must occur within a function generator."),Tt.call(Object.keys(this.first),"expression")>=0&&!(this.first instanceof W)?this.isYieldReturn()?n.push(this.first.compileToFragments(e,L)):null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,E)):(n.push([this.makeCode("("+t+" ")]),n.push(this.first.compileToFragments(e,E)),n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new z(new x("Math"),[new t(new x("pow"))]),new o(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new z(new x("Math"),[new t(new x("floor"))]),i=new n("/",this.first,this.second),new o(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new z(new x(yt("modulo",e))),new o(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=k=function(e){function t(e,t){this.object=e,this.array=t}return kt(t,e),t.prototype.children=["object","array"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r,s;if(this.array instanceof z&&this.array.isArray()&&this.array.base.objects.length){for(s=this.array.base.objects,n=0,i=s.length;i>n;n++)if(r=s[n],r instanceof G){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,s,o,a,c,l,h,u,p;for(c=this.object.cache(e,E),u=c[0],a=c[1],l=this.negated?[" !== "," && "]:[" === "," || "],t=l[0],n=l[1],p=[],h=this.array.base.objects,i=s=0,o=h.length;o>s;i=++s)r=h[i],i&&p.push(this.makeCode(n)),p=p.concat(i?a:u,this.makeCode(t),r.compileToFragments(e,T));return E>e.level?p:this.wrapInBraces(p)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return i=this.object.cache(e,F),r=i[0],n=i[1],t=[].concat(this.makeCode(yt("indexOf",e)+".call("),this.array.compileToFragments(e,F),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),st(r)===st(n)?t:(t=r.concat(this.makeCode(", "),t),F>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=Y=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return kt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,s,o;return e.indent+=q,o=this.attempt.compileToFragments(e,L),t=this.recovery?(r=e.scope.freeVariable("error"),s=new x(r),this.errorVariable?this.recovery.unshift(new i(this.errorVariable,s)):void 0,[].concat(this.makeCode(" catch ("),s.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:[this.makeCode(" catch ("+r+") {}")],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),o,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=W=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.jumps=D,t.prototype.makeReturn=X,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=u=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,E),g.test(i)&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(C>=e.level?i:"("+i+")")]},t}(r),e.Parens=O=function(e){function t(e){this.body=e}return kt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,i;return n=this.body.unwrap(),n instanceof z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,N),t=E>e.level&&(n instanceof I||n instanceof o||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.For=f=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=s.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof z&&this.source.base instanceof j&&!this.source.properties.length,this.pattern=this.name instanceof z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return kt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,o,a,c,l,h,u,p,d,f,m,v,b,k,w,T,C,E,N,S,D,A,I,_,$,j,B,V,P,U,G,H;return t=s.wrap([this.body]),D=t.expressions,T=D[D.length-1],(null!=T?T.jumps():void 0)instanceof M&&(this.returns=!1),B=this.range?this.source.base:this.source,j=e.scope,this.pattern||(E=this.name&&this.name.compile(e,F)),v=this.index&&this.index.compile(e,F),E&&!this.pattern&&j.find(E),v&&j.find(v),this.returns&&($=j.freeVariable("results")),b=this.object&&v||j.freeVariable("i",{single:!0}),k=this.range&&E||v||b,w=k!==b?k+" = ":"",this.step&&!this.range&&(A=this.cacheToCodeFragments(this.step.cache(e,F,ot)),V=A[0],U=A[1],P=U.match(R)),this.pattern&&(E=b),H="",d="",l="",f=this.tab+q,this.range?p=B.compileToFragments(ht(e,{index:b,name:E,step:this.step,isComplex:ot})):(G=this.source.compile(e,F),!E&&!this.own||g.test(G)||(l+=""+this.tab+(S=j.freeVariable("ref"))+" = "+G+";\n",G=S),E&&!this.pattern&&(N=E+" = "+G+"["+k+"]"),this.object||(V!==U&&(l+=""+this.tab+V+";\n"),this.step&&P&&(u=0>pt(P[0]))||(C=j.freeVariable("len")),a=""+w+b+" = 0, "+C+" = "+G+".length",c=""+w+b+" = "+G+".length - 1",r=b+" < "+C,o=b+" >= 0",this.step?(P?u&&(r=o,a=c):(r=U+" > 0 ? "+r+" : "+o,a="("+U+" > 0 ? ("+a+") : "+c+")"),m=b+" += "+U):m=""+(k!==b?"++"+b:b+"++"),p=[this.makeCode(a+"; "+r+"; "+w+m)])),this.returns&&(I=""+this.tab+$+" = [];\n",_="\n"+this.tab+"return "+$+";",t.makeReturn($)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new y(new O(this.guard).invert(),new x("continue"))):this.guard&&(t=s.wrap([new y(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new x(G+"["+k+"]"))),h=[].concat(this.makeCode(l),this.pluckDirectCall(e,t)),N&&(H="\n"+f+N+";"),this.object&&(p=[this.makeCode(k+" in "+G)],this.own&&(d="\n"+f+"if (!"+yt("hasProp",e)+".call("+G+", "+k+")) continue;")),n=t.compileToFragments(ht(e,{indent:f}),L),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(h,this.makeCode(""+(I||"")+this.tab+"for ("),p,this.makeCode(") {"+d+H),n,this.makeCode(this.tab+"}"+(_||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,s,a,l,h,u,p,d,f,m,g,v,b,y,k;for(r=[],d=t.expressions,l=h=0,u=d.length;u>h;l=++h)s=d[l],s=s.unwrapAll(),s instanceof o&&(k=null!=(f=s.variable)?f.unwrapAll():void 0,(k instanceof c||k instanceof z&&(null!=(m=k.base)?m.unwrapAll():void 0)instanceof c&&1===k.properties.length&&("call"===(g=null!=(v=k.properties[0].name)?v.value:void 0)||"apply"===g))&&(a=(null!=(b=k.base)?b.unwrapAll():void 0)||k,p=new x(e.scope.freeVariable("fn")),n=new z(p),k.base&&(y=[n,k],k.base=y[0],n=y[1]),t.expressions[l]=new o(n,s.args),r=r.concat(this.makeCode(this.tab),new i(p,a).compileToFragments(e,L),this.makeCode(";\n"))));return r},t}(J),e.Switch=H=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return kt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t,n,i,r,s,o,a,c;for(null==e&&(e={block:!0}),o=this.cases,i=0,s=o.length;s>i;i++)if(a=o[i],n=a[0],t=a[1],r=t.jumps(e))return r;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,o;for(r=this.cases,t=0,n=r.length;n>t;t++)i=r[t],i[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new s([new x("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,l,h,u,p,d,f,m,g;for(c=e.indent+q,l=e.indent=c+q,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,N):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=h=0,p=f.length;p>h;a=++h){for(m=f[a],r=m[0],t=m[1],g=rt([r]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,N),this.makeCode(":\n"));if((n=t.compileToFragments(e,L)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions),s instanceof M||s instanceof x&&s.jumps()&&"debugger"!==s.value||o.push(i.makeCode(l+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(c+"default:\n")].concat(Ct.call(this.otherwise.compileToFragments(e,L)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(r),e.If=y=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 kt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return null!=(e=this.body)?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return null!=(e=this.elseBody)?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===L||this.bodyNode().isStatement(e)||(null!=(t=this.elseBodyNode())?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||(null!=(t=this.elseBody)?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new s([new x("void 0")]))),this.body&&(this.body=new s([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new s([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof s?e:new s([e])},t.prototype.compileStatement=function(e){var n,i,r,s,o,a,c;return r=tt(e,"chainChild"),(o=tt(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+q,s=this.condition.compileToFragments(e,N),i=this.ensureBlock(this.body).compileToFragments(ht(e,{indent:c})),a=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,L))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(ht(e,{indent:c}),L),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,C),n=this.bodyNode().compileToFragments(e,F),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,F):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=C?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),K={extend:function(e){return"function(child, parent) { for (var key in parent) { if ("+yt("hasProp",e)+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},L=1,N=2,F=3,C=4,E=5,T=6,q=" ",g=/^(?!\d)[$\w\x7f-\uffff]+$/,B=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,R=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,b=/^['"]/,v=/^\//,yt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable(e),i.assign(n,K[e](t)),i.utilities[e]=n)},ut=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},pt=function(e){return null==e?0:e.match(m)?parseInt(e,16):parseFloat(e)},at=function(e){return e instanceof x&&"arguments"===e.value&&!e.asKey},ct=function(e){return e instanceof x&&"this"===e.value&&!e.asKey||e instanceof c&&e.bound||e instanceof o&&e.isSuper},ot=function(e){return e.isComplex()||("function"==typeof e.isAssignable?e.isAssignable():void 0)},bt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new z(t),i}}.call(this),t.exports}(),require["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,s;return t.prototype.add=function(t,n,i){var r,s,o,a;return null==i&&(i={}),o=n[0],s=n[1],a=(r=this.lines)[o]||(r[o]=new e(o)),a.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,r,s,o,a,c,l,h,u,p,d,f,m,g,v;for(null==e&&(e={}),null==t&&(t=null),v=0,s=0,a=0,o=0,d=!1,n="",f=this.lines,u=i=0,c=f.length;c>i;u=++i)if(h=f[u])for(m=h.columns,r=0,l=m.length;l>r;r++)if(p=m[r]){for(;p.line>v;)s=0,d=!1,n+=";",v++;d&&(n+=",",d=!1),n+=this.encodeVlq(p.column-s),s=p.column,n+=this.encodeVlq(0),n+=this.encodeVlq(p.sourceLine-a),a=p.sourceLine,n+=this.encodeVlq(p.sourceColumn-o),o=p.sourceColumn,d=!0}return g={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inline&&(g.sourcesContent=[t]),JSON.stringify(g,null,2)},r=5,i=1<e?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&s,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)
-}()},t}(),t.exports=n}.call(this),t.exports}(),require["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,l,h,u,p,d,f,m,g,v,b,y={}.hasOwnProperty,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};if(a=require("fs"),v=require("vm"),f=require("path"),t=require("./lexer").Lexer,d=require("./parser").parser,l=require("./helpers"),n=require("./sourcemap"),e.VERSION="1.10.0",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=l,b=function(e){return function(t,n){var i,r;null==n&&(n={});try{return e.call(this,t,n)}catch(r){if(i=r,"string"!=typeof t)throw i;throw l.updateSyntaxError(i,t,n.filename)}}},e.compile=r=b(function(e,t){var i,r,s,o,a,c,h,u,f,m,g,v,b,y,k;for(v=l.merge,o=l.extend,t=o({},t),t.sourceMap&&(g=new n),k=p.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=k.length;t>e;e++)y=k[e],y.variable&&n.push(y[1]);return n}(),c=d.parse(k).compileToFragments(t),s=0,t.header&&(s+=1),t.shiftLine&&(s+=1),r=0,f="",u=0,m=c.length;m>u;u++)a=c[u],t.sourceMap&&(a.locationData&&!/^[;\s]*$/.test(a.code)&&g.add([a.locationData.first_line,a.locationData.first_column],[s,r],{noReplace:!0}),b=l.count(a.code,"\n"),s+=b,b?r=a.code.length-(a.code.lastIndexOf("\n")+1):r+=a.code.length),f+=a.code;return t.header&&(h="Generated by CoffeeScript "+this.VERSION,f="// "+h+"\n"+f),t.sourceMap?(i={js:f},i.sourceMap=g,i.v3SourceMap=g.generate(t,e),i):f}),e.tokens=b(function(e,t){return p.tokenize(e,t)}),e.nodes=b(function(e,t){return"string"==typeof e?d.parse(p.tokenize(e,t)):d.parse(e)}),e.run=function(e,t){var n,i,s,o;return null==t&&(t={}),s=require.main,s.filename=process.argv[1]=t.filename?a.realpathSync(t.filename):".",s.moduleCache&&(s.moduleCache={}),i=t.filename?f.dirname(a.realpathSync(t.filename)):a.realpathSync("."),s.paths=require("module")._nodeModulePaths(i),(!l.isCoffee(s.filename)||require.extensions)&&(n=r(e,t),e=null!=(o=n.js)?o:n),s._compile(e,s.filename)},e.eval=function(e,t){var n,i,s,o,a,c,l,h,u,p,d,m,g,b,k,w,T;if(null==t&&(t={}),e=e.trim()){if(o=null!=(m=v.Script.createContext)?m:v.createContext,c=null!=(g=v.isContext)?g:function(){return t.sandbox instanceof o().constructor},o){if(null!=t.sandbox){if(c(t.sandbox))w=t.sandbox;else{w=o(),b=t.sandbox;for(h in b)y.call(b,h)&&(T=b[h],w[h]=T)}w.global=w.root=w.GLOBAL=w}else w=global;if(w.__filename=t.filename||"eval",w.__dirname=f.dirname(w.__filename),w===global&&!w.module&&!w.require){for(n=require("module"),w.module=i=new n(t.modulename||"eval"),w.require=s=function(e){return n._load(e,i,!0)},i.filename=w.__filename,k=Object.getOwnPropertyNames(require),a=0,u=k.length;u>a;a++)d=k[a],"paths"!==d&&"arguments"!==d&&"caller"!==d&&(s[d]=require[d]);s.paths=i.paths=n._nodeModulePaths(process.cwd()),s.resolve=function(e){return n._resolveFilename(e,i)}}}p={};for(h in t)y.call(t,h)&&(T=t[h],p[h]=T);return p.bare=!0,l=r(e,p),w===global?v.runInThisContext(l):v.runInContext(l,w)}},e.register=function(){return require("./register")},require.extensions)for(m=this.FILE_EXTENSIONS,h=0,u=m.length;u>h;h++)s=m[h],null==(i=require.extensions)[s]&&(i[s]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+s+" files.")});e._compileFile=function(e,t){var n,i,s,o,c;null==t&&(t=!1),o=a.readFileSync(e,"utf8"),c=65279===o.charCodeAt(0)?o.substring(1):o;try{n=r(c,{filename:e,sourceMap:t,literate:l.isLiterate(e)})}catch(s){throw i=s,l.updateSyntaxError(i,c,e)}return n},p=new t,d.lexer={lex:function(){var e,t;return t=d.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],d.errorToken=t.origin||t,this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return d.tokens=e,this.pos=0},upcomingInput:function(){return""}},d.yy=require("./nodes"),d.yy.parseError=function(e,t){var n,i,r,s,o,a;return o=t.token,s=d.errorToken,a=d.tokens,i=s[0],r=s[1],n=s[2],r=function(){switch(!1){case s!==a[a.length-1]:return"end of input";case"INDENT"!==i&&"OUTDENT"!==i:return"indentation";case"IDENTIFIER"!==i&&"NUMBER"!==i&&"STRING"!==i&&"STRING_START"!==i&&"REGEX"!==i&&"REGEX_START"!==i:return i.replace(/_START$/,"").toLowerCase();default:return l.nameWhitespaceCharacter(r)}}(),l.throwSyntaxError("unexpected "+r,n)},o=function(e,t){var n,i,r,s,o,a,c,l,h,u,p,d;return s=void 0,r="",e.isNative()?r="native":(e.isEval()?(s=e.getScriptNameOrSourceURL(),s||(r=e.getEvalOrigin()+", ")):s=e.getFileName(),s||(s=""),l=e.getLineNumber(),i=e.getColumnNumber(),u=t(s,l,i),r=u?s+":"+u[0]+":"+u[1]:s+":"+l+":"+i),o=e.getFunctionName(),a=e.isConstructor(),c=!(e.isToplevel()||a),c?(h=e.getMethodName(),d=e.getTypeName(),o?(p=n="",d&&o.indexOf(d)&&(p=d+"."),h&&o.indexOf("."+h)!==o.length-h.length-1&&(n=" [as "+h+"]"),""+p+o+n+" ("+r+")"):d+"."+(h||"")+" ("+r+")"):a?"new "+(o||"")+" ("+r+")":o?o+" ("+r+")":r},g={},c=function(t){var n,i;if(g[t])return g[t];if(i=null!=f?f.extname(t):void 0,!(0>k.call(e.FILE_EXTENSIONS,i)))return n=e._compileFile(t,!0),g[t]=n.sourceMap},Error.prepareStackTrace=function(t,n){var i,r,s;return s=function(e,t,n){var i,r;return r=c(e),r&&(i=r.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},r=function(){var t,r,a;for(a=[],t=0,r=n.length;r>t&&(i=n[t],i.getFunction()!==e.run);t++)a.push(" at "+o(i,s));return a}(),""+t+"\n"+r.join("\n")+"\n"}}.call(this),t.exports}(),require["./browser"]=function(){var exports={},module={exports:exports};return function(){var CoffeeScript,compile,runScripts,indexOf=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};CoffeeScript=require("./coffee-script"),CoffeeScript.require=require,compile=CoffeeScript.compile,CoffeeScript.eval=function(code,options){return null==options&&(options={}),null==options.bare&&(options.bare=!0),eval(compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,t.shiftLine=!0,Function(compile(e,t))()},"undefined"!=typeof window&&null!==window&&("undefined"!=typeof btoa&&null!==btoa&&"undefined"!=typeof JSON&&null!==JSON&&"undefined"!=typeof unescape&&null!==unescape&&"undefined"!=typeof encodeURIComponent&&null!==encodeURIComponent&&(compile=function(e,t){var n,i,r;return null==t&&(t={}),t.sourceMap=!0,t.inline=!0,i=CoffeeScript.compile(e,t),n=i.js,r=i.v3SourceMap,n+"\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(r)))+"\n//# sourceURL=coffeescript"}),CoffeeScript.load=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=!1),n.sourceFiles=[e],r=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,r.open("GET",e,!0),"overrideMimeType"in r&&r.overrideMimeType("text/plain"),r.onreadystatechange=function(){var s,o;if(4===r.readyState){if(0!==(o=r.status)&&200!==o)throw Error("Could not load "+e);if(s=[r.responseText,n],i||CoffeeScript.run.apply(CoffeeScript,s),t)return t(s)}},r.send(null)},runScripts=function(){var e,t,n,i,r,s,o,a,c,l,h;for(h=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,r;for(r=[],e=0,n=h.length;n>e;e++)c=h[e],i=c.type,indexOf.call(t,i)>=0&&r.push(c);return r}(),s=0,n=function(){var t;return t=e[s],t instanceof Array?(CoffeeScript.run.apply(CoffeeScript,t),s++,n()):void 0},i=function(i,r){var s,o;return s={literate:i.type===t[1]},o=i.src||i.getAttribute("data-src"),o?CoffeeScript.load(o,function(t){return e[r]=t,n()},s,!0):(s.sourceFiles=["embedded"],e[r]=[i.innerHTML,s])},r=o=0,a=e.length;a>o;r=++o)l=e[r],i(l,r);return n()},window.addEventListener?window.addEventListener("DOMContentLoaded",runScripts,!1):window.attachEvent("onload",runScripts))}.call(this),module.exports}(),require["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this);
\ No newline at end of file
+(function(root){var CoffeeScript=function(){function require(e){return require[e]}return require["./helpers"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,o,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.repeat=o=function(e,t){var n;for(n="";t>0;)1&t&&(n+=e),t>>>=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],t=0,i=e.length;i>t;t++)n=e[t],n&&r.push(n);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,o;for(n=[],r=0,o=e.length;o>r;r++)t=e[r],"[object Array]"===Object.prototype.toString.call(t)?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.some=null!=(r=Array.prototype.some)?r:function(e){var t,n,i,r;for(r=this,n=0,i=r.length;i>n;n++)if(t=r[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,o,s;for(o=e.split("\n"),s=[],n=0,r=o.length;r>n;n++)t=o[n],i&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?s.push(t):(i=/^\s*$/.test(t))?s.push(t):s.push("# "+t);return s}(),n.join("\n")},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){return"object"==typeof i&&i.updateLocationDataIfMissing&&i.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?t.first_line+1+":"+(t.first_column+1)+"-"+(t.last_line+1+":"+(t.last_column+1)):"No location data"},e.baseFileName=function(e,t,n){var i,r;return null==t&&(t=!1),null==n&&(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],t&&e.indexOf(".")>=0?(i=e.split("."),i.pop(),"coffee"===i[i.length-1]&&i.length>1&&i.pop(),i.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=s,n.stack=""+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===s&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=""+e),e},s=function(){var e,t,n,i,r,s,a,c,l,u,h,p,d,f,m;return this.code&&this.location?(h=this.location,a=h.first_line,s=h.first_column,l=h.last_line,c=h.last_column,null==l&&(l=a),null==c&&(c=s),r=this.filename||"[stdin]",e=this.code.split("\n")[a],m=s,i=a===l?c+1:e.length,u=e.slice(0,m).replace(/[^\s]/g," ")+o("^",i-m),"undefined"!=typeof process&&null!==process&&(n=(null!=(p=process.stdout)?p.isTTY:void 0)&&!(null!=(d=process.env)?d.NODE_DISABLE_COLORS:void 0)),(null!=(f=this.colorful)?f:n)&&(t=function(e){return"[1;31m"+e+"[0m"},e=e.slice(0,m)+t(e.slice(m,i))+e.slice(i),u=t(u)),r+":"+(a+1)+":"+(s+1)+": error: "+this.message+"\n"+e+"\n"+u):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case" ":return"space";case"\n":return"newline";case"\r":return"carriage return";case" ":return"tab";default:return e}}}.call(this),t.exports}(),require["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,o,s,a,c,l,u,h,p,d,f,m,g,b,y,v,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n&&(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){var i,s,a,c,l;for(l=this.tokens,i=0;c=l[e];){if(0===i&&t.call(this,c,e))return n.call(this,c,e);if(!c||0>i)return n.call(this,c,e-1);s=c[0],k.call(o,s)>=0?i+=1:(a=c[0],k.call(r,a)>=0&&(i-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,r;for(i=this.tokens,e=t=0,n=i.length;n>t&&(r=i[e][0],"TERMINATOR"===r);e=++t);return e?this.tokens.splice(0,e):void 0},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return")"===(n=e[0])||"CALL_END"===n||"OUTDENT"===e[0]&&")"===this.tag(t-1)},e=function(e,t){return this.tokens["OUTDENT"===e[0]?t-1:t][0]="CALL_END"},this.scanTokens(function(n,i){return"CALL_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e){var t;return"]"===(t=e[0])||"INDEX_END"===t},e=function(e){return e[0]="INDEX_END"},this.scanTokens(function(n,i){return"INDEX_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.indexOfTag=function(){var e,t,n,i,r,o,s;for(t=arguments[0],r=arguments.length>=2?w.call(arguments,1):[],e=0,n=i=0,o=r.length;o>=0?o>i:i>o;n=o>=0?++i:--i){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=r[n]&&("string"==typeof r[n]&&(r[n]=[r[n]]),s=this.tag(t+n+e),0>k.call(r[n],s)))return-1}return t+n+e-1},e.prototype.looksObjectish=function(e){var t,n;return this.indexOfTag(e,"@",null,":")>-1||this.indexOfTag(e,null,":")>-1?!0:(n=this.indexOfTag(e,o),n>-1&&(t=null,this.detectEnd(n+1,function(e){var t;return t=e[0],k.call(r,t)>=0},function(e,n){return t=n}),":"===this.tag(t+1))?!0:!1)},e.prototype.findTagsBackwards=function(e,t){var n,i,s,a,c,l,u;for(n=[];e>=0&&(n.length||(a=this.tag(e),0>k.call(t,a)&&(c=this.tag(e),0>k.call(o,c)||this.tokens[e].generated)&&(l=this.tag(e),0>k.call(h,l))));)i=this.tag(e),k.call(r,i)>=0&&n.push(this.tag(e)),s=this.tag(e),k.call(o,s)>=0&&n.length&&n.pop(),e-=1;return u=this.tag(e),k.call(t,u)>=0},e.prototype.addImplicitBracesAndParens=function(){var e,t;return e=[],t=null,this.scanTokens(function(i,u,p){var d,m,g,b,y,v,w,T,N,L,C,F,E,D,x,_,S,I,R,A,O,$,P,M,j,B,V,U;if(U=i[0],C=(F=u>0?p[u-1]:[])[0],N=(p.length-1>u?p[u+1]:[])[0],P=function(){return e[e.length-1]},M=u,g=function(e){return u-M+e},b=function(){var e,t;return null!=(e=P())?null!=(t=e[2])?t.ours:void 0:void 0},y=function(){var e;return b()&&"("===(null!=(e=P())?e[0]:void 0)},w=function(){var e;return b()&&"{"===(null!=(e=P())?e[0]:void 0)},v=function(){var e;return b&&"CONTROL"===(null!=(e=P())?e[0]:void 0)},j=function(t){var n;return n=null!=t?t:u,e.push(["(",n,{ours:!0}]),p.splice(n,0,f("CALL_START","(")),null==t?u+=1:void 0},d=function(){return e.pop(),p.splice(u,0,f("CALL_END",")",["","end of input",i[2]])),u+=1},B=function(t,n){var r,o;return null==n&&(n=!0),r=null!=t?t:u,e.push(["{",r,{sameLine:!0,startsLine:n,ours:!0}]),o=new String("{"),o.generated=!0,p.splice(r,0,f("{",o,i)),null==t?u+=1:void 0},m=function(t){return t=null!=t?t:u,e.pop(),p.splice(t,0,f("}","}",i)),u+=1},y()&&("IF"===U||"TRY"===U||"FINALLY"===U||"CATCH"===U||"CLASS"===U||"SWITCH"===U))return e.push(["CONTROL",u,{ours:!0}]),g(1);if("INDENT"===U&&b()){if("=>"!==C&&"->"!==C&&"["!==C&&"("!==C&&","!==C&&"{"!==C&&"TRY"!==C&&"ELSE"!==C&&"="!==C)for(;y();)d();return v()&&e.pop(),e.push([U,u]),g(1)}if(k.call(o,U)>=0)return e.push([U,u]),g(1);if(k.call(r,U)>=0){for(;b();)y()?d():w()?m():e.pop();t=e.pop()}if((k.call(c,U)>=0&&i.spaced||"?"===U&&u>0&&!p[u-1].spaced)&&(k.call(s,N)>=0||k.call(l,N)>=0&&!(null!=(E=p[u+1])?E.spaced:void 0)&&!(null!=(D=p[u+1])?D.newLine:void 0)))return"?"===U&&(U=i[0]="FUNC_EXIST"),j(u+1),g(2);if(k.call(c,U)>=0&&this.indexOfTag(u+1,"INDENT")>-1&&this.looksObjectish(u+2)&&!this.findTagsBackwards(u,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return j(u+1),e.push(["INDENT",u+2]),g(3);if(":"===U){for(R=function(){var e;switch(!1){case e=this.tag(u-1),0>k.call(r,e):return t[1];case"@"!==this.tag(u-2):return u-2;default:return u-1}}.call(this);"HERECOMMENT"===this.tag(R-2);)R-=2;return this.insideForDeclaration="FOR"===N,V=0===R||(x=this.tag(R-1),k.call(h,x)>=0)||p[R-1].newLine,P()&&(_=P(),$=_[0],O=_[1],("{"===$||"INDENT"===$&&"{"===this.tag(O-1))&&(V||","===this.tag(R-1)||"{"===this.tag(R-1)))?g(1):(B(R,!!V),g(2))}if(w()&&k.call(h,U)>=0&&(P()[2].sameLine=!1),T="OUTDENT"===C||F.newLine,k.call(a,U)>=0||k.call(n,U)>=0&&T)for(;b();)if(S=P(),$=S[0],O=S[1],I=S[2],A=I.sameLine,V=I.startsLine,y()&&","!==C)d();else if(w()&&!this.insideForDeclaration&&A&&"TERMINATOR"!==U&&":"!==C)m();else{if(!w()||"TERMINATOR"!==U||","===C||V&&this.looksObjectish(u+1))break;if("HERECOMMENT"===N)return g(1);m()}if(!(","!==U||this.looksObjectish(u+1)||!w()||this.insideForDeclaration||"TERMINATOR"===N&&this.looksObjectish(u+2)))for(L="OUTDENT"===N?1:0;w();)m(u+L);return g(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,r,o,s,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(o=null!=(a=n[t+1])?a[2]:void 0)?(r=o.first_line,i=o.first_column):(s=null!=(c=n[t-1])?c[2]:void 0)?(r=s.last_line,i=s.last_column):r=i=0,e[2]={first_line:r,first_column:i,last_line:r,last_column:i},1):1})},e.prototype.normalizeLines=function(){var e,t,r,o,s;return s=r=o=null,t=function(e,t){var r,o,a,c;return";"!==e[1]&&(r=e[0],k.call(p,r)>=0)&&!("TERMINATOR"===e[0]&&(o=this.tag(t+1),k.call(i,o)>=0))&&!("ELSE"===e[0]&&"THEN"!==s)&&!!("CATCH"!==(a=e[0])&&"FINALLY"!==a||"->"!==s&&"=>"!==s)||(c=e[0],k.call(n,c)>=0&&this.tokens[t-1].newLine)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,o)},this.scanTokens(function(n,a,c){var l,u,h,p,f,m;if(m=n[0],"TERMINATOR"===m){if("ELSE"===this.tag(a+1)&&"OUTDENT"!==this.tag(a-1))return c.splice.apply(c,[a,1].concat(w.call(this.indentation()))),1;if(h=this.tag(a+1),k.call(i,h)>=0)return c.splice(a,1),0}if("CATCH"===m)for(l=u=1;2>=u;l=++u)if("OUTDENT"===(p=this.tag(a+l))||"TERMINATOR"===p||"FINALLY"===p)return c.splice.apply(c,[a+l,0].concat(w.call(this.indentation()))),2+l;return k.call(d,m)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==m||"IF"!==this.tag(a+1))?(s=m,f=this.indentation(c[a]),r=f[0],o=f[1],"THEN"===s&&(r.fromThen=!0),c.splice(a+1,0,r),this.detectEnd(a+2,t,e),"THEN"===m&&c.splice(a,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,i;return i=e[0],n=this.tokens[t-1][0],"TERMINATOR"===i||"INDENT"===i&&0>k.call(d,n)},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,r){return"IF"!==i[0]?1:(n=i,this.detectEnd(r+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return t=["INDENT",2],n=["OUTDENT",2],e?(t.generated=n.generated=!0,t.origin=n.origin=e):t.explicit=n.explicit=!0,[t,n]},e.prototype.generate=f,e.prototype.tag=function(e){var t;return null!=(t=this.tokens[e])?t[0]:void 0},e}(),t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=u={},o=[],r=[],m=0,b=t.length;b>m;m++)y=t[m],g=y[0],v=y[1],o.push(u[v]=g),r.push(u[g]=v);i=["CATCH","THEN","ELSE","FINALLY"].concat(r),c=["IDENTIFIER","PROPERTY","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],s=["IDENTIFIER","PROPERTY","NUMBER","INFINITY","NAN","STRING","STRING_START","REGEX","REGEX_START","JS","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","UNDEFINED","NULL","BOOL","UNARY","YIELD","UNARY_MATH","SUPER","THROW","@","->","=>","[","(","{","--","++"],l=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],h=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"]}.call(this),t.exports}(),require["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,o,s,a,c,l,u,h,p,d,f,m,g,b,y,v,k,w,T,N,L,C,F,E,D,x,_,S,I,R,A,O,$,P,M,j,B,V,U,H,G,q,Y,X,W,J,z,K,Q,Z,et,tt,nt,it,rt,ot,st,at,ct,lt,ut,ht=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},pt=[].slice;st=require("./rewriter"),B=st.Rewriter,w=st.INVERSES,at=require("./helpers"),tt=at.count,lt=at.starts,et=at.compact,ct=at.repeat,nt=at.invertLiterate,ot=at.locationDataToString,ut=at.throwSyntaxError,e.Lexer=D=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,r,o;for(null==t&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.seenFor=!1,this.seenImport=!1,this.seenExport=!1,this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;this.chunk=e.slice(r);)if(n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),o=this.getLineAndColumnFromChunk(n),this.chunkLine=o[0],this.chunkColumn=o[1],r+=n,t.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:r};return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i.tag,i.origin[2]),t.rewrite===!1?this.tokens:(new B).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(J,""),Z.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=nt(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,r,c,l,u,h,p,d,f,m,g,y;return(l=b.exec(this.chunk))?(c=l[0],i=l[1],t=l[2],r=i.length,u=void 0,"own"===i&&"FOR"===this.tag()?(this.token("OWN",i),i.length):"from"===i&&"YIELD"===this.tag()?(this.token("FROM",i),i.length):"as"!==i||!this.seenImport||"IDENTIFIER"!==this.tag()&&"*"!==this.value()?"as"===i&&this.seenExport&&"IDENTIFIER"===this.tag()?(this.token("AS",i),i.length):"default"===i&&this.seenExport?(this.token("DEFAULT",i),i.length):(p=this.tokens,h=p[p.length-1],g=t||null!=h&&("."===(d=h[0])||"?."===d||"::"===d||"?::"===d||!h.spaced&&"@"===h[0])?"PROPERTY":"IDENTIFIER","IDENTIFIER"===g&&(ht.call(N,i)>=0||ht.call(a,i)>=0)&&(g=i.toUpperCase(),"WHEN"===g&&(f=this.tag(),ht.call(C,f)>=0)?g="LEADING_WHEN":"FOR"===g?this.seenFor=!0:"UNLESS"===g?g="IF":"IMPORT"===g?this.seenImport=!0:"EXPORT"===g?this.seenExport=!0:ht.call(z,g)>=0?g="UNARY":ht.call(M,g)>=0&&("INSTANCEOF"!==g&&this.seenFor?(g="FOR"+g,this.seenFor=!1):(g="RELATION","!"===this.value()&&(u=this.tokens.pop(),i="!"+i)))),"IDENTIFIER"===g&&ht.call(j,i)>=0&&this.error("reserved word '"+i+"'",{length:i.length}),"PROPERTY"!==g&&(ht.call(o,i)>=0&&(e=i,i=s[i]),g=function(){switch(i){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":case"debugger":return"STATEMENT";default:return g}}()),y=this.token(g,i,0,r),e&&(y.origin=[g,e,y[2]]),u&&(m=[u[2].first_line,u[2].first_column],y[2].first_line=m[0],y[2].first_column=m[1]),t&&(n=c.lastIndexOf(":"),this.token(":",":",n,t.length)),c.length):("*"===this.value()&&(this.tokens[this.tokens.length-1][0]="IMPORT_ALL"),this.token("AS",i),i.length)):0},e.prototype.numberToken=function(){var e,t,n,i,r,o,s;return(n=I.exec(this.chunk))?(i=n[0],t=i.length,/^0[BOX]/.test(i)?this.error("radix prefix in '"+i+"' must be lowercase",{offset:1}):/E/.test(i)&&!/^0x/.test(i)?this.error("exponential notation in '"+i+"' must be indicated with a lowercase 'e'",{offset:i.indexOf("E")}):/^0\d*[89]/.test(i)?this.error("decimal literal '"+i+"' must not be prefixed with '0'",{length:t}):/^0\d+/.test(i)&&this.error("octal literal '"+i+"' must be prefixed with '0o'",{length:t}),(o=/^0o([0-7]+)/.exec(i))?(r=parseInt(o[1],8),i="0x"+r.toString(16)):(e=/^0b([01]+)/.exec(i))?(r=parseInt(e[1],2),i="0x"+r.toString(16)):r=parseFloat(i),s=Infinity===r?"INFINITY":"NUMBER",this.token(s,i,0,t),t):0},e.prototype.stringToken=function(){var e,t,n,i,r,o,s,a,c,l,u,h,m,g,b,y;if(u=(X.exec(this.chunk)||[])[0],!u)return 0;if(this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM"),g=function(){switch(u){case"'":return Y;case'"':return G;case"'''":return f;case'"""':return p}}(),o=3===u.length,h=this.matchWithInterpolations(g,u),y=h.tokens,r=h.index,e=y.length-1,n=u.charAt(0),o){for(a=null,i=function(){var e,t,n;for(n=[],s=e=0,t=y.length;t>e;s=++e)b=y[s],"NEOSTRING"===b[0]&&n.push(b[1]);return n}().join("#{}");l=d.exec(i);)t=l[1],(null===a||(m=t.length)>0&&a.length>m)&&(a=t);a&&(c=RegExp("^"+a,"gm")),this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),0===i&&(n=n.replace(L,"")),i===e&&(n=n.replace(W,"")),c&&(n=n.replace(c,"")),n}}(this))}else this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),n=n.replace(U,function(t,r){return 0===i&&0===r||i===e&&r+t.length===n.length?"":" "})}}(this));return r},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&((n=h.exec(e))&&this.error("block comments cannot contain "+n[0],{offset:n.index,length:n[0].length}),t.indexOf("\n")>=0&&(t=t.replace(RegExp("\\n"+ct(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",t,0,e.length)),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=T.exec(this.chunk))?(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length):0},e.prototype.regexToken=function(){var e,t,n,r,o,s,a,c,l,u,h,p,d;switch(!1){case!(s=P.exec(this.chunk)):this.error("regular expressions cannot begin with "+s[2],{offset:s.index+s[1].length});break;case!(s=this.matchWithInterpolations(m,"///")):d=s.tokens,o=s.index;break;case!(s=O.exec(this.chunk)):if(p=s[0],e=s[1],t=s[2],this.validateEscapes(e,{isRegex:!0,offsetInChunk:1}),o=p.length,l=this.tokens,c=l[l.length-1],c)if(c.spaced&&(u=c[0],ht.call(i,u)>=0)){if(!t||A.test(p))return 0}else if(h=c[0],ht.call(S,h)>=0)return 0;t||this.error("missing / (unclosed regex)");break;default:return 0}switch(r=$.exec(this.chunk.slice(o))[0],n=o+r.length,a=this.makeToken("REGEX",null,0,n),!1){case!!Q.test(r):this.error("invalid regular expression flags "+r,{offset:o,length:r.length});break;case!(p||1===d.length):null==e&&(e=this.formatHeregex(d[0][1])),this.token("REGEX",""+this.makeDelimitedLiteral(e,{delimiter:"/"})+r,0,n,a);break;default:this.token("REGEX_START","(",0,0,a),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(d,{delimiter:'"',"double":!0},this.formatHeregex),r&&(this.token(",",",",o,0),this.token("STRING",'"'+r+'"',o,r.length)),this.token(")",")",n,0),this.token("REGEX_END",")",n,0)}return n},e.prototype.lineToken=function(){var e,t,n,i,r;if(!(n=_.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,r=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),r-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(r>this.indent){if(i)return this.indebt=r-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=r,t.length;e=r-this.indent+this.outdebt,this.token("INDENT",e,t.length-r,r),this.indents.push(e),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=r}else this.baseIndent>r?this.error("missing indentation",{offset:t.length}):(this.indebt=0,this.outdentToken(this.indent-r,i,t.length));return t.length},e.prototype.outdentToken=function(e,t,n){var i,r,o,s;for(i=this.indent-e;e>0;)o=this.indents[this.indents.length-1],o?o===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.outdebt>o?(this.outdebt-=o,e-=o):(r=this.indents.pop()+this.outdebt,n&&(s=this.chunk[n],ht.call(y,s)>=0)&&(i-=r-e,e=r),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",e,0,n),e-=r):e=0;for(r&&(this.outdebt-=e);";"===this.value();)this.tokens.pop();return"TERMINATOR"===this.tag()||t||this.token("TERMINATOR","\n",n,0),this.indent=i,this},e.prototype.whitespaceToken=function(){var e,t,n,i;return(e=Z.exec(this.chunk))||(t="\n"===this.chunk.charAt(0))?(i=this.tokens,n=i[i.length-1],n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0):0},e.prototype.newlineToken=function(e){for(;";"===this.value();)this.tokens.pop();return"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return"\\"===this.value()&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,o,s,a,c,h,p,d,f,m,g;if((e=R.exec(this.chunk))?(g=e[0],r.test(g)&&this.tagParameters()):g=this.chunk.charAt(0),f=g,s=this.tokens,o=s[s.length-1],o&&ht.call(["="].concat(pt.call(u)),g)>=0&&(d=!1,"="!==g||"||"!==(a=o[1])&&"&&"!==a||o.spaced||(o[0]="COMPOUND_ASSIGN",o[1]+="=",o=this.tokens[this.tokens.length-2],d=!0),o&&"PROPERTY"!==o[0]&&(n=null!=(c=o.origin)?c:o,t=it(o[1],n[1]),t&&this.error(t,n[2])),d))return g.length;if(";"===g)this.seenFor=this.seenImport=this.seenExport=!1,f="TERMINATOR";else if("*"===g&&"EXPORT"===o[0])f="EXPORT_ALL";else if(ht.call(x,g)>=0)f="MATH";else if(ht.call(l,g)>=0)f="COMPARE";else if(ht.call(u,g)>=0)f="COMPOUND_ASSIGN";else if(ht.call(z,g)>=0)f="UNARY";else if(ht.call(K,g)>=0)f="UNARY_MATH";else if(ht.call(V,g)>=0)f="SHIFT";else if(ht.call(E,g)>=0||"?"===g&&(null!=o?o.spaced:void 0))f="LOGIC";else if(o&&!o.spaced)if("("===g&&(h=o[0],ht.call(i,h)>=0))"?"===o[0]&&(o[0]="FUNC_EXIST"),f="CALL_START";else if("["===g&&(p=o[0],ht.call(v,p)>=0))switch(f="INDEX_START",o[0]){case"?":o[0]="INDEX_SOAK"}switch(m=this.makeToken(f,g),g){case"(":case"{":case"[":this.ends.push({tag:w[g],origin:m});break;case")":case"}":case"]":this.pair(g)}return this.tokens.push(m),g.length},e.prototype.tagParameters=function(){var e,t,n,i;if(")"!==this.tag())return this;for(t=[],i=this.tokens,e=i.length,i[--e][0]="PARAM_END";n=i[--e];)switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return"("===n[0]?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.matchWithInterpolations=function(t,n){var i,r,o,s,a,c,l,u,h,p,d,f,m,g,b;if(b=[],u=n.length,this.chunk.slice(0,u)!==n)return null;for(m=this.chunk.slice(u);;){if(g=t.exec(m)[0],this.validateEscapes(g,{isRegex:"/"===n.charAt(0),offsetInChunk:u}),b.push(this.makeToken("NEOSTRING",g,u)),m=m.slice(g.length),u+=g.length,"#{"!==m.slice(0,2))break;p=this.getLineAndColumnFromChunk(u+1),c=p[0],r=p[1],d=(new e).tokenize(m.slice(1),{line:c,column:r,untilBalanced:!0}),l=d.tokens,s=d.index,s+=1,h=l[0],i=l[l.length-1],h[0]=h[1]="(",i[0]=i[1]=")",i.origin=["","end of interpolation",i[2]],"TERMINATOR"===(null!=(f=l[1])?f[0]:void 0)&&l.splice(1,1),b.push(["TOKENS",l]),m=m.slice(s),u+=s}return m.slice(0,n.length)!==n&&this.error("missing "+n,{length:n.length}),o=b[0],a=b[b.length-1],o[2].first_column-=n.length,a[2].last_column+=n.length,0===a[1].length&&(a[2].last_column-=1),{tokens:b,index:u+n.length}},e.prototype.mergeInterpolationTokens=function(e,t,n){var i,r,o,s,a,c,l,u,h,p,d,f,m,g,b,y;for(e.length>1&&(h=this.token("STRING_START","(",0,0)),o=this.tokens.length,s=a=0,l=e.length;l>a;s=++a){switch(g=e[s],m=g[0],y=g[1],m){case"TOKENS":if(2===y.length)continue;u=y[0],b=y;break;case"NEOSTRING":if(i=n(g[1],s),0===i.length){if(0!==s)continue;r=this.tokens.length}2===s&&null!=r&&this.tokens.splice(r,2),g[0]="STRING",g[1]=this.makeDelimitedLiteral(i,t),u=g,b=[g]}this.tokens.length>o&&(p=this.token("+","+"),p[2]={first_line:u[2].first_line,first_column:u[2].first_column,last_line:u[2].first_line,last_column:u[2].first_column}),(d=this.tokens).push.apply(d,b)}return h?(c=e[e.length-1],h.origin=["STRING",null,{first_line:h[2].first_line,first_column:h[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],f=this.token("STRING_END",")"),f[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}):void 0},e.prototype.pair=function(e){var t,n,i,r,o;return i=this.ends,n=i[i.length-1],e!==(o=null!=n?n.tag:void 0)?("OUTDENT"!==o&&this.error("unmatched "+e),r=this.indents,t=r[r.length-1],this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,r,o;return 0===e?[this.chunkLine,this.chunkColumn]:(o=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),i=tt(o,"\n"),t=this.chunkColumn,i>0?(r=o.split("\n"),n=r[r.length-1],t=n.length):t+=o.length,[this.chunkLine+i,t])},e.prototype.makeToken=function(e,t,n,i){var r,o,s,a,c;return null==n&&(n=0),null==i&&(i=t.length),o={},s=this.getLineAndColumnFromChunk(n),o.first_line=s[0],o.first_column=s[1],r=i>0?i-1:0,a=this.getLineAndColumnFromChunk(n+r),o.last_line=a[0],o.last_column=a[1],c=[e,t,o]},e.prototype.token=function(e,t,n,i,r){var o;return o=this.makeToken(e,t,n,i),r&&(o.origin=r),this.tokens.push(o),o},e.prototype.tag=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[0]:void 0},e.prototype.value=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[1]:void 0},e.prototype.unfinished=function(){var e;return F.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"UNARY_MATH"===e||"+"===e||"-"===e||"**"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.formatString=function(e){return e.replace(q,"$1")},e.prototype.formatHeregex=function(e){return e.replace(g,"$1$2")},e.prototype.validateEscapes=function(e,t){var n,i,r,o,s,a,c,l;return null==t&&(t={}),o=k.exec(e),!o||(o[0],n=o[1],a=o[2],i=o[3],l=o[4],t.isRegex&&a&&"0"!==a.charAt(0))?void 0:(s=a?"octal escape sequences are not allowed":"invalid escape sequence",r="\\"+(a||i||l),this.error(s+" "+r,{offset:(null!=(c=t.offsetInChunk)?c:0)+o.index+n.length,length:r.length}))},e.prototype.makeDelimitedLiteral=function(e,t){var n;return null==t&&(t={}),""===e&&"/"===t.delimiter&&(e="(?:)"),n=RegExp("(\\\\\\\\)|(\\\\0(?=[1-7]))|\\\\?("+t.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),e=e.replace(n,function(e,n,i,r,o,s,a,c,l){switch(!1){case!n:return t.double?n+n:n;case!i:return"\\x00";case!r:return"\\"+r;case!o:return"\\n";case!s:return"\\r";case!a:return"\\u2028";case!c:return"\\u2029";case!l:return t.double?"\\"+l:l}}),""+t.delimiter+e+t.delimiter},e.prototype.error=function(e,t){var n,i,r,o,s,a;return null==t&&(t={}),r="first_line"in t?t:(s=this.getLineAndColumnFromChunk(null!=(o=t.offset)?o:0),i=s[0],n=s[1],s,{first_line:i,first_column:n,last_column:n+(null!=(a=t.length)?a:1)-1}),ut(e,r)},e}(),it=function(e,t){switch(null==t&&(t=e),!1){case 0>ht.call(pt.call(N).concat(pt.call(a)),e):return"keyword '"+t+"' can't be assigned";case 0>ht.call(H,e):return"'"+t+"' can't be assigned";case 0>ht.call(j,e):return"reserved word '"+t+"' can't be assigned";default:return!1}},e.isUnassignable=it,N=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","if","else","switch","for","while","do","try","catch","finally","class","extends","super","import","export","default"],a=["undefined","Infinity","NaN","then","unless","until","loop","of","by","when"],s={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},o=function(){var e;e=[];for(rt in s)e.push(rt);return e}(),a=a.concat(o),j=["case","function","var","void","with","const","let","enum","native","implements","interface","package","private","protected","public","static"],H=["arguments","eval"],e.JS_FORBIDDEN=N.concat(j).concat(H),t=65279,b=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,I=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,R=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,Z=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,r=/^[-=]>/,_=/^(?:\n[^\n\S]*)+/,T=/^`[^\\`]*(?:\\.[^\\`]*)*`/,X=/^(?:'''|"""|'|")/,Y=/^(?:[^\\']|\\[\s\S])*/,G=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,f=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,p=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,q=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,U=/\s*\n\s*/g,d=/\n+([^\n\S]*)(?=\S)/g,O=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,$=/^\w*/,Q=/^(?!.*(.).*\1)[imgy]*$/,m=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/,g=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,P=/^(\/|\/{3}\s*)(\*)/,A=/^\/=?\s/,h=/\*\//,F=/^\s*(?:,|\??\.(?![.\d])|::)/,k=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/,L=/^[^\n\S]*\n/,W=/\n[^\n\S]*$/,J=/\s+$/,u=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],z=["NEW","TYPEOF","DELETE","DO"],K=["!","~"],E=["&&","||","&","|","^"],V=["<<",">>",">>>"],l=["==","!=","<",">","<=",">="],x=["*","/","%","//","%%"],M=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],i=["IDENTIFIER","PROPERTY",")","]","?","@","THIS","SUPER"],v=i.concat(["NUMBER","INFINITY","NAN","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),S=v.concat(["++","--"]),C=["INDENT","OUTDENT","TERMINATOR"],y=[")","}","]"]}.call(this),t.exports}(),require["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[1,22],i=[1,25],r=[1,83],o=[1,79],s=[1,84],a=[1,85],c=[1,81],l=[1,82],u=[1,56],h=[1,58],p=[1,59],d=[1,60],f=[1,61],m=[1,62],g=[1,49],b=[1,50],y=[1,32],v=[1,68],k=[1,69],w=[1,78],T=[1,47],N=[1,51],L=[1,52],C=[1,67],F=[1,65],E=[1,66],D=[1,64],x=[1,42],_=[1,48],S=[1,63],I=[1,73],R=[1,74],A=[1,75],O=[1,76],$=[1,46],P=[1,72],M=[1,34],j=[1,35],B=[1,36],V=[1,37],U=[1,38],H=[1,39],G=[1,86],q=[1,6,32,42,131],Y=[1,96],X=[1,89],W=[1,88],J=[1,87],z=[1,90],K=[1,91],Q=[1,92],Z=[1,93],et=[1,94],tt=[1,95],nt=[1,99],it=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],rt=[1,105],ot=[1,106],st=[1,107],at=[1,108],ct=[1,110],lt=[1,111],ut=[1,104],ht=[2,161],pt=[1,6,32,42,131,133,135,139,155],dt=[2,27],ft=[1,118],mt=[1,116],gt=[1,6,31,32,42,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],bt=[2,94],yt=[1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],vt=[2,73],kt=[1,123],wt=[1,128],Tt=[1,129],Nt=[1,131],Lt=[1,6,31,32,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],Ct=[2,91],Ft=[1,6,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],Et=[2,63],Dt=[1,161],xt=[1,173],_t=[1,175],St=[1,170],It=[1,177],Rt=[1,179],At=[1,6,31,32,42,55,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,155,158,159,160,161,162,163,164,165,166,167,168,169],Ot=[2,110],$t=[1,6,31,32,42,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],Pt=[1,229],Mt=[1,228],jt=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155],Bt=[2,71],Vt=[1,238],Ut=[6,31,32,65,70],Ht=[6,31,32,55,65,70,73],Gt=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,158,159,163,165,166,167,168],qt=[82,83,84,85,87,90,113,114],Yt=[1,257],Xt=[2,62],Wt=[1,267],Jt=[1,273],zt=[2,182],Kt=[1,6,31,32,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,146,147,155,158,159,162,163,164,165,166,167,168],Qt=[1,283],Zt=[6,31,32,70,115,120],en=[1,6,31,32,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,146,147,155,158,159,160,161,162,163,164,165,166,167,168,169],tn=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,140,155],nn=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,134,140,155],rn=[146,147],on=[70,146,147],sn=[6,31,94],an=[1,296],cn=[6,31,32,70,94],ln=[6,31,32,58,70,94],un=[6,31,32,55,58,70,94],hn=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,158,159,165,166,167,168],pn=[12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,89,92,95,97,104,112,117,118,119,125,129,130,133,135,137,139,148,154,156,157,158,159,160,161],dn=[2,171],fn=[6,31,32],mn=[2,72],gn=[1,308],bn=[1,309],yn=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,128,131,133,134,135,139,140,150,152,155,158,159,162,163,164,165,166,167,168],vn=[32,150,152],kn=[1,6,32,42,65,70,73,89,94,115,120,122,131,134,140,155],wn=[1,335],Tn=[1,340],Nn=[1,6,32,42,131,155],Ln=[2,86],Cn=[1,350],Fn=[1,351],En=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,150,155,158,159,162,163,164,165,166,167,168],Dn=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,140,155],xn=[1,363],_n=[1,364],Sn=[6,31,32,94],In=[6,31,32,70],Rn=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],An=[31,70],On=[1,390],$n=[1,391],Pn=[1,396],Mn=[1,397],jn={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,YieldReturn:9,Return:10,Comment:11,STATEMENT:12,Import:13,Export:14,Value:15,Invocation:16,Code:17,Operation:18,Assign:19,If:20,Try:21,While:22,For:23,Switch:24,Class:25,Throw:26,Yield:27,YIELD:28,FROM:29,Block:30,INDENT:31,OUTDENT:32,Identifier:33,IDENTIFIER:34,Property:35,PROPERTY:36,AlphaNumeric:37,NUMBER:38,String:39,STRING:40,STRING_START:41,STRING_END:42,Regex:43,REGEX:44,REGEX_START:45,REGEX_END:46,Literal:47,JS:48,UNDEFINED:49,NULL:50,BOOL:51,INFINITY:52,NAN:53,Assignable:54,"=":55,AssignObj:56,ObjAssignable:57,":":58,SimpleObjAssignable:59,ThisProperty:60,RETURN:61,HERECOMMENT:62,PARAM_START:63,ParamList:64,PARAM_END:65,FuncGlyph:66,"->":67,"=>":68,OptComma:69,",":70,Param:71,ParamVar:72,"...":73,Array:74,Object:75,Splat:76,SimpleAssignable:77,Accessor:78,Parenthetical:79,Range:80,This:81,".":82,"?.":83,"::":84,"?::":85,Index:86,INDEX_START:87,IndexValue:88,INDEX_END:89,INDEX_SOAK:90,Slice:91,"{":92,AssignList:93,"}":94,CLASS:95,EXTENDS:96,IMPORT:97,ImportDefaultSpecifier:98,ImportNamespaceSpecifier:99,ImportSpecifierList:100,ImportSpecifier:101,AS:102,IMPORT_ALL:103,EXPORT:104,ExportSpecifierList:105,DEFAULT:106,EXPORT_ALL:107,ExportSpecifier:108,OptFuncExist:109,Arguments:110,Super:111,SUPER:112,FUNC_EXIST:113,CALL_START:114,CALL_END:115,ArgList:116,THIS:117,"@":118,"[":119,"]":120,RangeDots:121,"..":122,Arg:123,SimpleArgs:124,TRY:125,Catch:126,FINALLY:127,CATCH:128,THROW:129,"(":130,")":131,WhileSource:132,WHILE:133,WHEN:134,UNTIL:135,Loop:136,LOOP:137,ForBody:138,FOR:139,BY:140,ForStart:141,ForSource:142,ForVariables:143,OWN:144,ForValue:145,FORIN:146,FOROF:147,SWITCH:148,Whens:149,ELSE:150,When:151,LEADING_WHEN:152,IfBlock:153,IF:154,POST_IF:155,UNARY:156,UNARY_MATH:157,"-":158,"+":159,"--":160,"++":161,"?":162,MATH:163,"**":164,SHIFT:165,COMPARE:166,LOGIC:167,RELATION:168,COMPOUND_ASSIGN:169,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"STATEMENT",28:"YIELD",29:"FROM",31:"INDENT",32:"OUTDENT",34:"IDENTIFIER",36:"PROPERTY",38:"NUMBER",40:"STRING",41:"STRING_START",42:"STRING_END",44:"REGEX",45:"REGEX_START",46:"REGEX_END",48:"JS",49:"UNDEFINED",50:"NULL",51:"BOOL",52:"INFINITY",53:"NAN",55:"=",58:":",61:"RETURN",62:"HERECOMMENT",63:"PARAM_START",65:"PARAM_END",67:"->",68:"=>",70:",",73:"...",82:".",83:"?.",84:"::",85:"?::",87:"INDEX_START",89:"INDEX_END",90:"INDEX_SOAK",92:"{",94:"}",95:"CLASS",96:"EXTENDS",97:"IMPORT",102:"AS",103:"IMPORT_ALL",104:"EXPORT",106:"DEFAULT",107:"EXPORT_ALL",112:"SUPER",113:"FUNC_EXIST",114:"CALL_START",115:"CALL_END",117:"THIS",118:"@",119:"[",120:"]",122:"..",125:"TRY",127:"FINALLY",128:"CATCH",129:"THROW",130:"(",131:")",133:"WHILE",134:"WHEN",135:"UNTIL",137:"LOOP",139:"FOR",140:"BY",144:"OWN",146:"FORIN",147:"FOROF",148:"SWITCH",150:"ELSE",152:"LEADING_WHEN",154:"IF",155:"POST_IF",156:"UNARY",157:"UNARY_MATH",158:"-",159:"+",160:"--",161:"++",162:"?",163:"MATH",164:"**",165:"SHIFT",166:"COMPARE",167:"LOGIC",168:"RELATION",169:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[8,1],[8,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[27,1],[27,2],[27,3],[30,2],[30,3],[33,1],[35,1],[37,1],[37,1],[39,1],[39,3],[43,1],[43,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[19,3],[19,4],[19,5],[56,1],[56,3],[56,5],[56,3],[56,5],[56,1],[59,1],[59,1],[59,1],[57,1],[57,1],[10,2],[10,1],[9,3],[9,2],[11,1],[17,5],[17,2],[66,1],[66,1],[69,0],[69,1],[64,0],[64,1],[64,3],[64,4],[64,6],[71,1],[71,2],[71,3],[71,1],[72,1],[72,1],[72,1],[72,1],[76,2],[77,1],[77,2],[77,2],[77,1],[54,1],[54,1],[54,1],[15,1],[15,1],[15,1],[15,1],[15,1],[78,2],[78,2],[78,2],[78,2],[78,1],[78,1],[86,3],[86,2],[88,1],[88,1],[75,4],[93,0],[93,1],[93,3],[93,4],[93,6],[25,1],[25,2],[25,3],[25,4],[25,2],[25,3],[25,4],[25,5],[13,2],[13,4],[13,4],[13,5],[13,7],[13,6],[13,9],[100,1],[100,3],[100,4],[100,4],[100,6],[101,1],[101,3],[98,1],[99,3],[14,3],[14,5],[14,2],[14,4],[14,5],[14,6],[14,3],[14,4],[14,7],[105,1],[105,3],[105,4],[105,4],[105,6],[108,1],[108,3],[108,3],[16,3],[16,3],[16,1],[111,1],[111,2],[109,0],[109,1],[110,2],[110,4],[81,1],[81,1],[60,2],[74,2],[74,4],[121,1],[121,1],[80,5],[91,3],[91,2],[91,2],[91,1],[116,1],[116,3],[116,4],[116,4],[116,6],[123,1],[123,1],[123,1],[124,1],[124,3],[21,2],[21,3],[21,4],[21,5],[126,3],[126,3],[126,2],[26,2],[79,3],[79,5],[132,2],[132,4],[132,2],[132,4],[22,2],[22,2],[22,2],[22,1],[136,2],[136,2],[23,2],[23,2],[23,2],[138,2],[138,4],[138,2],[141,2],[141,3],[145,1],[145,1],[145,1],[145,1],[143,1],[143,3],[142,2],[142,2],[142,4],[142,4],[142,4],[142,6],[142,6],[24,5],[24,7],[24,4],[24,6],[149,1],[149,2],[151,3],[151,4],[153,3],[153,5],[20,1],[20,3],[20,3],[20,3],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,5],[18,4],[18,3]],performAction:function(e,t,n,i,r,o,s){var a=o.length-1;
+switch(r){case 1:return this.$=i.addLocationDataFn(s[a],s[a])(new i.Block);case 2:return this.$=o[a];case 3:this.$=i.addLocationDataFn(s[a],s[a])(i.Block.wrap([o[a]]));break;case 4:this.$=i.addLocationDataFn(s[a-2],s[a])(o[a-2].push(o[a]));break;case 5:this.$=o[a-1];break;case 6:case 7:case 8:case 9:case 10:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 35:case 40:case 42:case 56:case 57:case 58:case 59:case 60:case 61:case 71:case 72:case 82:case 83:case 84:case 85:case 90:case 91:case 94:case 98:case 104:case 158:case 182:case 183:case 185:case 215:case 216:case 232:case 238:this.$=o[a];break;case 11:this.$=i.addLocationDataFn(s[a],s[a])(new i.StatementLiteral(o[a]));break;case 27:this.$=i.addLocationDataFn(s[a],s[a])(new i.Op(o[a],new i.Value(new i.Literal(""))));break;case 28:case 242:case 243:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op(o[a-1],o[a]));break;case 29:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Op(o[a-2].concat(o[a-1]),o[a]));break;case 30:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Block);break;case 31:case 105:this.$=i.addLocationDataFn(s[a-2],s[a])(o[a-1]);break;case 32:this.$=i.addLocationDataFn(s[a],s[a])(new i.IdentifierLiteral(o[a]));break;case 33:this.$=i.addLocationDataFn(s[a],s[a])(new i.PropertyName(o[a]));break;case 34:this.$=i.addLocationDataFn(s[a],s[a])(new i.NumberLiteral(o[a]));break;case 36:this.$=i.addLocationDataFn(s[a],s[a])(new i.StringLiteral(o[a]));break;case 37:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.StringWithInterpolations(o[a-1]));break;case 38:this.$=i.addLocationDataFn(s[a],s[a])(new i.RegexLiteral(o[a]));break;case 39:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.RegexWithInterpolations(o[a-1].args));break;case 41:this.$=i.addLocationDataFn(s[a],s[a])(new i.PassthroughLiteral(o[a]));break;case 43:this.$=i.addLocationDataFn(s[a],s[a])(new i.UndefinedLiteral);break;case 44:this.$=i.addLocationDataFn(s[a],s[a])(new i.NullLiteral);break;case 45:this.$=i.addLocationDataFn(s[a],s[a])(new i.BooleanLiteral(o[a]));break;case 46:this.$=i.addLocationDataFn(s[a],s[a])(new i.InfinityLiteral(o[a]));break;case 47:this.$=i.addLocationDataFn(s[a],s[a])(new i.NaNLiteral);break;case 48:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Assign(o[a-2],o[a]));break;case 49:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Assign(o[a-3],o[a]));break;case 50:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Assign(o[a-4],o[a-1]));break;case 51:case 87:case 92:case 93:case 95:case 96:case 97:case 217:case 218:this.$=i.addLocationDataFn(s[a],s[a])(new i.Value(o[a]));break;case 52:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Assign(i.addLocationDataFn(s[a-2])(new i.Value(o[a-2])),o[a],"object",{operatorToken:i.addLocationDataFn(s[a-1])(new i.Literal(o[a-1]))}));break;case 53:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Assign(i.addLocationDataFn(s[a-4])(new i.Value(o[a-4])),o[a-1],"object",{operatorToken:i.addLocationDataFn(s[a-3])(new i.Literal(o[a-3]))}));break;case 54:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Assign(i.addLocationDataFn(s[a-2])(new i.Value(o[a-2])),o[a],null,{operatorToken:i.addLocationDataFn(s[a-1])(new i.Literal(o[a-1]))}));break;case 55:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Assign(i.addLocationDataFn(s[a-4])(new i.Value(o[a-4])),o[a-1],null,{operatorToken:i.addLocationDataFn(s[a-3])(new i.Literal(o[a-3]))}));break;case 62:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Return(o[a]));break;case 63:this.$=i.addLocationDataFn(s[a],s[a])(new i.Return);break;case 64:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.YieldReturn(o[a]));break;case 65:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.YieldReturn);break;case 66:this.$=i.addLocationDataFn(s[a],s[a])(new i.Comment(o[a]));break;case 67:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Code(o[a-3],o[a],o[a-1]));break;case 68:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Code([],o[a],o[a-1]));break;case 69:this.$=i.addLocationDataFn(s[a],s[a])("func");break;case 70:this.$=i.addLocationDataFn(s[a],s[a])("boundfunc");break;case 73:case 110:this.$=i.addLocationDataFn(s[a],s[a])([]);break;case 74:case 111:case 130:case 148:case 177:case 219:this.$=i.addLocationDataFn(s[a],s[a])([o[a]]);break;case 75:case 112:case 131:case 149:case 178:this.$=i.addLocationDataFn(s[a-2],s[a])(o[a-2].concat(o[a]));break;case 76:case 113:case 132:case 150:case 179:this.$=i.addLocationDataFn(s[a-3],s[a])(o[a-3].concat(o[a]));break;case 77:case 114:case 134:case 152:case 181:this.$=i.addLocationDataFn(s[a-5],s[a])(o[a-5].concat(o[a-2]));break;case 78:this.$=i.addLocationDataFn(s[a],s[a])(new i.Param(o[a]));break;case 79:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Param(o[a-1],null,!0));break;case 80:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Param(o[a-2],o[a]));break;case 81:case 184:this.$=i.addLocationDataFn(s[a],s[a])(new i.Expansion);break;case 86:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Splat(o[a-1]));break;case 88:this.$=i.addLocationDataFn(s[a-1],s[a])(o[a-1].add(o[a]));break;case 89:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Value(o[a-1],[].concat(o[a])));break;case 99:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Access(o[a]));break;case 100:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Access(o[a],"soak"));break;case 101:this.$=i.addLocationDataFn(s[a-1],s[a])([i.addLocationDataFn(s[a-1])(new i.Access(new i.PropertyName("prototype"))),i.addLocationDataFn(s[a])(new i.Access(o[a]))]);break;case 102:this.$=i.addLocationDataFn(s[a-1],s[a])([i.addLocationDataFn(s[a-1])(new i.Access(new i.PropertyName("prototype"),"soak")),i.addLocationDataFn(s[a])(new i.Access(o[a]))]);break;case 103:this.$=i.addLocationDataFn(s[a],s[a])(new i.Access(new i.PropertyName("prototype")));break;case 106:this.$=i.addLocationDataFn(s[a-1],s[a])(i.extend(o[a],{soak:!0}));break;case 107:this.$=i.addLocationDataFn(s[a],s[a])(new i.Index(o[a]));break;case 108:this.$=i.addLocationDataFn(s[a],s[a])(new i.Slice(o[a]));break;case 109:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Obj(o[a-2],o[a-3].generated));break;case 115:this.$=i.addLocationDataFn(s[a],s[a])(new i.Class);break;case 116:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Class(null,null,o[a]));break;case 117:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Class(null,o[a]));break;case 118:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Class(null,o[a-1],o[a]));break;case 119:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Class(o[a]));break;case 120:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Class(o[a-1],null,o[a]));break;case 121:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Class(o[a-2],o[a]));break;case 122:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Class(o[a-3],o[a-1],o[a]));break;case 123:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.ImportDeclaration(null,o[a]));break;case 124:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.ImportDeclaration(new i.ImportClause(o[a-2],null),o[a]));break;case 125:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.ImportDeclaration(new i.ImportClause(null,o[a-2]),o[a]));break;case 126:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.ImportDeclaration(new i.ImportClause(null,new i.ImportSpecifierList([])),o[a]));break;case 127:this.$=i.addLocationDataFn(s[a-6],s[a])(new i.ImportDeclaration(new i.ImportClause(null,new i.ImportSpecifierList(o[a-4])),o[a]));break;case 128:this.$=i.addLocationDataFn(s[a-5],s[a])(new i.ImportDeclaration(new i.ImportClause(o[a-4],o[a-2]),o[a]));break;case 129:this.$=i.addLocationDataFn(s[a-8],s[a])(new i.ImportDeclaration(new i.ImportClause(o[a-7],new i.ImportSpecifierList(o[a-4])),o[a]));break;case 133:case 151:case 164:case 180:this.$=i.addLocationDataFn(s[a-3],s[a])(o[a-2]);break;case 135:this.$=i.addLocationDataFn(s[a],s[a])(new i.ImportSpecifier(o[a]));break;case 136:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ImportSpecifier(o[a-2],o[a]));break;case 137:this.$=i.addLocationDataFn(s[a],s[a])(new i.ImportDefaultSpecifier(o[a]));break;case 138:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ImportNamespaceSpecifier(new i.Literal(o[a-2]),o[a]));break;case 139:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ExportNamedDeclaration(new i.ExportSpecifierList([])));break;case 140:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.ExportNamedDeclaration(new i.ExportSpecifierList(o[a-2])));break;case 141:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.ExportNamedDeclaration(o[a]));break;case 142:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.ExportNamedDeclaration(new i.Assign(o[a-2],o[a],null,{moduleDeclaration:"export"})));break;case 143:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.ExportNamedDeclaration(new i.Assign(o[a-3],o[a],null,{moduleDeclaration:"export"})));break;case 144:this.$=i.addLocationDataFn(s[a-5],s[a])(new i.ExportNamedDeclaration(new i.Assign(o[a-4],o[a-1],null,{moduleDeclaration:"export"})));break;case 145:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ExportDefaultDeclaration(o[a]));break;case 146:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.ExportAllDeclaration(new i.Literal(o[a-2]),o[a]));break;case 147:this.$=i.addLocationDataFn(s[a-6],s[a])(new i.ExportNamedDeclaration(new i.ExportSpecifierList(o[a-4]),o[a]));break;case 153:this.$=i.addLocationDataFn(s[a],s[a])(new i.ExportSpecifier(o[a]));break;case 154:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ExportSpecifier(o[a-2],o[a]));break;case 155:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.ExportSpecifier(o[a-2],new i.Literal(o[a])));break;case 156:case 157:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Call(o[a-2],o[a],o[a-1]));break;case 159:this.$=i.addLocationDataFn(s[a],s[a])(new i.SuperCall);break;case 160:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.SuperCall(o[a]));break;case 161:this.$=i.addLocationDataFn(s[a],s[a])(!1);break;case 162:this.$=i.addLocationDataFn(s[a],s[a])(!0);break;case 163:this.$=i.addLocationDataFn(s[a-1],s[a])([]);break;case 165:case 166:this.$=i.addLocationDataFn(s[a],s[a])(new i.Value(new i.ThisLiteral));break;case 167:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Value(i.addLocationDataFn(s[a-1])(new i.ThisLiteral),[i.addLocationDataFn(s[a])(new i.Access(o[a]))],"this"));break;case 168:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Arr([]));break;case 169:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Arr(o[a-2]));break;case 170:this.$=i.addLocationDataFn(s[a],s[a])("inclusive");break;case 171:this.$=i.addLocationDataFn(s[a],s[a])("exclusive");break;case 172:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Range(o[a-3],o[a-1],o[a-2]));break;case 173:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Range(o[a-2],o[a],o[a-1]));break;case 174:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Range(o[a-1],null,o[a]));break;case 175:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Range(null,o[a],o[a-1]));break;case 176:this.$=i.addLocationDataFn(s[a],s[a])(new i.Range(null,null,o[a]));break;case 186:this.$=i.addLocationDataFn(s[a-2],s[a])([].concat(o[a-2],o[a]));break;case 187:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Try(o[a]));break;case 188:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Try(o[a-1],o[a][0],o[a][1]));break;case 189:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Try(o[a-2],null,null,o[a]));break;case 190:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Try(o[a-3],o[a-2][0],o[a-2][1],o[a]));break;case 191:this.$=i.addLocationDataFn(s[a-2],s[a])([o[a-1],o[a]]);break;case 192:this.$=i.addLocationDataFn(s[a-2],s[a])([i.addLocationDataFn(s[a-1])(new i.Value(o[a-1])),o[a]]);break;case 193:this.$=i.addLocationDataFn(s[a-1],s[a])([null,o[a]]);break;case 194:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Throw(o[a]));break;case 195:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Parens(o[a-1]));break;case 196:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Parens(o[a-2]));break;case 197:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.While(o[a]));break;case 198:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.While(o[a-2],{guard:o[a]}));break;case 199:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.While(o[a],{invert:!0}));break;case 200:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.While(o[a-2],{invert:!0,guard:o[a]}));break;case 201:this.$=i.addLocationDataFn(s[a-1],s[a])(o[a-1].addBody(o[a]));break;case 202:case 203:this.$=i.addLocationDataFn(s[a-1],s[a])(o[a].addBody(i.addLocationDataFn(s[a-1])(i.Block.wrap([o[a-1]]))));break;case 204:this.$=i.addLocationDataFn(s[a],s[a])(o[a]);break;case 205:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.While(i.addLocationDataFn(s[a-1])(new i.BooleanLiteral("true"))).addBody(o[a]));break;case 206:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.While(i.addLocationDataFn(s[a-1])(new i.BooleanLiteral("true"))).addBody(i.addLocationDataFn(s[a])(i.Block.wrap([o[a]]))));break;case 207:case 208:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.For(o[a-1],o[a]));break;case 209:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.For(o[a],o[a-1]));break;case 210:this.$=i.addLocationDataFn(s[a-1],s[a])({source:i.addLocationDataFn(s[a])(new i.Value(o[a]))});break;case 211:this.$=i.addLocationDataFn(s[a-3],s[a])({source:i.addLocationDataFn(s[a-2])(new i.Value(o[a-2])),step:o[a]});break;case 212:this.$=i.addLocationDataFn(s[a-1],s[a])(function(){return o[a].own=o[a-1].own,o[a].name=o[a-1][0],o[a].index=o[a-1][1],o[a]}());break;case 213:this.$=i.addLocationDataFn(s[a-1],s[a])(o[a]);break;case 214:this.$=i.addLocationDataFn(s[a-2],s[a])(function(){return o[a].own=!0,o[a]}());break;case 220:this.$=i.addLocationDataFn(s[a-2],s[a])([o[a-2],o[a]]);break;case 221:this.$=i.addLocationDataFn(s[a-1],s[a])({source:o[a]});break;case 222:this.$=i.addLocationDataFn(s[a-1],s[a])({source:o[a],object:!0});break;case 223:this.$=i.addLocationDataFn(s[a-3],s[a])({source:o[a-2],guard:o[a]});break;case 224:this.$=i.addLocationDataFn(s[a-3],s[a])({source:o[a-2],guard:o[a],object:!0});break;case 225:this.$=i.addLocationDataFn(s[a-3],s[a])({source:o[a-2],step:o[a]});break;case 226:this.$=i.addLocationDataFn(s[a-5],s[a])({source:o[a-4],guard:o[a-2],step:o[a]});break;case 227:this.$=i.addLocationDataFn(s[a-5],s[a])({source:o[a-4],step:o[a-2],guard:o[a]});break;case 228:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Switch(o[a-3],o[a-1]));break;case 229:this.$=i.addLocationDataFn(s[a-6],s[a])(new i.Switch(o[a-5],o[a-3],o[a-1]));break;case 230:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Switch(null,o[a-1]));break;case 231:this.$=i.addLocationDataFn(s[a-5],s[a])(new i.Switch(null,o[a-3],o[a-1]));break;case 233:this.$=i.addLocationDataFn(s[a-1],s[a])(o[a-1].concat(o[a]));break;case 234:this.$=i.addLocationDataFn(s[a-2],s[a])([[o[a-1],o[a]]]);break;case 235:this.$=i.addLocationDataFn(s[a-3],s[a])([[o[a-2],o[a-1]]]);break;case 236:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.If(o[a-1],o[a],{type:o[a-2]}));break;case 237:this.$=i.addLocationDataFn(s[a-4],s[a])(o[a-4].addElse(i.addLocationDataFn(s[a-2],s[a])(new i.If(o[a-1],o[a],{type:o[a-2]}))));break;case 239:this.$=i.addLocationDataFn(s[a-2],s[a])(o[a-2].addElse(o[a]));break;case 240:case 241:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.If(o[a],i.addLocationDataFn(s[a-2])(i.Block.wrap([o[a-2]])),{type:o[a-1],statement:!0}));break;case 244:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("-",o[a]));break;case 245:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("+",o[a]));break;case 246:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("--",o[a]));break;case 247:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("++",o[a]));break;case 248:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("--",o[a-1],null,!0));break;case 249:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Op("++",o[a-1],null,!0));break;case 250:this.$=i.addLocationDataFn(s[a-1],s[a])(new i.Existence(o[a-1]));break;case 251:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Op("+",o[a-2],o[a]));break;case 252:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Op("-",o[a-2],o[a]));break;case 253:case 254:case 255:case 256:case 257:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Op(o[a-1],o[a-2],o[a]));break;case 258:this.$=i.addLocationDataFn(s[a-2],s[a])(function(){return"!"===o[a-1].charAt(0)?new i.Op(o[a-1].slice(1),o[a-2],o[a]).invert():new i.Op(o[a-1],o[a-2],o[a])}());break;case 259:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Assign(o[a-2],o[a],o[a-1]));break;case 260:this.$=i.addLocationDataFn(s[a-4],s[a])(new i.Assign(o[a-4],o[a-1],o[a-3]));break;case 261:this.$=i.addLocationDataFn(s[a-3],s[a])(new i.Assign(o[a-3],o[a],o[a-2]));break;case 262:this.$=i.addLocationDataFn(s[a-2],s[a])(new i.Extends(o[a-2],o[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:i,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{1:[3]},{1:[2,2],6:G},t(q,[2,3]),t(q,[2,6],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(q,[2,7],{141:77,132:100,138:101,133:I,135:R,139:O,155:nt}),t(q,[2,8]),t(it,[2,14],{109:102,78:103,86:109,82:rt,83:ot,84:st,85:at,87:ct,90:lt,113:ut,114:ht}),t(it,[2,15],{86:109,109:112,78:113,82:rt,83:ot,84:st,85:at,87:ct,90:lt,113:ut,114:ht}),t(it,[2,16]),t(it,[2,17]),t(it,[2,18]),t(it,[2,19]),t(it,[2,20]),t(it,[2,21]),t(it,[2,22]),t(it,[2,23]),t(it,[2,24]),t(it,[2,25]),t(it,[2,26]),t(pt,[2,9]),t(pt,[2,10]),t(pt,[2,11]),t(pt,[2,12]),t(pt,[2,13]),t([1,6,32,42,131,133,135,139,155,162,163,164,165,166,167,168],dt,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:115,8:117,12:n,28:ft,29:mt,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:[1,114],62:b,63:y,67:v,68:k,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,137:A,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),t(gt,bt,{55:[1,119]}),t(gt,[2,95]),t(gt,[2,96]),t(gt,[2,97]),t(gt,[2,98]),t(yt,[2,158]),t([6,31,65,70],vt,{64:120,71:121,72:122,33:124,60:125,74:126,75:127,34:r,73:kt,92:w,118:wt,119:Tt}),{30:130,31:Nt},{7:132,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:133,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:134,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:135,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{15:137,16:138,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:139,60:71,74:53,75:54,77:136,79:28,80:29,81:30,92:w,111:31,112:C,117:F,118:E,119:D,130:S},{15:137,16:138,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:139,60:71,74:53,75:54,77:140,79:28,80:29,81:30,92:w,111:31,112:C,117:F,118:E,119:D,130:S},t(Lt,Ct,{96:[1,144],160:[1,141],161:[1,142],169:[1,143]}),t(it,[2,238],{150:[1,145]}),{30:146,31:Nt},{30:147,31:Nt},t(it,[2,204]),{30:148,31:Nt},{7:149,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,150],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Ft,[2,115],{47:27,79:28,80:29,81:30,111:31,74:53,75:54,37:55,43:57,33:70,60:71,39:80,15:137,16:138,54:139,30:151,77:153,31:Nt,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,92:w,96:[1,152],112:C,117:F,118:E,119:D,130:S}),{7:154,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(pt,Et,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:117,7:155,12:n,28:ft,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:g,62:b,63:y,67:v,68:k,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,137:A,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),t([1,6,31,32,42,70,94,131,133,135,139,155],[2,66]),{33:160,34:r,39:156,40:s,41:a,92:[1,159],98:157,99:158,103:Dt},{25:163,33:164,34:r,92:[1,162],95:T,106:[1,165],107:[1,166]},t(Lt,[2,92]),t(Lt,[2,93]),t(gt,[2,40]),t(gt,[2,41]),t(gt,[2,42]),t(gt,[2,43]),t(gt,[2,44]),t(gt,[2,45]),t(gt,[2,46]),t(gt,[2,47]),{4:167,5:3,7:4,8:5,9:6,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:i,31:[1,168],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:169,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:xt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,116:171,117:F,118:E,119:D,120:St,123:172,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(gt,[2,165]),t(gt,[2,166],{35:176,36:It}),t([1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,115,120,122,131,133,134,135,139,140,155,158,159,162,163,164,165,166,167,168],[2,159],{110:178,114:Rt}),{31:[2,69]},{31:[2,70]},t(At,[2,87]),t(At,[2,90]),{7:180,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:181,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:182,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:184,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,30:183,31:Nt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{33:189,34:r,60:190,74:191,75:192,80:185,92:w,118:wt,119:D,143:186,144:[1,187],145:188},{142:193,146:[1,194],147:[1,195]},t([6,31,70,94],Ot,{39:80,93:196,56:197,57:198,59:199,11:200,37:201,33:202,35:203,60:204,34:r,36:It,38:o,40:s,41:a,62:b,118:wt}),t($t,[2,34]),t($t,[2,35]),t(gt,[2,38]),{15:137,16:205,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:139,60:71,74:53,75:54,77:206,79:28,80:29,81:30,92:w,111:31,112:C,117:F,118:E,119:D,130:S},t([1,6,29,31,32,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,102,113,114,115,120,122,131,133,134,135,139,140,146,147,155,158,159,160,161,162,163,164,165,166,167,168,169],[2,32]),t($t,[2,36]),{4:207,5:3,7:4,8:5,9:6,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:i,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(q,[2,5],{7:4,8:5,9:6,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,5:208,12:n,28:i,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:g,62:b,63:y,67:v,68:k,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,133:I,135:R,137:A,139:O,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),t(it,[2,250]),{7:209,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:210,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:211,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:212,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:213,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:214,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:215,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:216,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:217,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(it,[2,203]),t(it,[2,208]),{7:218,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(it,[2,202]),t(it,[2,207]),{110:219,114:Rt},t(At,[2,88]),{114:[2,162]},{35:220,36:It},{35:221,36:It},t(At,[2,103],{35:222,36:It}),{35:223,36:It},t(At,[2,104]),{7:225,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:Pt,74:53,75:54,77:40,79:28,80:29,81:30,88:224,91:226,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,121:227,122:Mt,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{86:230,87:ct,90:lt},{110:231,114:Rt},t(At,[2,89]),t(q,[2,65],{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:117,7:232,12:n,28:ft,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:g,62:b,63:y,67:v,68:k,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,133:Et,135:Et,139:Et,155:Et,137:A,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),t(jt,[2,28],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:233,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{132:100,133:I,135:R,138:101,139:O,141:77,155:nt},t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,162,163,164,165,166,167,168],dt,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:115,8:117,12:n,28:ft,29:mt,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:g,62:b,63:y,67:v,68:k,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,137:A,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),{6:[1,235],7:234,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,236],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t([6,31],Bt,{69:239,65:[1,237],70:Vt}),t(Ut,[2,74]),t(Ut,[2,78],{55:[1,241],73:[1,240]}),t(Ut,[2,81]),t(Ht,[2,82]),t(Ht,[2,83]),t(Ht,[2,84]),t(Ht,[2,85]),{35:176,36:It},{7:242,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:xt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,116:171,117:F,118:E,119:D,120:St,123:172,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(it,[2,68]),{4:244,5:3,7:4,8:5,9:6,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:i,32:[1,243],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,158,159,163,164,165,166,167,168],[2,242],{141:77,132:97,138:98,162:J}),t(Gt,[2,243],{141:77,132:97,138:98,162:J,164:K}),t(Gt,[2,244],{141:77,132:97,138:98,162:J,164:K}),t(Gt,[2,245],{141:77,132:97,138:98,162:J,164:K}),t(it,[2,246],{82:Ct,83:Ct,84:Ct,85:Ct,87:Ct,90:Ct,113:Ct,114:Ct}),{78:103,82:rt,83:ot,84:st,85:at,86:109,87:ct,90:lt,109:102,113:ut,114:ht},{78:113,82:rt,83:ot,84:st,85:at,86:109,87:ct,90:lt,109:112,113:ut,114:ht},t(qt,bt),t(it,[2,247],{82:Ct,83:Ct,84:Ct,85:Ct,87:Ct,90:Ct,113:Ct,114:Ct}),t(it,[2,248]),t(it,[2,249]),{6:[1,247],7:245,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,246],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:248,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{30:249,31:Nt,154:[1,250]},t(it,[2,187],{126:251,127:[1,252],128:[1,253]}),t(it,[2,201]),t(it,[2,209]),{31:[1,254],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{149:255,151:256,152:Yt},t(it,[2,116]),{7:258,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Ft,[2,119],{30:259,31:Nt,82:Ct,83:Ct,84:Ct,85:Ct,87:Ct,90:Ct,113:Ct,114:Ct,96:[1,260]}),t(jt,[2,194],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(pt,Xt,{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(pt,[2,123]),{29:[1,261],70:[1,262]},{29:[1,263]},{31:Wt,33:268,34:r,94:[1,264],100:265,101:266},t([29,70],[2,137]),{102:[1,269]},{31:Jt,33:274,34:r,94:[1,270],105:271,108:272},t(pt,[2,141]),{55:[1,275]},{7:276,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{29:[1,277]},{6:G,131:[1,278]},{4:279,5:3,7:4,8:5,9:6,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:i,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t([6,31,70,120],zt,{141:77,132:97,138:98,121:280,73:[1,281],122:Mt,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(Kt,[2,168]),t([6,31,120],Bt,{69:282,70:Qt}),t(Zt,[2,177]),{7:242,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:xt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,116:284,117:F,118:E,119:D,123:172,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Zt,[2,183]),t(Zt,[2,184]),t(en,[2,167]),t(en,[2,33]),t(yt,[2,160]),{7:242,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:xt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,115:[1,285],116:286,117:F,118:E,119:D,123:172,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{30:287,31:Nt,132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(tn,[2,197],{141:77,132:97,138:98,133:I,134:[1,288],135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(tn,[2,199],{141:77,132:97,138:98,133:I,134:[1,289],135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(it,[2,205]),t(nn,[2,206],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,155,158,159,162,163,164,165,166,167,168],[2,210],{140:[1,290]}),t(rn,[2,213]),{33:189,34:r,60:190,74:191,75:192,92:w,118:wt,119:Tt,143:291,145:188},t(rn,[2,219],{70:[1,292]}),t(on,[2,215]),t(on,[2,216]),t(on,[2,217]),t(on,[2,218]),t(it,[2,212]),{7:293,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:294,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(sn,Bt,{69:295,70:an}),t(cn,[2,111]),t(cn,[2,51],{58:[1,297]}),t(ln,[2,60],{55:[1,298]}),t(cn,[2,56]),t(ln,[2,61]),t(un,[2,57]),t(un,[2,58]),t(un,[2,59]),{46:[1,299],78:113,82:rt,83:ot,84:st,85:at,86:109,87:ct,90:lt,109:112,113:ut,114:ht},t(qt,Ct),{6:G,42:[1,300]},t(q,[2,4]),t(hn,[2,251],{141:77,132:97,138:98,162:J,163:z,164:K}),t(hn,[2,252],{141:77,132:97,138:98,162:J,163:z,164:K}),t(Gt,[2,253],{141:77,132:97,138:98,162:J,164:K}),t(Gt,[2,254],{141:77,132:97,138:98,162:J,164:K}),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,165,166,167,168],[2,255],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K}),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,166,167],[2,256],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,168:tt}),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,167],[2,257],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,168:tt}),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,155,166,167,168],[2,258],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q}),t(nn,[2,241],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(nn,[2,240],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(yt,[2,156]),t(At,[2,99]),t(At,[2,100]),t(At,[2,101]),t(At,[2,102]),{89:[1,301]},{73:Pt,89:[2,107],121:302,122:Mt,132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{89:[2,108]},{7:303,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,176],92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(pn,[2,170]),t(pn,dn),t(At,[2,106]),t(yt,[2,157]),t(q,[2,64],{141:77,132:97,138:98,133:Xt,135:Xt,139:Xt,155:Xt,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(jt,[2,29],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(jt,[2,48],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:304,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:305,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{66:306,67:v,68:k},t(fn,mn,{72:122,33:124,60:125,74:126,75:127,71:307,34:r,73:kt,92:w,118:wt,119:Tt}),{6:gn,31:bn},t(Ut,[2,79]),{7:310,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Zt,zt,{141:77,132:97,138:98,73:[1,311],133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(yn,[2,30]),{6:G,32:[1,312]},t(jt,[2,259],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:313,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:314,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(jt,[2,262],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(it,[2,239]),{7:315,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(it,[2,188],{127:[1,316]}),{30:317,31:Nt},{30:320,31:Nt,33:318,34:r,75:319,92:w},{149:321,151:256,152:Yt},{32:[1,322],150:[1,323],151:324,152:Yt},t(vn,[2,232]),{7:326,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,124:325,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(kn,[2,117],{141:77,132:97,138:98,30:327,31:Nt,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(it,[2,120]),{7:328,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{39:329,40:s,41:a},{92:[1,331],99:330,103:Dt},{39:332,40:s,41:a},{29:[1,333]},t(sn,Bt,{69:334,70:wn}),t(cn,[2,130]),{31:Wt,33:268,34:r,100:336,101:266},t(cn,[2,135],{102:[1,337]}),{33:338,34:r},t(pt,[2,139]),t(sn,Bt,{69:339,70:Tn}),t(cn,[2,148]),{31:Jt,33:274,34:r,105:341,108:272},t(cn,[2,153],{102:[1,342]}),{6:[1,344],7:343,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,345],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Nn,[2,145],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{39:346,40:s,41:a},t(gt,[2,195]),{6:G,32:[1,347]},{7:348,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t([12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,92,95,97,104,112,117,118,119,125,129,130,133,135,137,139,148,154,156,157,158,159,160,161],dn,{6:Ln,31:Ln,70:Ln,120:Ln}),{6:Cn,31:Fn,120:[1,349]},t([6,31,32,115,120],mn,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,153:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:117,76:174,7:242,123:352,12:n,28:ft,34:r,38:o,40:s,41:a,44:c,45:l,48:u,49:h,50:p,51:d,52:f,53:m,61:g,62:b,63:y,67:v,68:k,73:_t,92:w,95:T,97:N,104:L,112:C,117:F,118:E,119:D,125:x,129:_,130:S,133:I,135:R,137:A,139:O,148:$,154:P,156:M,157:j,158:B,159:V,160:U,161:H}),t(fn,Bt,{69:353,70:Qt}),t(yt,[2,163]),t([6,31,115],Bt,{69:354,70:Qt}),t(En,[2,236]),{7:355,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:356,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:357,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(rn,[2,214]),{33:189,34:r,60:190,74:191,75:192,92:w,118:wt,119:Tt,145:358},t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,155],[2,221],{141:77,132:97,138:98,134:[1,359],140:[1,360],158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(Dn,[2,222],{141:77,132:97,138:98,134:[1,361],158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{6:xn,31:_n,94:[1,362]},t(Sn,mn,{39:80,57:198,59:199,11:200,37:201,33:202,35:203,60:204,56:365,34:r,36:It,38:o,40:s,41:a,62:b,118:wt}),{7:366,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,367],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:368,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:[1,369],33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(gt,[2,39]),t($t,[2,37]),t(At,[2,105]),{7:370,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,174],92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{89:[2,175],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(jt,[2,49],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{32:[1,371],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{30:372,31:Nt},t(Ut,[2,75]),{33:124,34:r,60:125,71:373,72:122,73:kt,74:126,75:127,92:w,118:wt,119:Tt},t(In,vt,{71:121,72:122,33:124,60:125,74:126,75:127,64:374,34:r,73:kt,92:w,118:wt,119:Tt}),t(Ut,[2,80],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(Zt,Ln),t(yn,[2,31]),{32:[1,375],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(jt,[2,261],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{30:376,31:Nt,132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{30:377,31:Nt},t(it,[2,189]),{30:378,31:Nt},{30:379,31:Nt},t(Rn,[2,193]),{32:[1,380],150:[1,381],151:324,152:Yt},t(it,[2,230]),{30:382,31:Nt},t(vn,[2,233]),{30:383,31:Nt,70:[1,384]},t(An,[2,185],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(it,[2,118]),t(kn,[2,121],{141:77,132:97,138:98,30:385,31:Nt,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(pt,[2,124]),{29:[1,386]},{31:Wt,33:268,34:r,100:387,101:266},t(pt,[2,125]),{39:388,40:s,41:a},{6:On,31:$n,94:[1,389]},t(Sn,mn,{33:268,101:392,34:r}),t(fn,Bt,{69:393,70:wn}),{33:394,34:r},{29:[2,138]},{6:Pn,31:Mn,94:[1,395]},t(Sn,mn,{33:274,108:398,34:r}),t(fn,Bt,{69:399,70:Tn}),{33:400,34:r,106:[1,401]},t(Nn,[2,142],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:402,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:403,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(pt,[2,146]),{131:[1,404]},{120:[1,405],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(Kt,[2,169]),{7:242,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,123:406,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:242,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,31:xt,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,73:_t,74:53,75:54,76:174,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,116:407,117:F,118:E,119:D,123:172,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Zt,[2,178]),{6:Cn,31:Fn,32:[1,408]},{6:Cn,31:Fn,115:[1,409]},t(nn,[2,198],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(nn,[2,200],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(nn,[2,211],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(rn,[2,220]),{7:410,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:411,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:412,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(Kt,[2,109]),{11:200,33:202,34:r,35:203,36:It,37:201,38:o,39:80,40:s,41:a,56:413,57:198,59:199,60:204,62:b,118:wt},t(In,Ot,{39:80,56:197,57:198,59:199,11:200,37:201,33:202,35:203,60:204,93:414,34:r,36:It,38:o,40:s,41:a,62:b,118:wt}),t(cn,[2,112]),t(cn,[2,52],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:415,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(cn,[2,54],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{7:416,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{89:[2,173],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(it,[2,50]),t(it,[2,67]),t(Ut,[2,76]),t(fn,Bt,{69:417,70:Vt}),t(it,[2,260]),t(En,[2,237]),t(it,[2,190]),t(Rn,[2,191]),t(Rn,[2,192]),t(it,[2,228]),{30:418,31:Nt},{32:[1,419]},t(vn,[2,234],{6:[1,420]}),{7:421,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},t(it,[2,122]),{39:422,40:s,41:a},t(sn,Bt,{69:423,70:wn}),t(pt,[2,126]),{29:[1,424]},{33:268,34:r,101:425},{31:Wt,33:268,34:r,100:426,101:266},t(cn,[2,131]),{6:On,31:$n,32:[1,427]},t(cn,[2,136]),t(pt,[2,140],{29:[1,428]}),{33:274,34:r,108:429},{31:Jt,33:274,34:r,105:430,108:272},t(cn,[2,149]),{6:Pn,31:Mn,32:[1,431]},t(cn,[2,154]),t(cn,[2,155]),t(Nn,[2,143],{141:77,132:97,138:98,133:I,135:R,139:O,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),{32:[1,432],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},t(gt,[2,196]),t(gt,[2,172]),t(Zt,[2,179]),t(fn,Bt,{69:433,70:Qt}),t(Zt,[2,180]),t(yt,[2,164]),t([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,155],[2,223],{141:77,132:97,138:98,140:[1,434],158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(Dn,[2,225],{141:77,132:97,138:98,134:[1,435],158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(jt,[2,224],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(cn,[2,113]),t(fn,Bt,{69:436,70:an}),{32:[1,437],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{32:[1,438],132:97,133:I,135:R,138:98,139:O,141:77,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt},{6:gn,31:bn,32:[1,439]},{32:[1,440]},t(it,[2,231]),t(vn,[2,235]),t(An,[2,186],{141:77,132:97,138:98,133:I,135:R,139:O,155:Y,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(pt,[2,128]),{6:On,31:$n,94:[1,441]},{39:442,40:s,41:a},t(cn,[2,132]),t(fn,Bt,{69:443,70:wn}),t(cn,[2,133]),{39:444,40:s,41:a},t(cn,[2,150]),t(fn,Bt,{69:445,70:Tn}),t(cn,[2,151]),t(pt,[2,144]),{6:Cn,31:Fn,32:[1,446]},{7:447,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{7:448,8:117,10:20,11:21,12:n,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ft,33:70,34:r,37:55,38:o,39:80,40:s,41:a,43:57,44:c,45:l,47:27,48:u,49:h,50:p,51:d,52:f,53:m,54:26,60:71,61:g,62:b,63:y,66:33,67:v,68:k,74:53,75:54,77:40,79:28,80:29,81:30,92:w,95:T,97:N,104:L,111:31,112:C,117:F,118:E,119:D,125:x,129:_,130:S,132:43,133:I,135:R,136:44,137:A,138:45,139:O,141:77,148:$,153:41,154:P,156:M,157:j,158:B,159:V,160:U,161:H},{6:xn,31:_n,32:[1,449]},t(cn,[2,53]),t(cn,[2,55]),t(Ut,[2,77]),t(it,[2,229]),{29:[1,450]},t(pt,[2,127]),{6:On,31:$n,32:[1,451]},t(pt,[2,147]),{6:Pn,31:Mn,32:[1,452]},t(Zt,[2,181]),t(jt,[2,226],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(jt,[2,227],{141:77,132:97,138:98,158:X,159:W,162:J,163:z,164:K,165:Q,166:Z,167:et,168:tt}),t(cn,[2,114]),{39:453,40:s,41:a},t(cn,[2,134]),t(cn,[2,152]),t(pt,[2,129])],defaultActions:{68:[2,69],69:[2,70],104:[2,162],226:[2,108],338:[2,138]},parseError:function(e,t){function n(e,t){this.message=e,this.hash=t
+}if(!t.recoverable)throw n.prototype=Error,new n(e,t);this.trace(e)},parse:function(e){var t=this,n=[0],i=[null],r=[],o=this.table,s="",a=0,c=0,l=0,u=2,h=1,p=r.slice.call(arguments,1),d=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);d.setInput(e,f.yy),f.yy.lexer=d,f.yy.parser=this,d.yylloc===void 0&&(d.yylloc={});var g=d.yylloc;r.push(g);var b=d.options&&d.options.ranges;this.parseError="function"==typeof f.yy.parseError?f.yy.parseError:Object.getPrototypeOf(this).parseError;for(var y,v,k,w,T,N,L,C,F,E=function(){var e;return e=d.lex()||h,"number"!=typeof e&&(e=t.symbols_[e]||e),e},D={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:((null===y||y===void 0)&&(y=E()),w=o[k]&&o[k][y]),w===void 0||!w.length||!w[0]){var x="";F=[];for(N in o[k])this.terminals_[N]&&N>u&&F.push("'"+this.terminals_[N]+"'");x=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(a+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:g,expected:F})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+y);switch(w[0]){case 1:n.push(y),i.push(d.yytext),r.push(d.yylloc),n.push(w[1]),y=null,v?(y=v,v=null):(c=d.yyleng,s=d.yytext,a=d.yylineno,g=d.yylloc,l>0&&l--);break;case 2:if(L=this.productions_[w[1]][1],D.$=i[i.length-L],D._$={first_line:r[r.length-(L||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(L||1)].first_column,last_column:r[r.length-1].last_column},b&&(D._$.range=[r[r.length-(L||1)].range[0],r[r.length-1].range[1]]),T=this.performAction.apply(D,[s,c,a,f.yy,w[1],i,r].concat(p)),T!==void 0)return T;L&&(n=n.slice(0,2*-1*L),i=i.slice(0,-1*L),r=r.slice(0,-1*L)),n.push(this.productions_[w[1]][0]),i.push(D.$),r.push(D._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}};return e.prototype=jn,jn.Parser=e,new e}();return require!==void 0&&e!==void 0&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=require("fs").readFileSync(require("path").normalize(t[1]),"utf8");return e.parser.parse(n)},t!==void 0&&require.main===t&&e.main(process.argv.slice(1))),t.exports}(),require["./scope"]=function(){var e={},t={exports:e};return function(){var t,n=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e.Scope=t=function(){function e(e,t,n,i){var r,o;this.parent=e,this.expressions=t,this.method=n,this.referencedVars=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(this.utilities={}),this.root=null!=(r=null!=(o=this.parent)?o.root:void 0)?r:this}return e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return(null!=(e=this.method)?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){return this.shared&&this.parent.check(e,!0)?void 0:this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||(null!=(t=this.parent)?t.check(e):void 0))},e.prototype.temporary=function(e,t,n){var i,r,o,s,a,c;return null==n&&(n=!1),n?(c=e.charCodeAt(0),r="z".charCodeAt(0),i=r-c,s=c+t%(i+1),o=String.fromCharCode(s),a=Math.floor(t/(i+1)),""+o+(a||"")):""+e+(t||"")},e.prototype.type=function(e){var t,n,i,r;for(i=this.variables,t=0,n=i.length;n>t;t++)if(r=i[t],r.name===e)return r.type;return null},e.prototype.freeVariable=function(e,t){var i,r,o;for(null==t&&(t={}),i=0;;){if(o=this.temporary(e,i,t.single),!(this.check(o)||n.call(this.root.referencedVars,o)>=0))break;i++}return(null!=(r=t.reserve)?r:!0)&&this.add(o,"var",!0),o},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;return function(){var t,n,i,r;for(i=this.variables,r=[],t=0,n=i.length;n>t;t++)e=i[t],"var"===e.type&&r.push(e.name);return r}.call(this).sort()},e.prototype.assignedVariables=function(){var e,t,n,i,r;for(n=this.variables,i=[],e=0,t=n.length;t>e;e++)r=n[e],r.type.assigned&&i.push(r.name+" = "+r.type.value);return i},e}()}.call(this),t.exports}(),require["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,o,s,a,c,l,u,h,p,d,f,m,g,b,y,v,k,w,T,N,L,C,F,E,D,x,_,S,I,R,A,O,$,P,M,j,B,V,U,H,G,q,Y,X,W,J,z,K,Q,Z,et,tt,nt,it,rt,ot,st,at,ct,lt,ut,ht,pt,dt,ft,mt,gt,bt,yt,vt,kt,wt,Tt,Nt,Lt,Ct,Ft,Et,Dt,xt,_t,St,It,Rt,At,Ot,$t,Pt,Mt,jt,Bt,Vt,Ut,Ht,Gt,qt,Yt=function(e,t){function n(){this.constructor=e}for(var i in t)Xt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Xt={}.hasOwnProperty,Wt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},Jt=[].slice;Error.stackTraceLimit=Infinity,st=require("./scope").Scope,jt=require("./lexer"),Ot=jt.isUnassignable,R=jt.JS_FORBIDDEN,Bt=require("./helpers"),Ft=Bt.compact,_t=Bt.flatten,xt=Bt.extend,Pt=Bt.merge,Et=Bt.del,Ut=Bt.starts,Dt=Bt.ends,Vt=Bt.some,Ct=Bt.addLocationDataFn,$t=Bt.locationDataToString,Ht=Bt.throwSyntaxError,e.extend=xt,e.addLocationDataFn=Ct,Nt=function(){return!0},q=function(){return!1},mt=function(){return this},G=function(){return this.negated=!this.negated,this},e.CodeFragment=u=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?": "+$t(this.locationData):"")},e}(),St=function(e){var t;return function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.code);return r}().join("")},e.Base=r=function(){function e(){}return e.prototype.compile=function(e,t){return St(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=xt({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==j&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var n,i,r,s,c,u,h;return(s=this.jumps())&&s.error("cannot use a pure statement in an expression"),e.sharedScope=!0,r=new l([],o.wrap([this])),n=[],((i=this.contains(Rt))||this.contains(At))&&(n=[new gt],i?(c="apply",n.push(new T("arguments"))):c="call",r=new wt(r,[new t(new et(c))])),u=new a(r,n).compileNode(e),(r.isGenerator||(null!=(h=r.base)?h.isGenerator:void 0))&&(u.unshift(this.makeCode("(yield* ")),u.push(this.makeCode(")"))),u},e.prototype.cache=function(e,t,n){var r,o,s;return r=null!=n?n(this):this.isComplex(),r?(o=new T(e.scope.freeVariable("ref")),s=new i(o,this),t?[s.compileToFragments(e,t),[this.makeCode(o.value)]]:[s,o]):(o=t?this.compileToFragments(e,t):this,[o,o])},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 B(e+".push"),[t]):new rt(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 h))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+ft)}),n},e.prototype.eachChild=function(e){var t,n,i,r,o,s,a,c;if(!this.children)return this;for(a=this.children,i=0,o=a.length;o>i;i++)if(t=a[i],this[t])for(c=_t([this[t]]),r=0,s=c.length;s>r;r++)if(n=c[r],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var i;return i=t(n),i!==!1?n.traverseChildren(e,t):void 0})},e.prototype.invert=function(){return new z("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=q,e.prototype.jumps=q,e.prototype.isComplex=Nt,e.prototype.isChainable=q,e.prototype.isAssignable=q,e.prototype.isNumber=q,e.prototype.unwrap=mt,e.prototype.unfoldSoak=q,e.prototype.assigns=q,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return Ht(e,this.locationData)},e.prototype.makeCode=function(e){return new u(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,r,o,s;for(n=[],r=o=0,s=e.length;s>o;r=++o)i=e[r],r&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=o=function(e){function t(e){this.expressions=Ft(_t(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,r;for(r=this.expressions,n=0,i=r.length;i>n;n++)if(t=r[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,r,o;for(o=this.expressions,n=0,r=o.length;r>n;n++)if(t=o[n],i=t.jumps(e))return i},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof h)){this.expressions[n]=t.makeReturn(e),t instanceof rt&&!t.expression&&this.expressions.splice(n,1);break}return this},t.prototype.compileToFragments=function(e,n){return null==e&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,i,r,o,s,a,c,l,u;for(this.tab=e.indent,u=e.level===j,i=[],l=this.expressions,o=s=0,a=l.length;a>s;o=++s)c=l[o],c=c.unwrapAll(),c=c.unfoldSoak(e)||c,c instanceof t?i.push(c.compileNode(e)):u?(c.front=!0,r=c.compileToFragments(e),c.isStatement(e)||(r.unshift(this.makeCode(""+this.tab)),r.push(this.makeCode(";"))),i.push(r)):i.push(c.compileToFragments(e,$));return u?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>=$?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,r,o,s,a,c,l,u,p;for(e.indent=e.bare?"":ft,e.level=j,this.spaced=!0,e.scope=new st(null,this,null,null!=(l=e.referencedVars)?l:[]),u=e.locals||[],r=0,o=u.length;o>r;r++)s=u[r],e.scope.parameter(s);return a=[],e.bare||(c=function(){var e,n,r,o;for(r=this.expressions,o=[],i=e=0,n=r.length;n>e&&(t=r[i],t.unwrap()instanceof h);i=++e)o.push(t);return o}.call(this),p=this.expressions.slice(c.length),this.expressions=c,c.length&&(a=this.compileNode(Pt(e,{indent:""})),a.push(this.makeCode("\n"))),this.expressions=p),n=this.compileWithDeclarations(e),e.bare?n:[].concat(a,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,r,o,s,a,c,l,u,p,d,f,m;for(r=[],c=[],l=this.expressions,o=s=0,a=l.length;a>s&&(i=l[o],i=i.unwrap(),i instanceof h||i instanceof B);o=++s);return e=Pt(e,{level:j}),o&&(d=this.expressions.splice(o,9e9),u=[this.spaced,!1],m=u[0],this.spaced=u[1],p=[this.compileNode(e),m],r=p[0],this.spaced=p[1],this.expressions=d),c=this.compileNode(e),f=e.scope,f.expressions===this&&(n=e.scope.hasDeclarations(),t=f.hasAssignments,n||t?(o&&r.push(this.makeCode("\n")),r.push(this.makeCode(this.tab+"var ")),n&&r.push(this.makeCode(f.declaredVariables().join(", "))),t&&(n&&r.push(this.makeCode(",\n"+(this.tab+ft))),r.push(this.makeCode(f.assignedVariables().join(",\n"+(this.tab+ft))))),r.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):r.length&&c.length&&r.push(this.makeCode("\n"))),r.concat(c)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(r),e.Literal=B=function(e){function t(e){this.value=e}return Yt(t,e),t.prototype.isComplex=q,t.prototype.assigns=function(e){return e===this.value},t.prototype.compileNode=function(){return[this.makeCode(this.value)]},t.prototype.toString=function(){return" "+(this.isStatement()?t.__super__.toString.apply(this,arguments):this.constructor.name)+": "+this.value},t}(r),e.NumberLiteral=W=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(B),e.InfinityLiteral=I=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.compileNode=function(){return[this.makeCode("2e308")]},t}(W),e.NaNLiteral=Y=function(e){function t(){t.__super__.constructor.call(this,"NaN")}return Yt(t,e),t.prototype.compileNode=function(e){var t;return t=[this.makeCode("0/0")],e.level>=P?this.wrapInBraces(t):t},t}(W),e.StringLiteral=ut=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(B),e.RegexLiteral=nt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(B),e.PassthroughLiteral=Z=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(B),e.IdentifierLiteral=T=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.isAssignable=Nt,t}(B),e.PropertyName=et=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.isAssignable=Nt,t}(B),e.StatementLiteral=lt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.isStatement=Nt,t.prototype.makeReturn=mt,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(){return[this.makeCode(""+this.tab+this.value+";")]},t}(B),e.ThisLiteral=gt=function(e){function t(){t.__super__.constructor.call(this,"this")}return Yt(t,e),t.prototype.compileNode=function(e){var t,n;return t=(null!=(n=e.scope.method)?n.bound:void 0)?e.scope.method.context:this.value,[this.makeCode(t)]},t}(B),e.UndefinedLiteral=kt=function(e){function t(){t.__super__.constructor.call(this,"undefined")}return Yt(t,e),t.prototype.compileNode=function(e){return[this.makeCode(e.level>=A?"(void 0)":"void 0")]},t}(B),e.NullLiteral=X=function(e){function t(){t.__super__.constructor.call(this,"null")}return Yt(t,e),t}(B),e.BooleanLiteral=s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(B),e.Return=rt=function(e){function t(e){this.expression=e}return Yt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Nt,t.prototype.makeReturn=mt,t.prototype.jumps=mt,t.prototype.compileToFragments=function(e,n){var i,r;return i=null!=(r=this.expression)?r.makeReturn():void 0,!i||i instanceof t?t.__super__.compileToFragments.call(this,e,n):i.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t;return t=[],t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,M))),t.push(this.makeCode(";")),t},t}(r),e.YieldReturn=Lt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.compileNode=function(e){return null==e.scope.parent&&this.error("yield can only occur inside functions"),t.__super__.compileNode.apply(this,arguments)},t}(rt),e.Value=wt=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.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(n)},t.prototype.isRange=function(){return this.bareLiteral(tt)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isNumber=function(){return this.bareLiteral(W)},t.prototype.isString=function(){return this.bareLiteral(ut)},t.prototype.isRegex=function(){return this.bareLiteral(nt)},t.prototype.isUndefined=function(){return this.bareLiteral(kt)},t.prototype.isNull=function(){return this.bareLiteral(X)},t.prototype.isBoolean=function(){return this.bareLiteral(s)},t.prototype.isAtomic=function(){var e,t,n,i;for(i=this.properties.concat(this.base),e=0,t=i.length;t>e;e++)if(n=i[e],n.soak||n instanceof a)return!1;return!0},t.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()},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 J&&(!e||this.base.generated)},t.prototype.isSplice=function(){var e,t;return t=this.properties,e=t[t.length-1],e instanceof at},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&1===this.properties.length&&"prototype"!==(null!=(t=this.properties[0].name)?t.value:void 0)},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,o,s,a;return a=this.properties,o=a[a.length-1],2>this.properties.length&&!this.base.isComplex()&&!(null!=o?o.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new T(e.scope.freeVariable("base")),n=new t(new Q(new i(r,n)))),o?(o.isComplex()&&(s=new T(e.scope.freeVariable("name")),o=new S(new i(s,o.index)),s=new S(s)),[n.add(o),new t(r||n.base,[s||o])]):[n,r])},t.prototype.compileNode=function(e){var t,n,i,r,o;for(this.base.front=this.front,o=this.properties,t=this.base.compileToFragments(e,o.length?A:null),o.length&&ot.test(St(t))&&t.push(this.makeCode(".")),n=0,i=o.length;i>n;n++)r=o[n],t.push.apply(t,r.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,o,s,a,c,l,u,h,d,f;if(s=n.base.unfoldSoak(e))return(h=s.body.properties).push.apply(h,n.properties),s;for(d=n.properties,o=a=0,c=d.length;c>a;o=++a)if(l=d[o],l.soak)return l.soak=!1,r=new t(n.base,n.properties.slice(0,o)),f=new t(n.base,n.properties.slice(o)),r.isComplex()&&(u=new T(e.scope.freeVariable("ref")),r=new Q(new i(u,r)),f.base=u),new N(new p(r),f,{soak:!0});return!1}}(this)()},t}(r),e.Comment=h=function(e){function t(e){this.comment=e}return Yt(t,e),t.prototype.isStatement=Nt,t.prototype.makeReturn=mt,t.prototype.compileNode=function(e,t){var n,i;return i=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *"),n="/*"+Mt(i,this.tab)+(Wt.call(i,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===j&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(r),e.Call=a=function(e){function t(e,t,n){this.variable=e,this.args=null!=t?t:[],this.soak=n,this.isNew=!1,this.variable instanceof wt&&this.variable.isNotCallable()&&this.variable.error("literal is not a function")}return Yt(t,e),t.prototype.children=["variable","args"],t.prototype.newInstance=function(){var e,n;return e=(null!=(n=this.variable)?n.base:void 0)||this.variable,e instanceof t&&!e.isNew?e.newInstance():this.isNew=!0,this},t.prototype.unfoldSoak=function(e){var n,i,r,o,s,a,c,l,u;if(this.soak){if(this instanceof pt)o=new B(this.superReference(e)),u=new wt(o);else{if(i=Gt(e,this,"variable"))return i;c=new wt(this.variable).cacheReference(e),o=c[0],u=c[1]}return u=new t(u,this.args),u.isNew=this.isNew,o=new B("typeof "+o.compile(e)+' === "function"'),new N(o,new wt(u),{soak:!0})}for(n=this,a=[];;)if(n.variable instanceof t)a.push(n),n=n.variable;else{if(!(n.variable instanceof wt))break;if(a.push(n),!((n=n.variable.base)instanceof t))break}for(l=a.reverse(),r=0,s=l.length;s>r;r++)n=l[r],i&&(n.variable instanceof t?n.variable=i:n.variable.base=i),i=Gt(e,n,"variable");return i},t.prototype.compileNode=function(e){var t,n,i,r,o,s,a,c,l,u;if(null!=(l=this.variable)&&(l.front=this.front),r=ct.compileSplattedArray(e,this.args,!0),r.length)return this.compileSplat(e,r);for(i=[],u=this.args,n=s=0,a=u.length;a>s;n=++s)t=u[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,$));return o=[],this instanceof pt?(c=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(c+=", "),o.push(this.makeCode(c))):(this.isNew&&o.push(this.makeCode("new ")),o.push.apply(o,this.variable.compileToFragments(e,A)),o.push(this.makeCode("("))),o.push.apply(o,i),o.push(this.makeCode(")")),o},t.prototype.compileSplat=function(e,t){var n,i,r,o,s,a;return this instanceof pt?[].concat(this.makeCode(this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(o=this.tab+ft,[].concat(this.makeCode("(function(func, args, ctor) {\n"+o+"ctor.prototype = func.prototype;\n"+o+"var child = new ctor, result = func.apply(child, args);\n"+o+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,$),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new wt(this.variable),(s=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,$),this.makeCode(")"),s.compileToFragments(e))):(r=i.compileToFragments(e,A),ot.test(St(r))&&(r=this.wrapInBraces(r)),s?(a=St(r),r.push.apply(r,s.compileToFragments(e))):a="null",n=n.concat(r)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},t}(r),e.SuperCall=pt=function(e){function n(e){n.__super__.constructor.call(this,null,null!=e?e:[new ct(new T("arguments"))]),this.isBare=null!=e}return Yt(n,e),n.prototype.superReference=function(e){var n,r,o,s,a,c,l,u;return a=e.scope.namedMethod(),(null!=a?a.klass:void 0)?(s=a.klass,c=a.name,u=a.variable,s.isComplex()&&(o=new T(e.scope.parent.freeVariable("base")),r=new wt(new Q(new i(o,s))),u.base=r,u.properties.splice(0,s.properties.length)),(c.isComplex()||c instanceof S&&c.index.isAssignable())&&(l=new T(e.scope.parent.freeVariable("name")),c=new S(new i(l,c.index)),u.properties.pop(),u.properties.push(c)),n=[new t(new et("__super__"))],a["static"]&&n.push(new t(new et("constructor"))),n.push(null!=l?new S(l):c),new wt(null!=o?o:s,n).compile(e)):(null!=a?a.ctor:void 0)?a.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}(a),e.RegexWithInterpolations=it=function(e){function t(e){null==e&&(e=[]),t.__super__.constructor.call(this,new wt(new T("RegExp")),e,!1)}return Yt(t,e),t}(a),e.Extends=k=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 a(new wt(new B(qt("extend",e))),[this.child,this.parent]).compileToFragments(e)},t}(r),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return Yt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t,n,i;return t=this.name.compileToFragments(e),n=this.name.unwrap(),n instanceof et?(i=n.value,Wt.call(R,i)>=0?[this.makeCode('["')].concat(Jt.call(t),[this.makeCode('"]')]):[this.makeCode(".")].concat(Jt.call(t))):[this.makeCode("[")].concat(Jt.call(t),[this.makeCode("]")])},t.prototype.isComplex=q,t}(r),e.Index=S=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,M),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(r),e.Range=tt=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,r,o;return e=Pt(e,{top:!0}),t=Et(e,"isComplex"),n=this.cacheToCodeFragments(this.from.cache(e,$,t)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,$,t)),this.toC=i[0],this.toVar=i[1],(o=Et(e,"step"))&&(r=this.cacheToCodeFragments(o.cache(e,$,t)),this.step=r[0],this.stepVar=r[1]),this.fromNum=this.from.isNumber()?Number(this.fromVar):null,this.toNum=this.to.isNumber()?Number(this.toVar):null,this.stepNum=(null!=o?o.isNumber():void 0)?Number(this.stepVar):null},t.prototype.compileNode=function(e){var t,n,i,r,o,s,a,c,l,u,h,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=null!=this.fromNum&&null!=this.toNum,o=Et(e,"index"),s=Et(e,"name"),l=s&&s!==o,f=o+" = "+this.fromC,this.toC!==this.toVar&&(f+=", "+this.toC),this.step!==this.stepVar&&(f+=", "+this.step),u=[o+" <"+this.equals,o+" >"+this.equals],c=u[0],r=u[1],n=null!=this.stepNum?this.stepNum>0?c+" "+this.toVar:r+" "+this.toVar:a?(h=[this.fromNum,this.toNum],i=h[0],d=h[1],h,d>=i?c+" "+d:r+" "+d):(t=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,t+" ? "+c+" "+this.toVar+" : "+r+" "+this.toVar),p=this.stepVar?o+" += "+this.stepVar:a?l?d>=i?"++"+o:"--"+o:d>=i?o+"++":o+"--":l?t+" ? ++"+o+" : --"+o:t+" ? "+o+"++ : "+o+"--",l&&(f=s+" = "+f),l&&(p=s+" = "+p),[this.makeCode(f+"; "+n+"; "+p)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,r,o,s,a,c,l,u,h,p,d,f;return a=null!=this.fromNum&&null!=this.toNum,a&&20>=Math.abs(this.fromNum-this.toNum)?(u=function(){d=[];for(var e=h=this.fromNum,t=this.toNum;t>=h?t>=e:e>=t;t>=h?e++:e--)d.push(e);return d}.apply(this),this.exclusive&&u.pop(),[this.makeCode("["+u.join(", ")+"]")]):(s=this.tab+ft,o=e.scope.freeVariable("i",{single:!0}),p=e.scope.freeVariable("results"),l="\n"+s+p+" = [];",a?(e.index=o,n=St(this.compileNode(e))):(f=o+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=this.fromVar+" <= "+this.toVar,n="var "+f+"; "+i+" ? "+o+" <"+this.equals+" "+this.toVar+" : "+o+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+o+"++ : "+o+"--"),c="{ "+p+".push("+o+"); }\n"+s+"return "+p+";\n"+e.indent,r=function(e){return null!=e?e.contains(Rt):void 0},(r(this.from)||r(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+l+"\n"+s+"for ("+n+")"+c+"}).apply(this"+(null!=t?t:"")+")")])},t}(r),e.Slice=at=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,r,o,s,a;return o=this.range,s=o.to,i=o.from,r=i&&i.compileToFragments(e,M)||[this.makeCode("0")],s&&(t=s.compileToFragments(e,M),n=St(t),(this.range.exclusive||-1!==+n)&&(a=", "+(this.range.exclusive?n:s.isNumber()?""+(+n+1):(t=s.compileToFragments(e,A),"+"+St(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+St(r)+(a||"")+")")]},t}(r),e.Obj=J=function(e){function n(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return Yt(n,e),n.prototype.children=["properties"],n.prototype.compileNode=function(e){var n,r,o,s,a,c,l,u,p,d,f,m,g,b,y,v,k,w,N,L,C;if(N=this.properties,this.generated)for(l=0,g=N.length;g>l;l++)v=N[l],v instanceof wt&&v.error("cannot have an implicit value in an implicit object");for(r=p=0,b=N.length;b>p&&(w=N[r],!((w.variable||w).base instanceof Q));r=++p);for(o=N.length>r,a=e.indent+=ft,m=this.lastNonComment(this.properties),n=[],o&&(k=e.scope.freeVariable("obj"),n.push(this.makeCode("(\n"+a+k+" = "))),n.push(this.makeCode("{"+(0===N.length||0===r?"}":"\n"))),s=f=0,y=N.length;y>f;s=++f)w=N[s],s===r&&(0!==s&&n.push(this.makeCode("\n"+a+"}")),n.push(this.makeCode(",\n"))),u=s===N.length-1||s===r-1?"":w===m||w instanceof h?"\n":",\n",c=w instanceof h?"":a,o&&r>s&&(c+=ft),w instanceof i&&("object"!==w.context&&w.operatorToken.error("unexpected "+w.operatorToken.value),w.variable instanceof wt&&w.variable.hasProperties()&&w.variable.error("invalid object key")),w instanceof wt&&w["this"]&&(w=new i(w.properties[0].name,w,"object")),w instanceof h||(r>s?(w instanceof i||(w=new i(w,w,"object")),(w.variable.base||w.variable).asKey=!0):(w instanceof i?(d=w.variable,C=w.value):(L=w.base.cache(e),d=L[0],C=L[1]),w=new i(new wt(new T(k),[new t(d)]),C))),c&&n.push(this.makeCode(c)),n.push.apply(n,w.compileToFragments(e,j)),u&&n.push(this.makeCode(u));return o?n.push(this.makeCode(",\n"+a+k+"\n"+this.tab+")")):0!==N.length&&n.push(this.makeCode("\n"+this.tab+"}")),this.front&&!o?this.wrapInBraces(n):n},n.prototype.assigns=function(e){var t,n,i,r;for(r=this.properties,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},n}(r),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,r,o,s,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=ft,t=ct.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,r;for(i=this.objects,r=[],t=0,n=i.length;n>t;t++)a=i[t],r.push(a.compileToFragments(e,$));return r}.call(this),r=o=0,s=n.length;s>o;r=++o)i=n[r],r&&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,r;for(r=this.objects,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},t}(r),e.Class=c=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new o,this.boundFuncs=[],this.body.classBody=!0}return Yt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.defaultClassVariableName="_Class",n.prototype.determineName=function(){var e,n,i,r,o;return this.variable?(r=this.variable.properties,o=r[r.length-1],i=o?o instanceof t&&o.name:this.variable.base,i instanceof T||i instanceof et?(n=i.value,o||(e=Ot(n),e&&this.variable.error(e)),Wt.call(R,n)>=0?"_"+n:n):this.defaultClassVariableName):this.defaultClassVariableName},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof gt?t.value=e:t instanceof l&&t.bound?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,r,o,s;for(s=this.boundFuncs,i=0,r=s.length;r>i;i++)n=s[i],o=new wt(new gt,[new t(n)]).compile(e),this.ctor.body.unshift(new B(o+" = "+qt("bind",e)+"("+o+", this)"))},n.prototype.addProperties=function(e,n,r){var o,s,a,c,u,h;return h=e.base.properties.slice(0),c=function(){var e;for(e=[];s=h.shift();)s instanceof i&&(a=s.variable.base,delete s.context,u=s.value,"constructor"===a.value?(this.ctor&&s.error("cannot define more than one constructor in a class"),u.bound&&s.error("cannot define a constructor as a bound function"),u instanceof l?s=this.ctor=u:(this.externalCtor=r.classScope.freeVariable("ctor"),s=new i(new T(this.externalCtor),u))):s.variable["this"]?u["static"]=!0:(o=a.isComplex()?new S(a):new t(a),s.variable=new wt(new T(n),[new t(new et("prototype")),o]),u instanceof l&&u.bound&&(this.boundFuncs.push(a),u.bound=!1))),e.push(s);
+return e}.call(this),Ft(c)},n.prototype.walkBody=function(e,t){return this.traverseChildren(!1,function(r){return function(s){var a,c,l,u,h,p,d;if(a=!0,s instanceof n)return!1;if(s instanceof o){for(d=c=s.expressions,l=u=0,h=d.length;h>u;l=++u)p=d[l],p instanceof i&&p.variable.looksStatic(e)?p.value["static"]=!0:p instanceof wt&&p.isObject(!0)&&(a=!1,c[l]=r.addProperties(p,e,t));s.expressions=c=_t(c)}return a&&!(s instanceof n)}}(this))},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof h||n instanceof wt&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new l,this.externalCtor?this.ctor.body.push(new B(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new B(e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},n.prototype.compileNode=function(e){var t,n,r,s,c,u,h,p,d;return(s=this.body.jumps())&&s.error("Class bodies cannot contain pure statements"),(n=this.body.contains(Rt))&&n.error("Class bodies shouldn't reference arguments"),h=this.determineName(),u=new T(h),r=new l([],o.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(h),this.walkBody(h,e),this.ensureConstructor(h),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(u),this.parent&&(d=new T(e.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new k(u,d)),r.params.push(new K(d)),t.push(this.parent)),(p=this.body.expressions).unshift.apply(p,this.directives),c=new Q(new a(r,t)),this.variable&&(c=new i(this.variable,c,null,{moduleDeclaration:this.moduleDeclaration})),c.compileToFragments(e)},n}(r),e.ModuleDeclaration=V=function(e){function t(e,t){this.clause=e,this.source=t,this.checkSource()}return Yt(t,e),t.prototype.children=["clause","source"],t.prototype.isStatement=Nt,t.prototype.jumps=mt,t.prototype.makeReturn=mt,t.prototype.checkSource=function(){return null!=this.source&&this.source instanceof ht?this.source.error("the name of the module to be imported from must be an uninterpolated string"):void 0},t.prototype.checkScope=function(e,t){return 0!==e.indent.length?this.error(t+" statements must be at top-level scope"):void 0},t}(r),e.ImportDeclaration=C=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.compileNode=function(e){var t,n;return this.checkScope(e,"import"),e.importedSymbols=[],t=[],t.push(this.makeCode(this.tab+"import ")),null!=this.clause&&t.push.apply(t,this.clause.compileNode(e)),null!=(null!=(n=this.source)?n.value:void 0)&&(null!==this.clause&&t.push(this.makeCode(" from ")),t.push(this.makeCode(this.source.value))),t.push(this.makeCode(";")),t},t}(V),e.ImportClause=L=function(e){function t(e,t){this.defaultBinding=e,this.namedImports=t}return Yt(t,e),t.prototype.children=["defaultBinding","namedImports"],t.prototype.compileNode=function(e){var t;return t=[],null!=this.defaultBinding&&(t.push.apply(t,this.defaultBinding.compileNode(e)),null!=this.namedImports&&t.push(this.makeCode(", "))),null!=this.namedImports&&t.push.apply(t,this.namedImports.compileNode(e)),t},t}(r),e.ExportDeclaration=m=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.compileNode=function(e){var t,n;return this.checkScope(e,"export"),t=[],t.push(this.makeCode(this.tab+"export ")),this instanceof g&&t.push(this.makeCode("default ")),this instanceof g||!(this.clause instanceof i||this.clause instanceof c)||(t.push(this.makeCode("var ")),this.clause.moduleDeclaration="export"),t=null!=this.clause.body&&this.clause.body instanceof o?t.concat(this.clause.compileToFragments(e,j)):t.concat(this.clause.compileNode(e)),null!=(null!=(n=this.source)?n.value:void 0)&&t.push(this.makeCode(" from "+this.source.value)),t.push(this.makeCode(";")),t},t}(V),e.ExportNamedDeclaration=b=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(m),e.ExportDefaultDeclaration=g=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(m),e.ExportAllDeclaration=f=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(m),e.ModuleSpecifierList=H=function(e){function t(e){this.specifiers=e}return Yt(t,e),t.prototype.children=["specifiers"],t.prototype.compileNode=function(e){var t,n,i,r,o,s,a;if(t=[],e.indent+=ft,n=function(){var t,n,i,r;for(i=this.specifiers,r=[],t=0,n=i.length;n>t;t++)a=i[t],r.push(a.compileToFragments(e,$));return r}.call(this),0!==this.specifiers.length){for(t.push(this.makeCode("{\n"+e.indent)),r=o=0,s=n.length;s>o;r=++o)i=n[r],r&&t.push(this.makeCode(",\n"+e.indent)),t.push.apply(t,i);t.push(this.makeCode("\n}"))}else t.push(this.makeCode("{}"));return t},t}(r),e.ImportSpecifierList=x=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(H),e.ExportSpecifierList=v=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(H),e.ModuleSpecifier=U=function(e){function t(e,t,n){this.original=e,this.alias=t,this.moduleDeclarationType=n,this.identifier=null!=this.alias?this.alias.value:this.original.value}return Yt(t,e),t.prototype.children=["original","alias"],t.prototype.compileNode=function(e){var t;return e.scope.add(this.identifier,this.moduleDeclarationType),t=[],t.push(this.makeCode(this.original.value)),null!=this.alias&&t.push(this.makeCode(" as "+this.alias.value)),t},t}(r),e.ImportSpecifier=D=function(e){function t(e,n){t.__super__.constructor.call(this,e,n,"import")}return Yt(t,e),t.prototype.compileNode=function(e){var n;return n=this.identifier,Wt.call(e.importedSymbols,n)>=0||e.scope.check(this.identifier)?this.error("'"+this.identifier+"' has already been declared"):e.importedSymbols.push(this.identifier),t.__super__.compileNode.call(this,e)},t}(U),e.ImportDefaultSpecifier=F=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(D),e.ImportNamespaceSpecifier=E=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(D),e.ExportSpecifier=y=function(e){function t(e,n){t.__super__.constructor.call(this,e,n,"export")}return Yt(t,e),t}(U),e.Assign=i=function(e){function n(e,t,n,i){this.variable=e,this.value=t,this.context=n,null==i&&(i={}),this.param=i.param,this.subpattern=i.subpattern,this.operatorToken=i.operatorToken,this.moduleDeclaration=i.moduleDeclaration}return Yt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===j&&null!=this.context&&(this.moduleDeclaration||Wt.call(this.context,"?")>=0)},n.prototype.checkAssignability=function(e,t){return Object.prototype.hasOwnProperty.call(e.scope.positions,t.value)&&"import"===e.scope.variables[e.scope.positions[t.value]].type?t.error("'"+t.value+"' is read-only"):void 0},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return Gt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,r,o,s,a,c,u,h,p,d,f,m,g;if(i=this.variable instanceof wt){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("**="===(u=this.context)||"//="===u||"%%="===u)return this.compileSpecialMath(e)}return this.value instanceof l&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):(null!=(h=this.variable.properties)?h.length:void 0)>=2&&(p=this.variable.properties,s=p.length>=3?Jt.call(p,0,r=p.length-2):(r=0,[]),a=p[r++],o=p[r++],"prototype"===(null!=(d=a.name)?d.value:void 0)&&(this.value.klass=new wt(this.variable.base,s),this.value.name=o,this.value.variable=this.variable))),this.context||(g=this.variable.unwrapAll(),g.isAssignable()||this.variable.error("'"+this.variable.compile(e)+"' can't be assigned"),("function"==typeof g.hasProperties?g.hasProperties():void 0)||(this.moduleDeclaration?(this.checkAssignability(e,g),e.scope.add(g.value,this.moduleDeclaration)):this.param?e.scope.add(g.value,"var"):(this.checkAssignability(e,g),e.scope.find(g.value)))),m=this.value.compileToFragments(e,$),i&&this.variable.base instanceof J&&(this.variable.front=!0),n=this.variable.compileToFragments(e,$),"object"===this.context?(f=St(n),Wt.call(R,f)>=0&&(n.unshift(this.makeCode('"')),n.push(this.makeCode('"'))),n.concat(this.makeCode(": "),m)):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),m),$>=e.level?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,r,o,s,a,c,l,u,h,p,f,m,g,b,y,v,k,w,N,L,C,F,E,D,x,_,I,R;if(D=e.level===j,_=this.value,v=this.variable.base.objects,!(k=v.length))return o=_.compileToFragments(e),e.level>=P?this.wrapInBraces(o):o;if(y=v[0],1===k&&y instanceof d&&y.error("Destructuring assignment has no target"),h=this.variable.isObject(),D&&1===k&&!(y instanceof ct))return s=null,y instanceof n&&"object"===y.context?(N=y,L=N.variable,u=L.base,y=N.value,y instanceof n&&(s=y.value,y=y.variable)):(y instanceof n&&(s=y.value,y=y.variable),u=h?y["this"]?y.properties[0].name:new et(y.unwrap().value):new W(0)),i=u.unwrap()instanceof et,_=new wt(_),_.properties.push(new(i?t:S)(u)),g=Ot(y.unwrap().value),g&&y.error(g),s&&(_=new z("?",_,s)),new n(y,_,null,{param:this.param}).compileToFragments(e,j);for(I=_.compileToFragments(e,$),R=St(I),r=[],a=!1,_.unwrap()instanceof T&&!this.variable.assigns(R)||(r.push([this.makeCode((w=e.scope.freeVariable("ref"))+" = ")].concat(Jt.call(I))),I=[this.makeCode(w)],R=w),l=f=0,m=v.length;m>f;l=++f){if(y=v[l],u=l,!a&&y instanceof ct)b=y.name.unwrap().value,y=y.unwrap(),x=k+" <= "+R+".length ? "+qt("slice",e)+".call("+R+", "+l,(E=k-l-1)?(p=e.scope.freeVariable("i",{single:!0}),x+=", "+p+" = "+R+".length - "+E+") : ("+p+" = "+l+", [])"):x+=") : []",x=new B(x),a=p+"++";else{if(!a&&y instanceof d){(E=k-l-1)&&(1===E?a=R+".length - 1":(p=e.scope.freeVariable("i",{single:!0}),x=new B(p+" = "+R+".length - "+E),a=p+"++",r.push(x.compileToFragments(e,$))));continue}(y instanceof ct||y instanceof d)&&y.error("multiple splats/expansions are disallowed in an assignment"),s=null,y instanceof n&&"object"===y.context?(C=y,F=C.variable,u=F.base,y=C.value,y instanceof n&&(s=y.value,y=y.variable)):(y instanceof n&&(s=y.value,y=y.variable),u=h?y["this"]?y.properties[0].name:new et(y.unwrap().value):new B(a||u)),b=y.unwrap().value,i=u.unwrap()instanceof et,x=new wt(new B(R),[new(i?t:S)(u)]),s&&(x=new z("?",x,s))}null!=b&&(g=Ot(b),g&&y.error(g)),r.push(new n(y,x,null,{param:this.param,subpattern:!0}).compileToFragments(e,$))}return D||this.subpattern||r.push(I),c=this.joinFragmentArrays(r,", "),$>e.level?c:this.wrapInBraces(c)},n.prototype.compileConditional=function(e){var t,i,r,o;return r=this.variable.cacheReference(e),i=r[0],o=r[1],i.properties.length||!(i.base instanceof B)||i.base instanceof gt||e.scope.check(i.base.value)||this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Wt.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new N(new p(i),o,{type:"if"}).addElse(new n(o,this.value,"=")).compileToFragments(e)):(t=new z(this.context.slice(0,-1),i,new n(o,this.value,"=")).compileToFragments(e),$>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return i=this.variable.cacheReference(e),t=i[0],r=i[1],new n(t,new z(this.context.slice(0,-1),r,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,o,s,a,c,l,u,h,p;return a=this.variable.properties.pop().range,i=a.from,u=a.to,n=a.exclusive,s=this.variable.compile(e),i?(c=this.cacheToCodeFragments(i.cache(e,P)),r=c[0],o=c[1]):r=o="0",u?(null!=i?i.isNumber():void 0)&&u.isNumber()?(u=u.compile(e)-o,n||(u+=1)):(u=u.compile(e,A)+" - "+o,n||(u+=" + 1")):u="9e9",l=this.value.cache(e,$),h=l[0],p=l[1],t=[].concat(this.makeCode("[].splice.apply("+s+", ["+r+", "+u+"].concat("),h,this.makeCode(")), "),p),e.level>j?this.wrapInBraces(t):t},n}(r),e.Code=l=function(e){function t(e,t,n){this.params=e||[],this.body=t||new o,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){return e instanceof z&&e.isYield()||e instanceof Lt})}return Yt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=q,t.prototype.makeScope=function(e){return new st(e,this.body,this)},t.prototype.compileNode=function(e){var r,s,c,l,u,h,p,f,m,g,b,y,v,k,w,L,C,F,E,D,x,_,S,I,R,O,$,P,M,j,V,U,H;if(this.bound&&(null!=(S=e.scope.method)?S.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",H=new t([new K(new T(this.context))],new o([this])),s=new a(H,[new gt]),s.updateLocationDataIfMissing(this.locationData),s.compileNode(e);for(e.scope=Et(e,"classScope")||this.makeScope(e.scope),e.scope.shared=Et(e,"sharedScope"),e.indent+=ft,delete e.bare,delete e.isExistentialEquals,E=[],l=[],I=this.params,h=0,m=I.length;m>h;h++)F=I[h],F instanceof d||e.scope.parameter(F.asReference(e));for(R=this.params,p=0,g=R.length;g>p;p++)if(F=R[p],F.splat||F instanceof d){for(O=this.params,f=0,b=O.length;b>f;f++)C=O[f],C instanceof d||!C.name.value||e.scope.add(C.name.value,"var",!0);M=new i(new wt(new n(function(){var t,n,i,r;for(i=this.params,r=[],n=0,t=i.length;t>n;n++)C=i[n],r.push(C.asReference(e));return r}.call(this))),new wt(new T("arguments")));break}for($=this.params,L=0,y=$.length;y>L;L++)F=$[L],F.isComplex()?(V=_=F.asReference(e),F.value&&(V=new z("?",_,F.value)),l.push(new i(new wt(F.name),V,"=",{param:!0}))):(_=F,F.value&&(w=new B(_.name.value+" == null"),V=new i(new wt(F.name),F.value,"="),l.push(new N(w,V)))),M||E.push(_);for(U=this.body.isEmpty(),M&&l.unshift(M),l.length&&(P=this.body.expressions).unshift.apply(P,l),u=D=0,v=E.length;v>D;u=++D)C=E[u],E[u]=C.compileToFragments(e),e.scope.parameter(St(E[u]));for(j=[],this.eachParamName(function(e,t){return Wt.call(j,e)>=0&&t.error("multiple parameters named "+e),j.push(e)}),U||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],u=x=0,k=E.length;k>x;u=++x)C=E[u],u&&r.push(this.makeCode(", ")),r.push.apply(r,C);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Jt.call(r)):this.front||e.level>=A?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,o;for(r=this.params,o=[],t=0,n=r.length;n>t;t++)i=r[t],o.push(i.eachName(e));return o},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=K=function(e){function t(e,t,n){var i,r;this.name=e,this.value=t,this.splat=n,i=Ot(this.name.unwrapAll().value),i&&this.name.error(i),this.name instanceof J&&this.name.generated&&(r=this.name.objects[0].operatorToken,r.error("unexpected "+r.value))}return Yt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,$)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t=n.properties[0].name.value,Wt.call(R,t)>=0&&(t="_"+t),n=new T(e.scope.freeVariable(t))):n.isComplex()&&(n=new T(e.scope.freeVariable("arg"))),n=new wt(n),this.splat&&(n=new ct(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,o,s,a,c,l;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof B)return e(t.value,t);if(t instanceof wt)return n(t);for(l=null!=(c=t.objects)?c:[],r=0,o=l.length;o>r;r++)a=l[r],a instanceof i&&null==a.context&&(a=a.variable),a instanceof i?(a.value instanceof i&&(a=a.value),this.eachName(e,a.value.unwrap())):a instanceof ct?(s=a.name.unwrap(),e(s.value,s)):a instanceof wt?a.isArray()||a.isObject()?this.eachName(e,a.base):a["this"]?n(a):e(a.base.value,a.base):a instanceof d||a.error("illegal parameter "+a.compile())},t}(r),e.Splat=ct=function(e){function t(e){this.name=e.compile?e:new B(e)}return Yt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=Nt,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,o,s,a,c,l,u,h,p,d,f;for(u=-1;(f=n[++u])&&!(f instanceof t););if(u>=n.length)return[];if(1===n.length)return f=n[0],c=f.compileToFragments(e,$),i?c:[].concat(f.makeCode(qt("slice",e)+".call("),c,f.makeCode(")"));for(r=n.slice(u),l=h=0,d=r.length;d>h;l=++h)f=r[l],s=f.compileToFragments(e,$),r[l]=f instanceof t?[].concat(f.makeCode(qt("slice",e)+".call("),s,f.makeCode(")")):[].concat(f.makeCode("["),s,f.makeCode("]"));return 0===u?(f=n[0],a=f.joinFragmentArrays(r.slice(1),", "),r[0].concat(f.makeCode(".concat("),a,f.makeCode(")"))):(o=function(){var t,i,r,o;for(r=n.slice(0,u),o=[],t=0,i=r.length;i>t;t++)f=r[t],o.push(f.compileToFragments(e,$));return o}(),o=n[0].joinFragmentArrays(o,", "),a=n[u].joinFragmentArrays(r,", "),p=n[n.length-1],[].concat(n[0].makeCode("["),o,n[u].makeCode("].concat("),a,p.makeCode(")")))},t}(r),e.Expansion=d=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t.prototype.isComplex=q,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=Tt=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=Nt,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(t=0,i=e.length;i>t;t++)if(r=e[t],n=r.jumps({loop:!0}))return n;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=ft,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new N(new Q(this.guard).invert(),new lt("continue"))):this.guard&&(n=o.wrap([new N(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,j),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,M),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=z=function(e){function n(e,t,n,i){if("in"===e)return new _(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof a&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof l&&t.bound||t["do"])&&(t=new Q(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,o;return Yt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},o={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isNumber=function(){var e;return this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof wt&&this.first.isNumber()},n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){return!this.isNumber()},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,s;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in o),t=t.first;if(!e)return new Q(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=o[t.operator],t=t.first;return this}return(r=o[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new Q(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(s=i.operator)||"in"===s||"instanceof"===s)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&Gt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,o,s,c,u,h;for(c=[],n=e instanceof i&&(u=e.value.unwrap())instanceof l?u:e,h=n.params||[],r=0,o=h.length;o>r;r++)s=h[r],s.value?(c.push(s.value),delete s.value):c.push(s);return t=new a(e,c),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,o,s;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(o=this.operator)||"++"===o)&&(r=Ot(this.first.unwrapAll().value),r&&this.first.error(r)),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,P),s=this.second.compileToFragments(e,P),t=[].concat(i,this.makeCode(" "+this.operator+" "),s),P>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,P),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,P)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new T(e.scope.freeVariable("ref")),t=new Q(new i(n,this.first))):(t=this.first,n=t),new N(new p(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof p?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=A?new Q(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new Q(this.first)),i.push(this.first.compileToFragments(e,P)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n,i;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield can only occur inside functions"),Wt.call(Object.keys(this.first),"expression")>=0&&!(this.first instanceof bt)?null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,P)):(e.level>=M&&n.push([this.makeCode("(")]),n.push([this.makeCode(t)]),""!==(null!=(i=this.first.base)?i.value:void 0)&&n.push([this.makeCode(" ")]),n.push(this.first.compileToFragments(e,P)),e.level>=M&&n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new wt(new T("Math"),[new t(new et("pow"))]),new a(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new wt(new T("Math"),[new t(new et("floor"))]),i=new n("/",this.first,this.second),new a(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new wt(new B(qt("modulo",e))),new a(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=_=function(e){function t(e,t){this.object=e,this.array=t}return Yt(t,e),t.prototype.children=["object","array"],t.prototype.invert=G,t.prototype.compileNode=function(e){var t,n,i,r,o;if(this.array instanceof wt&&this.array.isArray()&&this.array.base.objects.length){for(o=this.array.base.objects,n=0,i=o.length;i>n;n++)if(r=o[n],r instanceof ct){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,o,s,a,c,l,u,h,p;for(c=this.object.cache(e,P),h=c[0],a=c[1],l=this.negated?[" !== "," && "]:[" === "," || "],t=l[0],n=l[1],p=[],u=this.array.base.objects,i=o=0,s=u.length;s>o;i=++o)r=u[i],i&&p.push(this.makeCode(n)),p=p.concat(i?a:h,this.makeCode(t),r.compileToFragments(e,A));return P>e.level?p:this.wrapInBraces(p)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return i=this.object.cache(e,$),r=i[0],n=i[1],t=[].concat(this.makeCode(qt("indexOf",e)+".call("),this.array.compileToFragments(e,$),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),St(r)===St(n)?t:(t=r.concat(this.makeCode(", "),t),$>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=yt=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return Yt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=Nt,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,o,s,a;return e.indent+=ft,a=this.attempt.compileToFragments(e,j),t=this.recovery?(r=e.scope.freeVariable("error",{reserve:!1}),s=new T(r),this.errorVariable?(o=Ot(this.errorVariable.unwrapAll().value),o?this.errorVariable.error(o):void 0,this.recovery.unshift(new i(this.errorVariable,s))):void 0,[].concat(this.makeCode(" catch ("),s.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,j),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(r=e.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+r+") {}")]),n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,j),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),a,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=bt=function(e){function t(e){this.expression=e}return Yt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Nt,t.prototype.jumps=q,t.prototype.makeReturn=mt,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=p=function(e){function t(e){this.expression=e}return Yt(t,e),t.prototype.children=["expression"],t.prototype.invert=G,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,P),this.expression.unwrap()instanceof T&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(O>=e.level?i:"("+i+")")]},t}(r),e.Parens=Q=function(e){function t(e){this.body=e}return Yt(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 wt&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,M),t=P>e.level&&(n instanceof z||n instanceof a||n instanceof w&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.StringWithInterpolations=ht=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Yt(t,e),t}(Q),e.For=w=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=o.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 wt&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof wt&&this.source.base instanceof tt&&!this.source.properties.length,this.pattern=this.name instanceof wt,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return Yt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,s,a,c,l,u,h,p,d,f,m,g,b,y,v,k,w,L,C,F,E,D,x,_,S,I,R,A,O,P,M,V;return t=o.wrap([this.body]),E=t.expressions,k=E[E.length-1],(null!=k?k.jumps():void 0)instanceof rt&&(this.returns=!1),R=this.range?this.source.base:this.source,I=e.scope,this.pattern||(L=this.name&&this.name.compile(e,$)),g=this.index&&this.index.compile(e,$),L&&!this.pattern&&I.find(L),g&&I.find(g),this.returns&&(S=I.freeVariable("results")),b=this.object&&g||I.freeVariable("i",{single:!0}),y=this.range&&L||g||b,v=y!==b?y+" = ":"",this.step&&!this.range&&(D=this.cacheToCodeFragments(this.step.cache(e,$,It)),A=D[0],P=D[1],this.step.isNumber()&&(O=Number(P))),this.pattern&&(L=b),V="",d="",l="",f=this.tab+ft,this.range?p=R.compileToFragments(Pt(e,{index:b,name:L,step:this.step,isComplex:It})):(M=this.source.compile(e,$),!L&&!this.own||this.source.unwrap()instanceof T||(l+=""+this.tab+(F=I.freeVariable("ref"))+" = "+M+";\n",M=F),L&&!this.pattern&&(C=L+" = "+M+"["+y+"]"),this.object||(A!==P&&(l+=""+this.tab+A+";\n"),h=0>O,this.step&&null!=O&&h||(w=I.freeVariable("len")),a=""+v+b+" = 0, "+w+" = "+M+".length",c=""+v+b+" = "+M+".length - 1",r=b+" < "+w,s=b+" >= 0",this.step?(null!=O?h&&(r=s,a=c):(r=P+" > 0 ? "+r+" : "+s,a="("+P+" > 0 ? ("+a+") : "+c+")"),m=b+" += "+P):m=""+(y!==b?"++"+b:b+"++"),p=[this.makeCode(a+"; "+r+"; "+v+m)])),this.returns&&(x=""+this.tab+S+" = [];\n",_="\n"+this.tab+"return "+S+";",t.makeReturn(S)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new N(new Q(this.guard).invert(),new lt("continue"))):this.guard&&(t=o.wrap([new N(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new B(M+"["+y+"]"))),u=[].concat(this.makeCode(l),this.pluckDirectCall(e,t)),C&&(V="\n"+f+C+";"),this.object&&(p=[this.makeCode(y+" in "+M)],this.own&&(d="\n"+f+"if (!"+qt("hasProp",e)+".call("+M+", "+y+")) continue;")),n=t.compileToFragments(Pt(e,{indent:f}),j),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(u,this.makeCode(""+(x||"")+this.tab+"for ("),p,this.makeCode(") {"+d+V),n,this.makeCode(this.tab+"}"+(_||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,o,s,c,u,h,p,d,f,m,g,b,y,v,k;for(r=[],d=t.expressions,c=u=0,h=d.length;h>u;c=++u)o=d[c],o=o.unwrapAll(),o instanceof a&&(k=null!=(f=o.variable)?f.unwrapAll():void 0,(k instanceof l||k instanceof wt&&(null!=(m=k.base)?m.unwrapAll():void 0)instanceof l&&1===k.properties.length&&("call"===(g=null!=(b=k.properties[0].name)?b.value:void 0)||"apply"===g))&&(s=(null!=(y=k.base)?y.unwrapAll():void 0)||k,p=new T(e.scope.freeVariable("fn")),n=new wt(p),k.base&&(v=[n,k],k.base=v[0],n=v[1]),t.expressions[c]=new a(n,o.args),r=r.concat(this.makeCode(this.tab),new i(p,s).compileToFragments(e,j),this.makeCode(";\n"))));
+return r},t}(Tt),e.Switch=dt=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=Nt,t.prototype.jumps=function(e){var t,n,i,r,o,s,a,c;for(null==e&&(e={block:!0}),s=this.cases,i=0,o=s.length;o>i;i++)if(a=s[i],n=a[0],t=a[1],r=t.jumps(e))return r;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,s;for(r=this.cases,t=0,n=r.length;n>t;t++)i=r[t],i[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new o([new B("void 0")]))),null!=(s=this.otherwise)&&s.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,o,s,a,c,l,u,h,p,d,f,m,g;for(c=e.indent+ft,l=e.indent=c+ft,s=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,M):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=u=0,p=f.length;p>u;a=++u){for(m=f[a],r=m[0],t=m[1],g=_t([r]),h=0,d=g.length;d>h;h++)i=g[h],this.subject||(i=i.invert()),s=s.concat(this.makeCode(c+"case "),i.compileToFragments(e,M),this.makeCode(":\n"));if((n=t.compileToFragments(e,j)).length>0&&(s=s.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;o=this.lastNonComment(t.expressions),o instanceof rt||o instanceof B&&o.jumps()&&"debugger"!==o.value||s.push(i.makeCode(l+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&s.push.apply(s,[this.makeCode(c+"default:\n")].concat(Jt.call(this.otherwise.compileToFragments(e,j)),[this.makeCode("\n")])),s.push(this.makeCode(this.tab+"}")),s},t}(r),e.If=N=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.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===j||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 o([new B("void 0")]))),this.body&&(this.body=new o([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new o([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof o?e:new o([e])},t.prototype.compileStatement=function(e){var n,i,r,o,s,a,c;return r=Et(e,"chainChild"),(s=Et(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+ft,o=this.condition.compileToFragments(e,M),i=this.ensureBlock(this.body).compileToFragments(Pt(e,{indent:c})),a=[].concat(this.makeCode("if ("),o,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,j))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(Pt(e,{indent:c}),j),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,O),n=this.bodyNode().compileToFragments(e,$),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,$):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=O?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),vt={extend:function(e){return"function(child, parent) { for (var key in parent) { if ("+qt("hasProp",e)+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},j=1,M=2,$=3,O=4,P=5,A=6,ft=" ",ot=/^[+-]?\d+$/,qt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable(e),i.assign(n,vt[e](t)),i.utilities[e]=n)},Mt=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},Rt=function(e){return e instanceof B&&"arguments"===e.value&&!e.asKey},At=function(e){return e instanceof gt&&!e.asKey||e instanceof l&&e.bound||e instanceof pt},It=function(e){return e.isComplex()||("function"==typeof e.isAssignable?e.isAssignable():void 0)},Gt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new wt(t),i}}.call(this),t.exports}(),require["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,o;return t.prototype.add=function(t,n,i){var r,o,s,a;return null==i&&(i={}),s=n[0],o=n[1],a=(r=this.lines)[s]||(r[s]=new e(s)),a.add(o,t,i)},t.prototype.sourceLocation=function(e){var t,n,i;for(n=e[0],t=e[1];!((i=this.lines[n])||0>=n);)n--;return i&&i.sourceLocation(t)},t.prototype.generate=function(e,t){var n,i,r,o,s,a,c,l,u,h,p,d,f,m,g,b;for(null==e&&(e={}),null==t&&(t=null),b=0,o=0,a=0,s=0,d=!1,n="",f=this.lines,h=i=0,c=f.length;c>i;h=++i)if(u=f[h])for(m=u.columns,r=0,l=m.length;l>r;r++)if(p=m[r]){for(;p.line>b;)o=0,d=!1,n+=";",b++;d&&(n+=",",d=!1),n+=this.encodeVlq(p.column-o),o=p.column,n+=this.encodeVlq(0),n+=this.encodeVlq(p.sourceLine-a),a=p.sourceLine,n+=this.encodeVlq(p.sourceColumn-s),s=p.sourceColumn,d=!0}return g={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inlineMap&&(g.sourcesContent=[t]),g},r=5,i=1<e?1:0,a=(Math.abs(e)<<1)+s;a||!t;)n=a&o,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)}()},t}(),t.exports=n}.call(this),t.exports}(),require["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,o,s,a,c,l,u,h,p,d,f,m,g,b,y,v,k={}.hasOwnProperty;if(c=require("fs"),y=require("vm"),m=require("path"),t=require("./lexer").Lexer,f=require("./parser").parser,u=require("./helpers"),n=require("./sourcemap"),e.VERSION="1.11.0",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=u,i=function(e){switch(!1){case"function"!=typeof Buffer:return new Buffer(e).toString("base64");case"function"!=typeof btoa:return btoa(e);default:throw Error("Unable to base64 encode inline sourcemap.")}},v=function(e){return function(t,n){var i;null==n&&(n={});try{return e.call(this,t,n)}catch(r){if(i=r,"string"!=typeof t)throw i;throw u.updateSyntaxError(i,t,n.filename)}}},e.compile=r=v(function(e,t){var r,o,s,a,c,l,h,p,m,g,b,y,v,k,w,T,N,L,C,F,E,D,x;if(w=u.merge,a=u.extend,t=a({},t),h=t.sourceMap||t.inlineMap,h&&(k=new n),D=d.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=D.length;t>e;e++)E=D[e],"IDENTIFIER"===E[0]&&n.push(E[1]);return n}(),null==t.bare||t.bare!==!0)for(m=0,y=D.length;y>m;m++)if(E=D[m],"IMPORT"===(N=E[0])||"EXPORT"===N){t.bare=!0;break}for(l=f.parse(D).compileToFragments(t),o=0,t.header&&(o+=1),t.shiftLine&&(o+=1),r=0,b="",g=0,v=l.length;v>g;g++)c=l[g],h&&(c.locationData&&!/^[;\s]*$/.test(c.code)&&k.add([c.locationData.first_line,c.locationData.first_column],[o,r],{noReplace:!0}),T=u.count(c.code,"\n"),o+=T,T?r=c.code.length-(c.code.lastIndexOf("\n")+1):r+=c.code.length),b+=c.code;return t.header&&(p="Generated by CoffeeScript "+this.VERSION,b="// "+p+"\n"+b),h&&(x=k.generate(t,e)),t.inlineMap&&(s=i(JSON.stringify(x)),C="//# sourceMappingURL=data:application/json;base64,"+s,F="//# sourceURL="+(null!=(L=t.filename)?L:"coffeescript"),b=b+"\n"+C+"\n"+F),t.sourceMap?{js:b,sourceMap:k,v3SourceMap:JSON.stringify(x,null,2)}:b}),e.tokens=v(function(e,t){return d.tokenize(e,t)}),e.nodes=v(function(e,t){return"string"==typeof e?f.parse(d.tokenize(e,t)):f.parse(e)}),e.run=function(e,t){var n,i,o,s;return null==t&&(t={}),o=require.main,o.filename=process.argv[1]=t.filename?c.realpathSync(t.filename):".",o.moduleCache&&(o.moduleCache={}),i=t.filename?m.dirname(c.realpathSync(t.filename)):c.realpathSync("."),o.paths=require("module")._nodeModulePaths(i),(!u.isCoffee(o.filename)||require.extensions)&&(n=r(e,t),e=null!=(s=n.js)?s:n),o._compile(e,o.filename)},e.eval=function(e,t){var n,i,o,s,a,c,l,u,h,p,d,f,g,b,v,w,T;if(null==t&&(t={}),e=e.trim()){if(s=null!=(f=y.Script.createContext)?f:y.createContext,c=null!=(g=y.isContext)?g:function(){return t.sandbox instanceof s().constructor},s){if(null!=t.sandbox){if(c(t.sandbox))w=t.sandbox;else{w=s(),b=t.sandbox;for(u in b)k.call(b,u)&&(T=b[u],w[u]=T)}w.global=w.root=w.GLOBAL=w}else w=global;if(w.__filename=t.filename||"eval",w.__dirname=m.dirname(w.__filename),w===global&&!w.module&&!w.require){for(n=require("module"),w.module=i=new n(t.modulename||"eval"),w.require=o=function(e){return n._load(e,i,!0)},i.filename=w.__filename,v=Object.getOwnPropertyNames(require),a=0,h=v.length;h>a;a++)d=v[a],"paths"!==d&&"arguments"!==d&&"caller"!==d&&(o[d]=require[d]);o.paths=i.paths=n._nodeModulePaths(process.cwd()),o.resolve=function(e){return n._resolveFilename(e,i)}}}p={};for(u in t)k.call(t,u)&&(T=t[u],p[u]=T);return p.bare=!0,l=r(e,p),w===global?y.runInThisContext(l):y.runInContext(l,w)}},e.register=function(){return require("./register")},require.extensions)for(g=this.FILE_EXTENSIONS,s=function(e){var t;return null!=(t=require.extensions)[e]?t[e]:t[e]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+e+" files.")}},h=0,p=g.length;p>h;h++)o=g[h],s(o);e._compileFile=function(e,t,n){var i,o,s,a;null==t&&(t=!1),null==n&&(n=!1),s=c.readFileSync(e,"utf8"),a=65279===s.charCodeAt(0)?s.substring(1):s;try{i=r(a,{filename:e,sourceMap:t,inlineMap:n,sourceFiles:[e],literate:u.isLiterate(e)})}catch(l){throw o=l,u.updateSyntaxError(o,a,e)}return i},d=new t,f.lexer={lex:function(){var e,t;return t=f.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],f.errorToken=t.origin||t,this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return f.tokens=e,this.pos=0},upcomingInput:function(){return""}},f.yy=require("./nodes"),f.yy.parseError=function(e,t){var n,i,r,o,s,a;return s=t.token,o=f.errorToken,a=f.tokens,i=o[0],r=o[1],n=o[2],r=function(){switch(!1){case o!==a[a.length-1]:return"end of input";case"INDENT"!==i&&"OUTDENT"!==i:return"indentation";case"IDENTIFIER"!==i&&"NUMBER"!==i&&"INFINITY"!==i&&"STRING"!==i&&"STRING_START"!==i&&"REGEX"!==i&&"REGEX_START"!==i:return i.replace(/_START$/,"").toLowerCase();default:return u.nameWhitespaceCharacter(r)}}(),u.throwSyntaxError("unexpected "+r,n)},a=function(e,t){var n,i,r,o,s,a,c,l,u,h,p,d;return o=void 0,r="",e.isNative()?r="native":(e.isEval()?(o=e.getScriptNameOrSourceURL(),o||(r=e.getEvalOrigin()+", ")):o=e.getFileName(),o||(o=""),l=e.getLineNumber(),i=e.getColumnNumber(),h=t(o,l,i),r=h?o+":"+h[0]+":"+h[1]:o+":"+l+":"+i),s=e.getFunctionName(),a=e.isConstructor(),c=!(e.isToplevel()||a),c?(u=e.getMethodName(),d=e.getTypeName(),s?(p=n="",d&&s.indexOf(d)&&(p=d+"."),u&&s.indexOf("."+u)!==s.length-u.length-1&&(n=" [as "+u+"]"),""+p+s+n+" ("+r+")"):d+"."+(u||"")+" ("+r+")"):a?"new "+(s||"")+" ("+r+")":s?s+" ("+r+")":r},b={},l=function(t){var n,i,r,s;if(b[t])return b[t];for(s=e.FILE_EXTENSIONS,i=0,r=s.length;r>i;i++)if(o=s[i],u.ends(t,o))return n=e._compileFile(t,!0),b[t]=n.sourceMap;return null},Error.prepareStackTrace=function(t,n){var i,r,o;return o=function(e,t,n){var i,r;return r=l(e),r&&(i=r.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},r=function(){var t,r,s;for(s=[],t=0,r=n.length;r>t&&(i=n[t],i.getFunction()!==e.run);t++)s.push(" at "+a(i,o));return s}(),""+t+"\n"+r.join("\n")+"\n"}}.call(this),t.exports}(),require["./browser"]=function(){var exports={},module={exports:exports};return function(){var CoffeeScript,compile,runScripts,indexOf=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};CoffeeScript=require("./coffee-script"),CoffeeScript.require=require,compile=CoffeeScript.compile,CoffeeScript.eval=function(code,options){return null==options&&(options={}),null==options.bare&&(options.bare=!0),eval(compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,t.shiftLine=!0,Function(compile(e,t))()},"undefined"!=typeof window&&null!==window&&("undefined"!=typeof btoa&&null!==btoa&&"undefined"!=typeof JSON&&null!==JSON&&(compile=function(e,t){return null==t&&(t={}),t.inlineMap=!0,CoffeeScript.compile(e,t)}),CoffeeScript.load=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=!1),n.sourceFiles=[e],r=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,r.open("GET",e,!0),"overrideMimeType"in r&&r.overrideMimeType("text/plain"),r.onreadystatechange=function(){var o,s;if(4===r.readyState){if(0!==(s=r.status)&&200!==s)throw Error("Could not load "+e);if(o=[r.responseText,n],i||CoffeeScript.run.apply(CoffeeScript,o),t)return t(o)}},r.send(null)},runScripts=function(){var e,t,n,i,r,o,s,a,c,l,u;for(u=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,r;for(r=[],e=0,n=u.length;n>e;e++)c=u[e],i=c.type,indexOf.call(t,i)>=0&&r.push(c);return r}(),o=0,n=function(){var t;return t=e[o],t instanceof Array?(CoffeeScript.run.apply(CoffeeScript,t),o++,n()):void 0},i=function(i,r){var o,s;return o={literate:i.type===t[1]},s=i.src||i.getAttribute("data-src"),s?CoffeeScript.load(s,function(t){return e[r]=t,n()},o,!0):(o.sourceFiles=["embedded"],e[r]=[i.innerHTML,o])},r=s=0,a=e.length;a>s;r=++s)l=e[r],i(l,r);return n()},window.addEventListener?window.addEventListener("DOMContentLoaded",runScripts,!1):window.attachEvent("onload",runScripts))}.call(this),module.exports}(),require["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this);
\ No newline at end of file
diff --git a/index.html b/index.html
index 4130c0a8..56e26198 100644
--- a/index.html
+++ b/index.html
@@ -41,6 +41,7 @@
Chained Comparisons
String Interpolation, Block Strings, and Block Comments
Block Regular Expressions
+ Modules
Cake, and Cakefiles
Source Maps
"text/coffeescript" Script Tags
@@ -111,7 +112,7 @@
Latest Version:
- 1.10.0
+ 1.11.0
npm install -g coffee-script
@@ -128,7 +129,7 @@ number = 42
opposite = true
# Conditions:
-number = -42 if opposite
+number = -42 if opposite
# Functions:
square = (x) -> x * x
@@ -138,9 +139,9 @@ list = [1, 2, # Objects:
math =
- root: Math.sqrt
- square: square
- cube: (x) -> x * square x
+ root: Math.sqrt
+ square: square
+ cube: (x) -> x * square x
# Splats:
race = (winner, runners...) ->
@@ -159,10 +160,10 @@ number = 42;
opposite = true;
if (opposite) {
- number = -42;
+ number = -42;
}
-square = function(x) {
+square = function(x) {
return x * x;
};
@@ -171,12 +172,12 @@ list = [1, 2, Math.sqrt,
square: square,
- cube: function(x) {
+ cube: function(x) {
return x * square(x);
}
};
-race = function() {
+race = function() {
var runners, winner;
winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];
return print(winner, runners);
@@ -186,7 +187,7 @@ race = function"I knew it!");
}
-cubes = (function() {
+cubes = (function() {
var i, len, results;
results = [];
for (i = 0, len = list.length; i < len; i++) {
@@ -320,6 +321,13 @@ sudo bin/cake install
sourceMappingURL
directives to the JavaScript as well.
+
+ -M, --inline-map
+
+ Just like --map
, but include the source map directly in
+ the compiled JavaScript files, rather than in a separate file.
+
+
-i, --interactive
@@ -338,8 +346,7 @@ sudo bin/cake install
-j, --join [FILE]
Before compiling, concatenate all scripts together in the order they
- were passed, and write them into the specified file.
- Useful for building large projects.
+ were passed, and write them into the specified file. (Deprecated.)
@@ -379,6 +386,13 @@ sudo bin/cake install
command line. For example:
coffee -e "console.log num for num in [10..1]"
+
+ -r, --require [MODULE]
+
+ require()
the given module before starting the REPL or
+ evaluating the code given with the --eval
flag.
+
+
-b, --bare
@@ -390,7 +404,7 @@ sudo bin/cake install
-t, --tokens
Instead of parsing the CoffeeScript, just lex it, and print out the
- token stream: [IDENTIFIER square] [ASSIGN =] [PARAM_START (]
...
+ token stream: [IDENTIFIER square] [= =] [PARAM_START (]
...
@@ -399,13 +413,15 @@ sudo bin/cake install
Instead of compiling the CoffeeScript, just lex and parse it, and print
out the parse tree:
-Expressions
+Block
Assign
- Value "square"
- Code "x"
- Op *
- Value "x"
- Value "x"
+ Value IdentifierLiteral: square
+ Code
+ Param IdentifierLiteral: x
+ Block
+ Op *
+ Value IdentifierLiteral: x
+ Value IdentifierLiteral: x
@@ -417,6 +433,12 @@ Expressions
To pass multiple flags, use --nodejs
multiple times.
+
+ --no-header
+
+ Suppress the "Generated by CoffeeScript" header.
+
+
@@ -531,11 +553,11 @@ Expressions
cube = (x) -> square(x) * x
var cube, square;
-square = function(x) {
+square = function(x) {
return x * x;
};
-cube = function(x) {
+cube = function(x) {
return square(x) * x;
};