diff --git a/Makefile b/Makefile index 476861d1..966c8356 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ TEST = $(wildcard test/*.coffee | sort) ROOT = $(shell pwd) COFFEE = bin/coffee --js --bare -PEGJS = node_modules/.bin/pegjs --cache --plugin pegjs-coffee-plugin +PEGJS = node_modules/.bin/pegjs --cache --plugin ./lib/pegjs-coffee-plugin MOCHA = node_modules/.bin/mocha --compilers coffee:./register -u tdd CJSIFY = node_modules/.bin/cjsify --export CoffeeScript MINIFIER = node_modules/.bin/esmangle @@ -30,9 +30,9 @@ lib/bootstrap: lib mkdir -p lib/bootstrap -lib/parser.js: src/grammar.pegcoffee bootstraps lib +lib/parser.js: src/grammar.pegcoffee bootstraps lib lib/pegjs-coffee-plugin.js $(PEGJS) <"$<" >"$@.tmp" && mv "$@.tmp" "$@" -lib/bootstrap/parser.js: src/grammar.pegcoffee lib/bootstrap +lib/bootstrap/parser.js: src/grammar.pegcoffee lib/bootstrap lib/pegjs-coffee-plugin.js $(PEGJS) <"$<" >"$@" lib/bootstrap/%.js: src/%.coffee lib/bootstrap $(COFFEE) -i "$<" >"$@" diff --git a/lib/parser.js b/lib/parser.js index e086489a..aff39df5 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -34,111 +34,197 @@ module.exports = (function() { peg$c0 = peg$FAILED, peg$c1 = null, - peg$c2 = function(leader, b) {return (function() { - return this.rp(new this.CS.Program(b)); - }).apply(__initializer); - }, + peg$c2 = function(leader, b) {return rp(new CS.Program(b)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c3 = [], - peg$c4 = function(s) {return (function() { - return s; - }).apply(__initializer); - }, - peg$c5 = function(s, ss) {var __slice = [].slice; - - return (function() { - return this.rp(new this.CS.Block([s].concat(__slice.call(ss)))); - }).apply(__initializer); - }, + peg$c4 = function(s) {return s; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c5 = function(s, ss) {return rp(new CS.Block([s].concat([].slice.call(ss)))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c6 = void 0, peg$c7 = ";", peg$c8 = { type: "literal", value: ";", description: "\";\"" }, - peg$c9 = function(e) {return (function() { - return e; - }).apply(__initializer); - }, - peg$c10 = function(left, right) {return (function() { - if (!right) { - return left; - } - return this.rp(new this.CS.SeqOp(left, right)); - }).apply(__initializer); - }, - peg$c11 = function(expr, postfixes) {return (function() { - var _this = this; - return this.foldl(function(expr, postfixContainer) { - var indicator, postfix; - postfix = postfixContainer[1]; - indicator = postfix.type; - switch (indicator) { - case 'if': - return _this.rp(new _this.CS.Conditional(postfix.cond, expr, null)); - case 'unless': - return _this.rp(new _this.CS.NegatedConditional(new _this.CS.LogicalNotOp(postfix.cond).g(), expr, null)); - case 'while': - return _this.rp(new _this.CS.While(postfix.cond, expr)); - case 'until': - return _this.rp(new _this.CS.NegatedWhile(new _this.CS.LogicalNotOp(postfix.cond).g(), expr)); - case 'for-in': - return _this.rp(new _this.CS.ForIn(postfix.val, postfix.key, postfix.list, postfix.step, postfix.filter, expr)); - case 'for-of': - return _this.rp(new _this.CS.ForOf(postfix.own, postfix.key, postfix.val, postfix.obj, postfix.filter, expr)); - } - }, expr, postfixes); - }).apply(__initializer); - }, - peg$c12 = function(kw, e) {return (function() { - return { - type: kw, - cond: e - }; - }).apply(__initializer); - }, + peg$c9 = function(e) {return e; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c10 = function(left, right) {if (!right) + return left; + return rp(new CS.SeqOp(left, right)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c11 = function(expr, postfixes) {return foldl(function (expr, postfixContainer) { + var indicator, postfix; + postfix = postfixContainer[1]; + indicator = postfix.type; + switch (indicator) { + case 'if': + return rp(new CS.Conditional(postfix.cond, expr, null)); + case 'unless': + return rp(new CS.NegatedConditional(new CS.LogicalNotOp(postfix.cond).g(), expr, null)); + case 'while': + return rp(new CS.While(postfix.cond, expr)); + case 'until': + return rp(new CS.NegatedWhile(new CS.LogicalNotOp(postfix.cond).g(), expr)); + case 'for-in': + return rp(new CS.ForIn(postfix.val, postfix.key, postfix.list, postfix.step, postfix.filter, expr)); + case 'for-of': + return rp(new CS.ForOf(postfix.own, postfix.key, postfix.val, postfix.obj, postfix.filter, expr)); + } + }, expr, postfixes); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c12 = function(kw, e) {return { + type: kw, + cond: e + }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c13 = ",", peg$c14 = { type: "literal", value: ",", description: "\",\"" }, - peg$c15 = function(a) {return (function() { - return a; - }).apply(__initializer); - }, - peg$c16 = function(val, key) {return (function() { - return [val, key]; - }).apply(__initializer); - }, - peg$c17 = function(valKey, list, step, filter) {return (function() { - var key, val, _ref; - _ref = typeof valKey !== "undefined" && valKey !== null ? valKey : [null, null], val = _ref[0], key = _ref[1]; - return { - type: 'for-in', - val: val, - key: key, - list: list, - step: typeof step !== "undefined" && step !== null ? step : new this.CS.Int(1).r('1').g(), - filter: filter - }; - }).apply(__initializer); - }, - peg$c18 = function(own, key, val, obj, filter) {return (function() { - return { - type: 'for-of', - own: Boolean(own), - key: key, - val: val, - obj: obj, - filter: filter - }; - }).apply(__initializer); - }, + peg$c15 = function(a) {return a; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c16 = function(val, key) {return [ + val, + key + ]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c17 = function(valKey, list, step, filter) {var cache$, key, val; + cache$ = null != valKey ? valKey : [ + null, + null + ]; + val = cache$[0]; + key = cache$[1]; + if (null != step) + step; + else + step = new CS.Int(1).r('1').g(); + return { + type: 'for-in', + val: val, + key: key, + list: list, + step: step, + filter: filter + }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c18 = function(own, key, val, obj, filter) {return { + type: 'for-of', + own: Boolean(own), + key: key, + val: val, + obj: obj, + filter: filter + }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c19 = "=", peg$c20 = { type: "literal", value: "=", description: "\"=\"" }, - peg$c21 = function(left, right) {return (function() { - return this.rp(new this.CS.AssignOp(left, right)); - }).apply(__initializer); - }, + peg$c21 = function(left, right) {return rp(new CS.AssignOp(left, right)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c22 = "?", peg$c23 = { type: "literal", value: "?", description: "\"?\"" }, - peg$c24 = function(left, op, right) {return (function() { - return this.rp(new this.CS.CompoundAssignOp(this.constructorLookup[op].prototype.className, left, right)); - }).apply(__initializer); - }, + peg$c24 = function(left, op, right) {return rp(new CS.CompoundAssignOp(constructorLookup[op].prototype.className, left, right)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c25 = "&&", peg$c26 = { type: "literal", value: "&&", description: "\"&&\"" }, peg$c27 = "||", @@ -159,27 +245,50 @@ module.exports = (function() { peg$c42 = { type: "literal", value: ">>", description: "\">>\"" }, peg$c43 = "?=", peg$c44 = { type: "literal", value: "?=", description: "\"?=\"" }, - peg$c45 = function(left, right) {return (function() { - return this.rp(new this.CS.CompoundAssignOp(this.constructorLookup['?'].prototype.className, left, right)); - }).apply(__initializer); - }, - peg$c46 = function(o, e) {return (function() { - return [o, e]; - }).apply(__initializer); - }, - peg$c47 = function(left, rights) {return (function() { - var expr, op, _ref, _ref1; - switch (rights.length) { - case 0: - return left; - case 1: - _ref = rights[0], op = _ref[0], expr = _ref[1]; - return this.rp(new this.constructorLookup[op](left, expr)); - default: - return this.rp(this.foldBinaryExpr((_ref1 = [left]).concat.apply(_ref1, rights))); - } - }).apply(__initializer); - }, + peg$c45 = function(left, right) {return rp(new CS.CompoundAssignOp(constructorLookup['?'].prototype.className, left, right)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c46 = function(o, e) {return [ + o, + e + ]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c47 = function(left, rights) {var cache$, cache$1, expr, op; + switch (rights.length) { + case 0: + return left; + case 1: + cache$ = rights[0]; + op = cache$[0]; + expr = cache$[1]; + return rp(new constructorLookup[op](left, expr)); + default: + return rp(foldBinaryExpr((cache$1 = [left]).concat.apply(cache$1, [].slice.call(rights)))); + } + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c48 = "<=", peg$c49 = { type: "literal", value: "<=", description: "\"<=\"" }, peg$c50 = ">=", @@ -192,25 +301,48 @@ module.exports = (function() { peg$c57 = { type: "literal", value: "==", description: "\"==\"" }, peg$c58 = "!=", peg$c59 = { type: "literal", value: "!=", description: "\"!=\"" }, - peg$c60 = function(op) {return (function() { - return "not " + op; - }).apply(__initializer); - }, - peg$c61 = function(e) {return (function() { - return this.rp(new this.CS.DoOp(e)); - }).apply(__initializer); - }, - peg$c62 = function(o) {return (function() { - return o; - }).apply(__initializer); - }, - peg$c63 = function(ops, e) {return (function() { - var _this = this; - return this.rp(this.foldr(function(e, op) { - return new _this.prefixConstructorLookup[op](e); - }, e, ops)); - }).apply(__initializer); - }, + peg$c60 = function(op) {return 'not ' + op; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c61 = function(e) {return rp(new CS.DoOp(e)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c62 = function(o) {return o; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c63 = function(ops, e) {return rp(foldr(function (e, op) { + return new prefixConstructorLookup[op](e); + }, e, ops)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c64 = "++", peg$c65 = { type: "literal", value: "++", description: "\"++\"" }, peg$c66 = "--", @@ -219,520 +351,988 @@ module.exports = (function() { peg$c69 = { type: "literal", value: "!", description: "\"!\"" }, peg$c70 = "~", peg$c71 = { type: "literal", value: "~", description: "\"~\"" }, - peg$c72 = function(a, f) {return (function() { - return this.rp(new this.CS.AssignOp(a, f)); - }).apply(__initializer); - }, - peg$c73 = function(e, ops) {return (function() { - var _this = this; - return this.rp(this.foldl(function(e, op) { - return new _this.postfixConstructorLookup[op](e); - }, e, ops)); - }).apply(__initializer); - }, + peg$c72 = function(a, f) {return rp(new CS.AssignOp(a, f)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c73 = function(e, ops) {return rp(foldl(function (e, op) { + return new postfixConstructorLookup[op](e); + }, e, ops)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c74 = "[..]", peg$c75 = { type: "literal", value: "[..]", description: "\"[..]\"" }, peg$c76 = "(", peg$c77 = { type: "literal", value: "(", description: "\"(\"" }, peg$c78 = ")", peg$c79 = { type: "literal", value: ")", description: "\")\"" }, - peg$c80 = function(soaked, a) {return (function() { - return this.rp({ - op: soaked ? this.CS.SoakedFunctionApplication : this.CS.FunctionApplication, - operands: [typeof a !== "undefined" && a !== null ? a : []] - }); - }).apply(__initializer); - }, - peg$c81 = function(e, es) {var __slice = [].slice; - - return (function() { - return [e].concat(__slice.call(es)); - }).apply(__initializer); - }, + peg$c80 = function(soaked, a) {return rp({ + op: soaked ? CS.SoakedFunctionApplication : CS.FunctionApplication, + operands: [null != a ? a : []] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c81 = function(e, es) {return [e].concat([].slice.call(es)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c82 = /^[+-\/]/, peg$c83 = { type: "class", value: "[+-\\/]", description: "[+-\\/]" }, - peg$c84 = function(e, es, obj) {return (function() { - es.unshift(e); - if (typeof obj !== "undefined" && obj !== null) { - es.push(obj); - } - return es; - }).apply(__initializer); - }, - peg$c85 = function(o) {return (function() { - return [o]; - }).apply(__initializer); - }, - peg$c86 = function(e, accesses, secondaryArgs) {return (function() { - var fn, list, secondaryCtor, soaked; - fn = typeof accesses !== "undefined" && accesses !== null ? this.createMemberExpression(e, accesses) : e; - if (typeof secondaryArgs !== "undefined" && secondaryArgs !== null) { - soaked = secondaryArgs[0], list = secondaryArgs[1]; - secondaryCtor = soaked ? this.CS.SoakedFunctionApplication : this.CS.FunctionApplication; - fn = this.rp(new secondaryCtor(fn, list)); - } - return fn; - }).apply(__initializer); - }, - peg$c87 = function(as) {return (function() { - return as; - }).apply(__initializer); - }, - peg$c88 = function(as, bs) {var __slice = [].slice; - - return (function() { - return __slice.call(as).concat(__slice.call(typeof bs !== "undefined" && bs !== null ? bs : [])); - }).apply(__initializer); - }, - peg$c89 = function(e) {return (function() { - return this.rp(new this.CS.NewOp(e, [])); - }).apply(__initializer); - }, - peg$c90 = function(e, args) {return (function() { - return this.rp(new this.CS.NewOp(e, args.operands[0])); - }).apply(__initializer); - }, - peg$c91 = function(e, accesses) {return (function() { - return this.createMemberExpression(e, accesses); - }).apply(__initializer); - }, - peg$c92 = function(e, args) {return (function() { - return this.rp(new this.CS.NewOp(e, args)); - }).apply(__initializer); - }, - peg$c93 = function(e, accesses) {return (function() { - var acc; - acc = this.foldl((function(memo, a) { - return memo.concat(a); - }), [], accesses); - return this.createMemberExpression(e, acc); - }).apply(__initializer); - }, + peg$c84 = function(e, es, obj) {es.unshift(e); + if (null != obj) + es.push(obj); + return es; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c85 = function(o) {return [o]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c86 = function(fn, accesses, secondaryArgs) {var cache$, list, secondaryCtor, soaked; + if (null != accesses) + fn = createMemberExpression(fn, accesses); + if (null != secondaryArgs) { + cache$ = secondaryArgs; + soaked = cache$[0]; + list = cache$[1]; + secondaryCtor = soaked ? CS.SoakedFunctionApplication : CS.FunctionApplication; + fn = rp(new secondaryCtor(fn, list)); + } + return fn; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c87 = function(as) {return as; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c88 = function(as, bs) {return [].slice.call(as).concat([].slice.call(null != bs ? bs : [])); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c89 = function(e) {return rp(new CS.NewOp(e, [])); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c90 = function(e, args) {return rp(new CS.NewOp(e, args.operands[0])); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c91 = function(e, accesses) {return createMemberExpression(e, accesses); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c92 = function(e, args) {return rp(new CS.NewOp(e, args)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c93 = function(e, accesses) {var acc; + acc = foldl(function (memo, a) { + return memo.concat(a); + }, [], accesses); + return createMemberExpression(e, acc); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c94 = ".", peg$c95 = { type: "literal", value: ".", description: "\".\"" }, - peg$c96 = function(e) {return (function() { - return this.rp({ - op: this.CS.MemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c96 = function(e) {return rp({ + op: CS.MemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c97 = "?.", peg$c98 = { type: "literal", value: "?.", description: "\"?.\"" }, - peg$c99 = function(e) {return (function() { - return this.rp({ - op: this.CS.SoakedMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c99 = function(e) {return rp({ + op: CS.SoakedMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c100 = "[", peg$c101 = { type: "literal", value: "[", description: "\"[\"" }, peg$c102 = "]", peg$c103 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c104 = function(e) {return (function() { - return this.rp({ - op: this.CS.DynamicMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c104 = function(e) {return rp({ + op: CS.DynamicMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c105 = "?[", peg$c106 = { type: "literal", value: "?[", description: "\"?[\"" }, - peg$c107 = function(e) {return (function() { - return this.rp({ - op: this.CS.SoakedDynamicMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c107 = function(e) {return rp({ + op: CS.SoakedDynamicMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c108 = "::", peg$c109 = { type: "literal", value: "::", description: "\"::\"" }, - peg$c110 = function(e) {return (function() { - return this.rp({ - op: this.CS.ProtoMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c110 = function(e) {return rp({ + op: CS.ProtoMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c111 = "::[", peg$c112 = { type: "literal", value: "::[", description: "\"::[\"" }, - peg$c113 = function(e) {return (function() { - return this.rp({ - op: this.CS.DynamicProtoMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c113 = function(e) {return rp({ + op: CS.DynamicProtoMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c114 = "?::", peg$c115 = { type: "literal", value: "?::", description: "\"?::\"" }, - peg$c116 = function(e) {return (function() { - return this.rp({ - op: this.CS.SoakedProtoMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c116 = function(e) {return rp({ + op: CS.SoakedProtoMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c117 = "?::[", peg$c118 = { type: "literal", value: "?::[", description: "\"?::[\"" }, - peg$c119 = function(e) {return (function() { - return this.rp({ - op: this.CS.SoakedDynamicProtoMemberAccessOp, - operands: [e] - }); - }).apply(__initializer); - }, + peg$c119 = function(e) {return rp({ + op: CS.SoakedDynamicProtoMemberAccessOp, + operands: [e] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c120 = "..", peg$c121 = { type: "literal", value: "..", description: "\"..\"" }, - peg$c122 = function(left, exclusive, right) {return (function() { - return this.rp({ - op: this.CS.Slice, - operands: [!exclusive, left, right] - }); - }).apply(__initializer); - }, + peg$c122 = function(left, exclusive, right) {return rp({ + op: CS.Slice, + operands: [ + !exclusive, + left, + right + ] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c123 = "@", peg$c124 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c125 = function() {return (function() { - return this.rp(new this.CS.This); - }).apply(__initializer); - }, - peg$c126 = function(e) {return (function() { - return this.r(e.clone()); - }).apply(__initializer); - }, - peg$c127 = function(a, m) {return (function() { - return this.rp(new this.CS.MemberAccessOp(a, m)); - }).apply(__initializer); - }, + peg$c125 = function() {return rp(new CS.This); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c126 = function(e) {return r(e.clone()); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c127 = function(a, m) {return rp(new CS.MemberAccessOp(a, m)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c128 = "`", peg$c129 = { type: "literal", value: "`", description: "\"`\"" }, peg$c130 = /^[^`]/, peg$c131 = { type: "class", value: "[^`]", description: "[^`]" }, - peg$c132 = function(d) {return (function() { - return this.rp(new this.CS.JavaScript(d)); - }).apply(__initializer); - }, + peg$c132 = function(d) {return rp(new CS.JavaScript(d)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c133 = "...", peg$c134 = { type: "literal", value: "...", description: "\"...\"" }, - peg$c135 = function(e) {return (function() { - return this.rp(new this.CS.Spread(e)); - }).apply(__initializer); - }, - peg$c136 = function(kw, cond, body, elseClause) {return (function() { - switch (kw) { - case 'if': - return this.rp(new this.CS.Conditional(cond, body.block, elseClause)); - case 'unless': - return this.rp(new this.CS.NegatedConditional((new this.CS.LogicalNotOp(cond)).g(), body.block, elseClause)); - } - }).apply(__initializer); - }, - peg$c137 = function(b) {return (function() { - return { - block: b - }; - }).apply(__initializer); - }, - peg$c138 = function(s) {return (function() { - return { - block: s - }; - }).apply(__initializer); - }, - peg$c139 = function() {return (function() { - return { - block: null - }; - }).apply(__initializer); - }, - peg$c140 = function(b) {return (function() { - return b; - }).apply(__initializer); - }, - peg$c141 = function(kw, cond, body) {return (function() { - switch (kw) { - case 'while': - return this.rp(new this.CS.While(cond, body.block)); - case 'until': - return this.rp(new this.CS.NegatedWhile((new this.CS.LogicalNotOp(cond)).g(), body.block)); - } - }).apply(__initializer); - }, - peg$c142 = function(body) {return (function() { - return this.rp(new this.CS.Loop(body.block)); - }).apply(__initializer); - }, - peg$c143 = function(body, c, f) {return (function() { - var _ref, _ref1, _ref2; - return this.rp(new this.CS.Try(body.block, (_ref = typeof c !== "undefined" && c !== null ? c.assignee : void 0) != null ? _ref : null, (_ref1 = typeof c !== "undefined" && c !== null ? c.block : void 0) != null ? _ref1 : null, (_ref2 = typeof f !== "undefined" && f !== null ? f.block : void 0) != null ? _ref2 : null)); - }).apply(__initializer); - }, - peg$c144 = function(e, body) {return (function() { - return this.r({ - block: (typeof body !== "undefined" && body !== null ? body.block : new this.CS.Block([])), - assignee: e - }); - }).apply(__initializer); - }, - peg$c145 = function(body) {return (function() { - var _ref; - return this.r({ - block: (_ref = typeof body !== "undefined" && body !== null ? body.block : void 0) != null ? _ref : null - }); - }).apply(__initializer); - }, - peg$c146 = function(name, parent, body) {return (function() { - var boundMembers, ctor, m, stmts, _i, _len, _ref; - ctor = null; - boundMembers = []; - stmts = typeof body !== "undefined" && body !== null ? (_ref = body.statements) != null ? _ref : [body] : []; - for (_i = 0, _len = stmts.length; _i < _len; _i++) { - m = stmts[_i]; - if (m["instanceof"](this.CS.Constructor)) { - ctor = m; - } else if ((m["instanceof"](this.CS.ClassProtoAssignOp)) && (m.expression["instanceof"](this.CS.BoundFunction))) { - boundMembers.push(m); - } - } - return this.rp(new this.CS.Class(name, parent, ctor, body, boundMembers)); - }).apply(__initializer); - }, - peg$c147 = function(key) {return (function() { - return (key["instanceof"](this.CS.String, this.CS.Identifier)) && key.data === 'constructor'; - }).apply(__initializer); - }, + peg$c135 = function(e) {return rp(new CS.Spread(e)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c136 = function(kw, cond, body, elseClause) {switch (kw) { + case 'if': + return rp(new CS.Conditional(cond, body.block, elseClause)); + case 'unless': + return rp(new CS.NegatedConditional(new CS.LogicalNotOp(cond).g(), body.block, elseClause)); + } + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c137 = function(b) {return { block: b }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c138 = function(s) {return { block: s }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c139 = function() {return { block: null }; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c140 = function(b) {return b; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c141 = function(kw, cond, body) {switch (kw) { + case 'while': + return rp(new CS.While(cond, body.block)); + case 'until': + return rp(new CS.NegatedWhile(new CS.LogicalNotOp(cond).g(), body.block)); + } + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c142 = function(body) {return rp(new CS.Loop(body.block)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c143 = function(body, c, f) {return rp(new CS.Try(body.block, null != (null != c ? c.assignee : void 0) ? null != c ? c.assignee : void 0 : null, null != (null != c ? c.block : void 0) ? null != c ? c.block : void 0 : null, null != (null != f ? f.block : void 0) ? null != f ? f.block : void 0 : null)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c144 = function(e, body) {return r({ + block: null != body ? body.block : new CS.Block([]), + assignee: e + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c145 = function(body) {return r({ block: null != (null != body ? body.block : void 0) ? null != body ? body.block : void 0 : null }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c146 = function(name, parent, body) {var boundMembers, ctor, m, stmts; + ctor = null; + boundMembers = []; + stmts = null != body ? null != body.statements ? body.statements : [body] : []; + for (var i$ = 0, length$ = stmts.length; i$ < length$; ++i$) { + m = stmts[i$]; + if (m['instanceof'](CS.Constructor)) { + ctor = m; + } else if (m['instanceof'](CS.ClassProtoAssignOp) && m.expression['instanceof'](CS.BoundFunction)) { + boundMembers.push(m); + } + } + return rp(new CS.Class(name, parent, ctor, body, boundMembers)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c147 = function(key) {return key['instanceof'](CS.String, CS.Identifier) && key.data === 'constructor'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c148 = ":", peg$c149 = { type: "literal", value: ":", description: "\":\"" }, - peg$c150 = function(key, e) {return (function() { - var fn; - fn = e["instanceof"](this.CS.BoundFunction) ? this.c(new this.CS.Function(e.parameters, e.body).r(e.raw), e) : e; - return this.rp(new this.CS.Constructor(fn)); - }).apply(__initializer); - }, - peg$c151 = function(e) {return (function() { - return this.r({ - expr: e - }); - }).apply(__initializer); - }, - peg$c152 = function(key, e) {return (function() { - return this.rp(new this.CS.AssignOp(key, e.expr)); - }).apply(__initializer); - }, - peg$c153 = function(key, e) {return (function() { - return this.rp(new this.CS.ClassProtoAssignOp(key, e.expr)); - }).apply(__initializer); - }, - peg$c154 = function(own, key, val, obj, filter, body) {return (function() { - return this.rp(new this.CS.ForOf(Boolean(own), key, val, obj, filter, body.block)); - }).apply(__initializer); - }, - peg$c155 = function(valKey, list, step, filter, body) {return (function() { - var key, val, _ref; - _ref = typeof valKey !== "undefined" && valKey !== null ? valKey : [null, null], val = _ref[0], key = _ref[1]; - return this.rp(new this.CS.ForIn(val, key, list, typeof step !== "undefined" && step !== null ? step : new this.CS.Int(1).r('1').g(), filter, body.block)); - }).apply(__initializer); - }, - peg$c156 = function(e, body) {return (function() { - var _ref; - return this.rp(new this.CS.Switch(e, body.cases, (_ref = body["else"]) != null ? _ref : null)); - }).apply(__initializer); - }, - peg$c157 = function(b) {return (function() { - return this.r({ - cases: b.cases, - "else": b["else"] - }); - }).apply(__initializer); - }, - peg$c158 = function(c) {return (function() { - return this.r({ - cases: [c] - }); - }).apply(__initializer); - }, - peg$c159 = function() {return (function() { - return this.r({ - cases: [] - }); - }).apply(__initializer); - }, - peg$c160 = function(c) {return (function() { - return c; - }).apply(__initializer); - }, - peg$c161 = function(c, cs, elseClause) {var __slice = [].slice; - - return (function() { - return this.r({ - cases: [c].concat(__slice.call(cs)), - "else": elseClause - }); - }).apply(__initializer); - }, - peg$c162 = function(conditions, body) {return (function() { - return this.rp(new this.CS.SwitchCase(conditions, body.block)); - }).apply(__initializer); - }, - peg$c163 = function(c, cs) {var __slice = [].slice; - - return (function() { - return [c].concat(__slice.call(cs)); - }).apply(__initializer); - }, - peg$c164 = function(p) {return (function() { - return p; - }).apply(__initializer); - }, + peg$c150 = function(key, e) {var fn; + fn = e['instanceof'](CS.BoundFunction) ? c(new CS.Function(e.parameters, e.body).r(e.raw), e) : e; + return rp(new CS.Constructor(fn)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c151 = function(e) {return r({ expr: e }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c152 = function(key, e) {return rp(new CS.AssignOp(key, e.expr)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c153 = function(key, e) {return rp(new CS.ClassProtoAssignOp(key, e.expr)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c154 = function(own, key, val, obj, filter, body) {return rp(new CS.ForOf(Boolean(own), key, val, obj, filter, body.block)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c155 = function(valKey, list, step, filter, body) {var cache$, key, val; + cache$ = null != valKey ? valKey : [ + null, + null + ]; + val = cache$[0]; + key = cache$[1]; + if (null != step) + step; + else + step = new CS.Int(1).r('1').g(); + return rp(new CS.ForIn(val, key, list, step, filter, body.block)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c156 = function(e, body) {return rp(new CS.Switch(e, body.cases, null != body['else'] ? body['else'] : null)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c157 = function(b) {return r({ + cases: b.cases, + 'else': b['else'] + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c158 = function(c) {return r({ cases: [c] }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c159 = function() {return r({ cases: [] }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c160 = function(c) {return c; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c161 = function(c, cs, elseClause) {return r({ + cases: [c].concat([].slice.call(cs)), + 'else': elseClause + }); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c162 = function(conditions, body) {return rp(new CS.SwitchCase(conditions, body.block)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c163 = function(c, cs) {return [c].concat([].slice.call(cs)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c164 = function(p) {return p; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c165 = "->", peg$c166 = { type: "literal", value: "->", description: "\"->\"" }, peg$c167 = "=>", peg$c168 = { type: "literal", value: "=>", description: "\"=>\"" }, - peg$c169 = function(params, arrow, body) {return (function() { - var constructor; - constructor = (function() { - switch (arrow) { - case '->': - return this.CS.Function; - case '=>': - return this.CS.BoundFunction; - } - }).call(this); - return this.rp(new constructor(typeof params !== "undefined" && params !== null ? params : [], body)); - }).apply(__initializer); - }, - peg$c170 = function(param, default_) {return (function() { - return this.rp(new this.CS.DefaultParam(param, default_)); - }).apply(__initializer); - }, - peg$c171 = function(a, rest) {return (function() { - return this.rp(typeof rest !== "undefined" && rest !== null ? new this.CS.Rest(a) : a); - }).apply(__initializer); - }, - peg$c172 = function(left, exclusiveDot, right) {return (function() { - var inclusive; - inclusive = !exclusiveDot; - return this.rp(new this.CS.Range(inclusive, left, right)); - }).apply(__initializer); - }, - peg$c173 = function(members) {return (function() { - return this.rp(new this.CS.ArrayInitialiser(members)); - }).apply(__initializer); - }, - peg$c174 = function(members) {return (function() { - return members; - }).apply(__initializer); - }, - peg$c175 = function(members) {return (function() { - return typeof members !== "undefined" && members !== null ? members : []; - }).apply(__initializer); - }, + peg$c169 = function(params, arrow, body) {var constructor; + constructor = function () { + switch (arrow) { + case '->': + return CS.Function; + case '=>': + return CS.BoundFunction; + } + }.call(this); + return rp(new constructor(null != params ? params : [], body)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c170 = function(param, default_) {return rp(new CS.DefaultParam(param, default_)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c171 = function(a, rest) {return rp(null != rest ? new CS.Rest(a) : a); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c172 = function(left, exclusiveDot, right) {var inclusive; + inclusive = !exclusiveDot; + return rp(new CS.Range(inclusive, left, right)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c173 = function(members) {return rp(new CS.ArrayInitialiser(members)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c174 = function(members) {return members; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c175 = function(members) {return null != members ? members : []; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c176 = "{", peg$c177 = { type: "literal", value: "{", description: "\"{\"" }, peg$c178 = "}", peg$c179 = { type: "literal", value: "}", description: "\"}\"" }, - peg$c180 = function(members) {return (function() { - return this.rp(new this.CS.ObjectInitialiser(members)); - }).apply(__initializer); - }, - peg$c181 = function(v) {return (function() { - var key; - key = this.p(new this.CS.String(v.memberName).g()); - return this.rp(new this.CS.ObjectInitialiserMember(key, v)); - }).apply(__initializer); - }, - peg$c182 = function(v) {return (function() { - return this.rp(new this.CS.ObjectInitialiserMember(v, v)); - }).apply(__initializer); - }, - peg$c183 = function(i) {return (function() { - return this.rp(new this.CS.Identifier(i)); - }).apply(__initializer); - }, - peg$c184 = function(key, val) {return (function() { - return this.rp(new this.CS.ObjectInitialiserMember(key, val)); - }).apply(__initializer); - }, + peg$c180 = function(members) {return rp(new CS.ObjectInitialiser(members)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c181 = function(v) {var key; + key = p(new CS.String(v.memberName).g()); + return rp(new CS.ObjectInitialiserMember(key, v)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c182 = function(v) {return rp(new CS.ObjectInitialiserMember(v, v)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c183 = function(i) {return rp(new CS.Identifier(i)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c184 = function(key, val) {return rp(new CS.ObjectInitialiserMember(key, val)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c185 = "__LINE__", peg$c186 = { type: "literal", value: "__LINE__", description: "\"__LINE__\"" }, - peg$c187 = function() {return (function() { - return this.rp(new this.CS.Int(line())); - }).apply(__initializer); - }, + peg$c187 = function() {return rp(new CS.Int(line())); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c188 = "__FILENAME__", peg$c189 = { type: "literal", value: "__FILENAME__", description: "\"__FILENAME__\"" }, - peg$c190 = function() {return (function() { - var _ref; - return this.rp(new this.CS.String((_ref = options.inputSource) != null ? _ref : "")); - }).apply(__initializer); - }, + peg$c190 = function() {return rp(new CS.String(null != options.inputSource ? options.inputSource : '')); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c191 = "__DATE__", peg$c192 = { type: "literal", value: "__DATE__", description: "\"__DATE__\"" }, - peg$c193 = function() {return (function() { - return this.rp(new this.CS.String((new Date).toDateString().slice(4))); - }).apply(__initializer); - }, + peg$c193 = function() {return rp(new CS.String(new Date().toDateString().slice(4))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c194 = "__TIME__", peg$c195 = { type: "literal", value: "__TIME__", description: "\"__TIME__\"" }, - peg$c196 = function() {return (function() { - return this.rp(new this.CS.String((new Date).toTimeString().slice(0, 8))); - }).apply(__initializer); - }, + peg$c196 = function() {return rp(new CS.String(new Date().toTimeString().slice(0, 8))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c197 = "__DATETIMEMS__", peg$c198 = { type: "literal", value: "__DATETIMEMS__", description: "\"__DATETIMEMS__\"" }, - peg$c199 = function() {return (function() { - return this.rp(new this.CS.Int(+(new Date))); - }).apply(__initializer); - }, + peg$c199 = function() {return rp(new CS.Int(+new Date)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c200 = "__COFFEE_VERSION__", peg$c201 = { type: "literal", value: "__COFFEE_VERSION__", description: "\"__COFFEE_VERSION__\"" }, - peg$c202 = function() {return (function() { - return this.rp(new this.CS.String((require('../package.json')).version)); - }).apply(__initializer); - }, - peg$c203 = function() {return (function() { - return this.rp(new this.CS.Bool(true)); - }).apply(__initializer); - }, - peg$c204 = function() {return (function() { - return this.rp(new this.CS.Bool(false)); - }).apply(__initializer); - }, + peg$c202 = function() {return rp(new CS.String(require('../package.json').version)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c203 = function() {return rp(new CS.Bool(true)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c204 = function() {return rp(new CS.Bool(false)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c205 = "0b", peg$c206 = { type: "literal", value: "0b", description: "\"0b\"" }, - peg$c207 = function(bs) {return (function() { - return this.rp(new this.CS.Int(parseInt(bs, 2))); - }).apply(__initializer); - }, + peg$c207 = function(bs) {return rp(new CS.Int(parseInt(bs, 2))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c208 = "0o", peg$c209 = { type: "literal", value: "0o", description: "\"0o\"" }, - peg$c210 = function(os) {return (function() { - return this.rp(new this.CS.Int(parseInt(os, 8))); - }).apply(__initializer); - }, + peg$c210 = function(os) {return rp(new CS.Int(parseInt(os, 8))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c211 = "0x", peg$c212 = { type: "literal", value: "0x", description: "\"0x\"" }, - peg$c213 = function(hs) {return (function() { - return this.rp(new this.CS.Int(parseInt(hs, 16))); - }).apply(__initializer); - }, + peg$c213 = function(hs) {return rp(new CS.Int(parseInt(hs, 16))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c214 = /^[eE]/, peg$c215 = { type: "class", value: "[eE]", description: "[eE]" }, peg$c216 = /^[+\-]/, peg$c217 = { type: "class", value: "[+\\-]", description: "[+\\-]" }, - peg$c218 = function(base, e, sign, exponent) {return (function() { - return this.rp(new this.CS.Float(parseFloat("" + base.data + e + (typeof sign !== "undefined" && sign !== null ? sign : '') + exponent.data))); - }).apply(__initializer); - }, - peg$c219 = function(integral, fractional) {return (function() { - if (fractional) { - return this.rp(new this.CS.Float(parseFloat(integral + fractional))); - } else { - return this.rp(new this.CS.Int(+integral)); - } - }).apply(__initializer); - }, + peg$c218 = function(base, e, sign, exponent) {return rp(new CS.Float(parseFloat('' + base.data + e + (null != sign ? sign : '') + exponent.data))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c219 = function(integral, fractional) {if (fractional) { + return rp(new CS.Float(parseFloat(integral + fractional))); + } else { + return rp(new CS.Int(+integral)); + } + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c220 = "0", peg$c221 = { type: "literal", value: "0", description: "\"0\"" }, peg$c222 = /^[1-9]/, @@ -751,206 +1351,405 @@ module.exports = (function() { peg$c235 = { type: "literal", value: "'", description: "\"'\"" }, peg$c236 = "\"", peg$c237 = { type: "literal", value: "\"", description: "\"\\\"\"" }, - peg$c238 = function(d) {return (function() { - return this.rp(new this.CS.String(this.stripLeadingWhitespace(d.join('')))); - }).apply(__initializer); - }, + peg$c238 = function(d) {return rp(new CS.String(stripLeadingWhitespace(d.join('')))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c239 = "'''", peg$c240 = { type: "literal", value: "'''", description: "\"'''\"" }, peg$c241 = "#", peg$c242 = { type: "literal", value: "#", description: "\"#\"" }, - peg$c243 = function(d) {return (function() { - return this.rp(new this.CS.String(d.join(''))); - }).apply(__initializer); - }, + peg$c243 = function(d) {return rp(new CS.String(d.join(''))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c244 = /^[^"'\\#]/, peg$c245 = { type: "class", value: "[^\"'\\\\#]", description: "[^\"'\\\\#]" }, peg$c246 = "\\x", peg$c247 = { type: "literal", value: "\\x", description: "\"\\\\x\"" }, - peg$c248 = function(h) {return (function() { - return String.fromCharCode(parseInt(h, 16)); - }).apply(__initializer); - }, + peg$c248 = function(h) {return String.fromCharCode(parseInt(h, 16)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c249 = "\\0", peg$c250 = { type: "literal", value: "\\0", description: "\"\\\\0\"" }, - peg$c251 = function() {return (function() { - return '\0'; - }).apply(__initializer); - }, - peg$c252 = function() {return (function() { - throw new SyntaxError(['string data'], 'octal escape sequence', offset(), line(), column()); - }).apply(__initializer); - }, + peg$c251 = function() {return '\0'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c252 = function() {throw new SyntaxError(['string data'], 'octal escape sequence', offset(), line(), column()); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c253 = "\\b", peg$c254 = { type: "literal", value: "\\b", description: "\"\\\\b\"" }, - peg$c255 = function() {return (function() { - return '\b'; - }).apply(__initializer); - }, + peg$c255 = function() {return '\b'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c256 = "\\t", peg$c257 = { type: "literal", value: "\\t", description: "\"\\\\t\"" }, - peg$c258 = function() {return (function() { - return '\t'; - }).apply(__initializer); - }, + peg$c258 = function() {return '\t'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c259 = "\\n", peg$c260 = { type: "literal", value: "\\n", description: "\"\\\\n\"" }, - peg$c261 = function() {return (function() { - return '\n'; - }).apply(__initializer); - }, + peg$c261 = function() {return '\n'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c262 = "\\v", peg$c263 = { type: "literal", value: "\\v", description: "\"\\\\v\"" }, - peg$c264 = function() {return (function() { - return '\v'; - }).apply(__initializer); - }, + peg$c264 = function() {return '\x0B'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c265 = "\\f", peg$c266 = { type: "literal", value: "\\f", description: "\"\\\\f\"" }, - peg$c267 = function() {return (function() { - return '\f'; - }).apply(__initializer); - }, + peg$c267 = function() {return '\f'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c268 = "\\r", peg$c269 = { type: "literal", value: "\\r", description: "\"\\\\r\"" }, - peg$c270 = function() {return (function() { - return '\r'; - }).apply(__initializer); - }, + peg$c270 = function() {return '\r'; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c271 = "\\", peg$c272 = { type: "literal", value: "\\", description: "\"\\\\\"" }, peg$c273 = { type: "any", description: "any character" }, peg$c274 = "#{", peg$c275 = { type: "literal", value: "#{", description: "\"#{\"" }, - peg$c276 = function(es) {return (function() { - return this.rp(this.createInterpolation(this.stripLeadingWhitespaceInterpolation(es))); - }).apply(__initializer); - }, - peg$c277 = function(es) {return (function() { - return this.rp(this.createInterpolation(es)); - }).apply(__initializer); - }, + peg$c276 = function(es) {return rp(createInterpolation(stripLeadingWhitespaceInterpolation(es))); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c277 = function(es) {return rp(createInterpolation(es)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c278 = "///", peg$c279 = { type: "literal", value: "///", description: "\"///\"" }, peg$c280 = /^[ \r\n]/, peg$c281 = { type: "class", value: "[ \\r\\n]", description: "[ \\r\\n]" }, - peg$c282 = function() {return (function() { - return [this.rp(new this.CS.String('').g())]; - }).apply(__initializer); - }, + peg$c282 = function() {return [rp(new CS.String('').g())]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c283 = /^[^\\\/#[ \r\n]/, peg$c284 = { type: "class", value: "[^\\\\\\/#[ \\r\\n]", description: "[^\\\\\\/#[ \\r\\n]" }, - peg$c285 = function(s) {return (function() { - return [this.rp((new this.CS.String(s)).g())]; - }).apply(__initializer); - }, + peg$c285 = function(s) {return [rp(new CS.String(s).g())]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c286 = /^[gimy]/, peg$c287 = { type: "class", value: "[gimy]", description: "[gimy]" }, - peg$c288 = function(es, flags) {return (function() { - var interp; - if (!this.isValidRegExpFlags(flags)) { - throw new SyntaxError(['regular expression flags'], 'regular expression flags', offset(), line(), column()); - } - interp = this.createInterpolation(this.foldl((function(memo, e) { - return memo.concat(e); - }), [], es)); - if (interp instanceof this.CS.String) { - return this.p(new this.CS.RegExp(interp.data, flags)); - } - return this.rp(new this.CS.HeregExp(interp, flags)); - }).apply(__initializer); - }, + peg$c288 = function(es, flags) {var interp; + if (!isValidRegExpFlags(flags)) + throw new SyntaxError(['regular expression flags'], 'regular expression flags', offset(), line(), column()); + interp = createInterpolation(foldl(function (memo, e) { + return memo.concat(e); + }, [], es)); + if (interp instanceof CS.String) + return p(new CS.RegExp(interp.data, flags)); + return rp(new CS.HeregExp(interp, flags)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c289 = "/", peg$c290 = { type: "literal", value: "/", description: "\"/\"" }, peg$c291 = /^[^\/\\[\n]/, peg$c292 = { type: "class", value: "[^\\/\\\\[\\n]", description: "[^\\/\\\\[\\n]" }, - peg$c293 = function(d, flags) {return (function() { - if (!this.isValidRegExpFlags(flags)) { - throw new SyntaxError(['regular expression flags'], 'regular expression flags', offset(), line(), column()); - } - return this.rp(new this.CS.RegExp(d, flags)); - }).apply(__initializer); - }, + peg$c293 = function(d, flags) {if (!isValidRegExpFlags(flags)) + throw new SyntaxError(['regular expression flags'], 'regular expression flags', offset(), line(), column()); + return rp(new CS.RegExp(d, flags)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c294 = /^[^\\\]\n]/, peg$c295 = { type: "class", value: "[^\\\\\\]\\n]", description: "[^\\\\\\]\\n]" }, - peg$c296 = function(h) {return (function() { - return h[0]; - }).apply(__initializer); - }, + peg$c296 = function(h) {return h[0]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c297 = /^[^\\\/\]]/, peg$c298 = { type: "class", value: "[^\\\\\\/\\]]", description: "[^\\\\\\/\\]]" }, - peg$c299 = function(s) {return (function() { - return this.p(new this.CS.String(s)); - }).apply(__initializer); - }, - peg$c300 = function(d) {var __slice = [].slice; - - return (function() { - return [this.p(new this.CS.String("["))].concat(__slice.call(d), [this.p(new this.CS.String("]"))]); - }).apply(__initializer); - }, - peg$c301 = function(d) {return (function() { - return [this.rp(new this.CS.String(d))]; - }).apply(__initializer); - }, - peg$c302 = function(s) {return (function() { - return [this.rp(new this.CS.String(s))]; - }).apply(__initializer); - }, - peg$c303 = function(c) {return (function() { - return [this.rp(new this.CS.String(c))]; - }).apply(__initializer); - }, - peg$c304 = function(e) {return (function() { - return [e]; - }).apply(__initializer); - }, - peg$c305 = function(e) {return (function() { - return this.rp(new this.CS.Throw(e)); - }).apply(__initializer); - }, - peg$c306 = function(e) {return (function() { - return this.rp(new this.CS.Return(e)); - }).apply(__initializer); - }, - peg$c307 = function() {return (function() { - return this.rp(new this.CS.Continue); - }).apply(__initializer); - }, - peg$c308 = function() {return (function() { - return this.rp(new this.CS.Break); - }).apply(__initializer); - }, - peg$c309 = function() {return (function() { - return this.rp(new this.CS.Debugger); - }).apply(__initializer); - }, - peg$c310 = function() {return (function() { - return this.rp(new this.CS.Undefined); - }).apply(__initializer); - }, - peg$c311 = function() {return (function() { - return this.rp(new this.CS.Null); - }).apply(__initializer); - }, + peg$c299 = function(s) {return p(new CS.String(s)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c300 = function(d) {return [p(new CS.String('['))].concat([].slice.call(d), [p(new CS.String(']'))]); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c301 = function(d) {return [rp(new CS.String(d))]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c302 = function(s) {return [rp(new CS.String(s))]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c303 = function(c) {return [rp(new CS.String(c))]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c304 = function(e) {return [e]; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c305 = function(e) {return rp(new CS.Throw(e)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c306 = function(e) {return rp(new CS.Return(e)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c307 = function() {return rp(new CS.Continue); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c308 = function() {return rp(new CS.Break); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c309 = function() {return rp(new CS.Debugger); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c310 = function() {return rp(new CS.Undefined); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c311 = function() {return rp(new CS.Null); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c312 = "arguments", peg$c313 = { type: "literal", value: "arguments", description: "\"arguments\"" }, peg$c314 = "eval", peg$c315 = { type: "literal", value: "eval", description: "\"eval\"" }, - peg$c316 = function(i) {return (function() { - return i; - }).apply(__initializer); - }, - peg$c317 = function(v) {return (function() { - var key; - key = this.rp(new this.CS.String(v.memberName)); - return this.rp(new this.CS.ObjectInitialiserMember(key, v)); - }).apply(__initializer); - }, - peg$c318 = function(i) {return (function() { - return this.rp(new this.CS.ObjectInitialiserMember(i, i)); - }).apply(__initializer); - }, + peg$c316 = function(i) {return i; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c317 = function(v) {var key; + key = rp(new CS.String(v.memberName)); + return rp(new CS.ObjectInitialiserMember(key, v)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, + peg$c318 = function(i) {return rp(new CS.ObjectInitialiserMember(i, i)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c319 = /^[$_]/, peg$c320 = { type: "class", value: "[$_]", description: "[$_]" }, peg$c321 = "###", @@ -965,18 +1764,30 @@ module.exports = (function() { peg$c330 = { type: "literal", value: "\n", description: "\"\\n\"" }, peg$c331 = "\uEFEF", peg$c332 = { type: "literal", value: "\uEFEF", description: "\"\\uEFEF\"" }, - peg$c333 = function(ws) {return (function() { - return ws; - }).apply(__initializer); - }, + peg$c333 = function(ws) {return ws; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c334 = "\uEFFE", peg$c335 = { type: "literal", value: "\uEFFE", description: "\"\\uEFFE\"" }, peg$c336 = "\uEFFF", peg$c337 = { type: "literal", value: "\uEFFF", description: "\"\\uEFFF\"" }, - peg$c338 = function() {return (function() { - return ''; - }).apply(__initializer); - }, + peg$c338 = function() {return ''; + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c339 = "and", peg$c340 = { type: "literal", value: "and", description: "\"and\"" }, peg$c341 = "break", @@ -1107,10 +1918,16 @@ module.exports = (function() { peg$c466 = { type: "literal", value: "yield", description: "\"yield\"" }, peg$c467 = "\\u", peg$c468 = { type: "literal", value: "\\u", description: "\"\\\\u\"" }, - peg$c469 = function(h0, h1, h2, h3) {return (function() { - return String.fromCharCode(parseInt(h0 + h1 + h2 + h3, 16)); - }).apply(__initializer); - }, + peg$c469 = function(h0, h1, h2, h3) {return String.fromCharCode(parseInt(h0 + h1 + h2 + h3, 16)); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; + }}, peg$c470 = /^[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uFF21-\uFF3Aa-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D62-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7C\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2D00-\u2D25\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D61\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA717-\uA71F\uA770\uA788\uA9CF\uAA70\uAADD\uFF70\uFF9E\uFF9F\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BC0-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u2135-\u2138\u2D30-\u2D65\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400\u4DB5\u4E00\u9FCB\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA2D\uFA30-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF]/, peg$c471 = { type: "class", value: "[A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0531-\\u0556\\u10A0-\\u10C5\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uFF21-\\uFF3Aa-z\\xAA\\xB5\\xBA\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0561-\\u0587\\u1D00-\\u1D2B\\u1D62-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7C\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2D00-\\u2D25\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7FA\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D61\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA717-\\uA71F\\uA770\\uA788\\uA9CF\\uAA70\\uAADD\\uFF70\\uFF9E\\uFF9F\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10D0-\\u10FA\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BC0-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u2135-\\u2138\\u2D30-\\u2D65\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FCB\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA2D\\uFA30-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF]", description: "[A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0531-\\u0556\\u10A0-\\u10C5\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uFF21-\\uFF3Aa-z\\xAA\\xB5\\xBA\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0561-\\u0587\\u1D00-\\u1D2B\\u1D62-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7C\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2D00-\\u2D25\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7FA\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D61\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA717-\\uA71F\\uA770\\uA788\\uA9CF\\uAA70\\uAADD\\uFF70\\uFF9E\\uFF9F\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10D0-\\u10FA\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BC0-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u2135-\\u2138\\u2D30-\\u2D65\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FCB\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA2D\\uFA30-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF]" }, peg$c472 = "\uD82C", @@ -18608,346 +19425,367 @@ module.exports = (function() { return s0; } - var __initializer, - __hasProp = {}.hasOwnProperty, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - __initializer = (function() { - var LEFT_ASSOCIATIVE, RIGHT_ASSOCIATIVE, associativities, chainableComparisonOps, id, negatableOps, op, precedenceHierarchy, precedenceTable, rightAssocOps, _fn, _i, _len, - _this = this; - this.CS = require('./nodes'); - this.constructorLookup = { - '||': this.CS.LogicalOrOp, - 'or': this.CS.LogicalOrOp, - '&&': this.CS.LogicalAndOp, - 'and': this.CS.LogicalAndOp, - '|': this.CS.BitOrOp, - '^': this.CS.BitXorOp, - '&': this.CS.BitAndOp, - '?': this.CS.ExistsOp, - '==': this.CS.EQOp, - 'is': this.CS.EQOp, - '!=': this.CS.NEQOp, - 'isnt': this.CS.NEQOp, - '<=': this.CS.LTEOp, - '>=': this.CS.GTEOp, - '<': this.CS.LTOp, - '>': this.CS.GTOp, - 'extends': this.CS.ExtendsOp, - 'instanceof': this.CS.InstanceofOp, - 'in': this.CS.InOp, - 'of': this.CS.OfOp, - '<<': this.CS.LeftShiftOp, - '>>': this.CS.SignedRightShiftOp, - '>>>': this.CS.UnsignedRightShiftOp, - '+': this.CS.PlusOp, - '-': this.CS.SubtractOp, - '*': this.CS.MultiplyOp, - '/': this.CS.DivideOp, - '%': this.CS.RemOp, - '**': this.CS.ExpOp - }; - negatableOps = ['instanceof', 'in', 'of']; - chainableComparisonOps = ['<=', '>=', '<', '>', '==', 'is', '!=', 'isnt']; - rightAssocOps = [';', '=', '?', '**']; - precedenceHierarchy = [['or', '||'], ['and', '&&'], ['|'], ['^'], ['&'], ['?'], ['is', '==', 'isnt', '!='], ['instanceof', 'in', 'of', '<=', '>=', '<', '>'], ['<<', '>>', '>>>'], ['+', '-'], ['*', '/', '%'], ['**']]; - precedenceTable = (function() { - var level, op, ops, table, _i, _j, _len, _len1; - table = {}; - for (level = _i = 0, _len = precedenceHierarchy.length; _i < _len; level = ++_i) { - ops = precedenceHierarchy[level]; - for (_j = 0, _len1 = ops.length; _j < _len1; _j++) { - op = ops[_j]; - table[op] = level; - } - } - return table; - })(); - RIGHT_ASSOCIATIVE = {}; - LEFT_ASSOCIATIVE = {}; - associativities = (function() { - var op, result, rightAssocOp, _i, _len; - result = {}; - for (op in precedenceTable) { - if (!__hasProp.call(precedenceTable, op)) continue; - result[op] = LEFT_ASSOCIATIVE; - } - for (_i = 0, _len = rightAssocOps.length; _i < _len; _i++) { - rightAssocOp = rightAssocOps[_i]; - result[rightAssocOp] = RIGHT_ASSOCIATIVE; - } - return result; - })(); - _fn = function(op) { + // Generated by CoffeeScript 2.0.0-beta9-dev + var associativities, c, chainableComparisonOps, constructorLookup, createInterpolation, createMemberExpression, CS, foldBinaryExpr, foldl, foldr, id, isValidRegExpFlags, LEFT_ASSOCIATIVE, negatableOps, op, p, p, postfixConstructorLookup, precedenceHierarchy, precedenceTable, prefixConstructorLookup, r, r, RIGHT_ASSOCIATIVE, rightAssocOps, rp, rp, stripLeadingWhitespace, stripLeadingWhitespaceInterpolation; + CS = require('./nodes'); + constructorLookup = { + '||': CS.LogicalOrOp, + or: CS.LogicalOrOp, + '&&': CS.LogicalAndOp, + and: CS.LogicalAndOp, + '|': CS.BitOrOp, + '^': CS.BitXorOp, + '&': CS.BitAndOp, + '?': CS.ExistsOp, + '==': CS.EQOp, + is: CS.EQOp, + '!=': CS.NEQOp, + isnt: CS.NEQOp, + '<=': CS.LTEOp, + '>=': CS.GTEOp, + '<': CS.LTOp, + '>': CS.GTOp, + 'extends': CS.ExtendsOp, + 'instanceof': CS.InstanceofOp, + 'in': CS.InOp, + of: CS.OfOp, + '<<': CS.LeftShiftOp, + '>>': CS.SignedRightShiftOp, + '>>>': CS.UnsignedRightShiftOp, + '+': CS.PlusOp, + '-': CS.SubtractOp, + '*': CS.MultiplyOp, + '/': CS.DivideOp, + '%': CS.RemOp, + '**': CS.ExpOp + }; + negatableOps = [ + 'instanceof', + 'in', + 'of' + ]; + chainableComparisonOps = [ + '<=', + '>=', + '<', + '>', + '==', + 'is', + '!=', + 'isnt' + ]; + rightAssocOps = [ + ';', + '=', + '?', + '**' + ]; + precedenceHierarchy = [ + [ + 'or', + '||' + ], + [ + 'and', + '&&' + ], + ['|'], + ['^'], + ['&'], + ['?'], + [ + 'is', + '==', + 'isnt', + '!=' + ], + [ + 'instanceof', + 'in', + 'of', + '<=', + '>=', + '<', + '>' + ], + [ + '<<', + '>>', + '>>>' + ], + [ + '+', + '-' + ], + [ + '*', + '/', + '%' + ], + ['**'] + ]; + precedenceTable = function () { + var level, op, ops, table; + table = {}; + for (var i$ = 0, length$ = precedenceHierarchy.length; i$ < length$; ++i$) { + ops = precedenceHierarchy[i$]; + level = i$; + for (var i$1 = 0, length$1 = ops.length; i$1 < length$1; ++i$1) { + op = ops[i$1]; + table[op] = level; + } + } + return table; + }(); + RIGHT_ASSOCIATIVE = {}; + LEFT_ASSOCIATIVE = {}; + associativities = function () { + var op, result, rightAssocOp; + result = {}; + for (op in precedenceTable) { + if (!isOwn$(precedenceTable, op)) + continue; + result[op] = LEFT_ASSOCIATIVE; + } + for (var i$ = 0, length$ = rightAssocOps.length; i$ < length$; ++i$) { + rightAssocOp = rightAssocOps[i$]; + result[rightAssocOp] = RIGHT_ASSOCIATIVE; + } + return result; + }(); + for (var i$ = 0, length$ = negatableOps.length; i$ < length$; ++i$) { + op = negatableOps[i$]; + (function (op) { var fn, negatedOp; - fn = function(a, b) { - return new _this.CS.LogicalNotOp(new _this.constructorLookup[op](a, b)); + fn = function (a, b) { + return new CS.LogicalNotOp(new constructorLookup[op](a, b)); }; - fn.prototype = _this.constructorLookup[op].prototype; - negatedOp = "not " + op; - _this.constructorLookup[negatedOp] = fn; + fn.prototype = constructorLookup[op].prototype; + negatedOp = 'not ' + op; + constructorLookup[negatedOp] = fn; precedenceTable[negatedOp] = precedenceTable[op]; return associativities[negatedOp] = associativities[op]; - }; - for (_i = 0, _len = negatableOps.length; _i < _len; _i++) { - op = negatableOps[_i]; - _fn(op); - } - this.prefixConstructorLookup = { - '++': this.CS.PreIncrementOp, - '--': this.CS.PreDecrementOp, - '+': this.CS.UnaryPlusOp, - '-': this.CS.UnaryNegateOp, - '!': this.CS.LogicalNotOp, - 'not': this.CS.LogicalNotOp, - '~': this.CS.BitNotOp, - 'do': this.CS.DoOp, - 'typeof': this.CS.TypeofOp, - 'delete': this.CS.DeleteOp - }; - this.postfixConstructorLookup = { - '?': this.CS.UnaryExistsOp, - '[..]': this.CS.ShallowCopyArray, - '++': this.CS.PostIncrementOp, - '--': this.CS.PostDecrementOp - }; - this.foldl = function(fn, memo, list) { - var item, _j, _len1; - for (_j = 0, _len1 = list.length; _j < _len1; _j++) { - item = list[_j]; - memo = fn(memo, item); - } - return memo; - }; - this.foldr = function(fn, memo, list) { - var item, _j; - for (_j = list.length - 1; _j >= 0; _j += -1) { - item = list[_j]; - memo = fn(memo, item); - } - return memo; - }; - this.foldBinaryExpr = function(parts, ignoreChains) { - var chainStack, expr, leftOperand, nextOp, nextPrec, operator, prec, rightOperand, stack; - if (parts.length < 3) { - return parts[0]; - } - stack = [].slice.call(parts, 0, 3); - parts = [].slice.call(parts, 3); - while (parts.length > 0) { - nextOp = parts[0]; - if (!ignoreChains && stack.length > 2) { - operator = stack[stack.length - 2]; - if (__indexOf.call(chainableComparisonOps, operator) >= 0 && __indexOf.call(chainableComparisonOps, nextOp) >= 0) { - chainStack = stack.slice(-3); - stack = stack.slice(0, stack.length - 3); - while (true) { - operator = nextOp; - chainStack.push(parts.shift(), parts.shift()); - nextOp = parts[0]; - if (nextOp) { - nextPrec = precedenceTable[nextOp]; - prec = precedenceTable[operator]; - } - if (!((nextOp != null) && (nextPrec > prec || __indexOf.call(chainableComparisonOps, nextOp) >= 0))) { - break; - } + }(op)); + } + prefixConstructorLookup = { + '++': CS.PreIncrementOp, + '--': CS.PreDecrementOp, + '+': CS.UnaryPlusOp, + '-': CS.UnaryNegateOp, + '!': CS.LogicalNotOp, + not: CS.LogicalNotOp, + '~': CS.BitNotOp, + 'do': CS.DoOp, + 'typeof': CS.TypeofOp, + 'delete': CS.DeleteOp + }; + postfixConstructorLookup = { + '?': CS.UnaryExistsOp, + '[..]': CS.ShallowCopyArray, + '++': CS.PostIncrementOp, + '--': CS.PostDecrementOp + }; + foldl = function (fn, memo, list) { + var item; + for (var i$1 = 0, length$1 = list.length; i$1 < length$1; ++i$1) { + item = list[i$1]; + memo = fn(memo, item); + } + return memo; + }; + foldr = function (fn, memo, list) { + var i, item; + i = list.length; + while (i--) { + item = list[i]; + memo = fn(memo, item); + } + return memo; + }; + foldBinaryExpr = function (parts, ignoreChains) { + var chainStack, expr, leftOperand, nextOp, nextPrec, operator, prec, rightOperand, stack; + if (parts.length < 3) + return parts[0]; + stack = [].slice.call(parts, 0, 3); + parts = [].slice.call(parts, 3); + while (parts.length > 0) { + nextOp = parts[0]; + if (!ignoreChains && stack.length > 2) { + operator = stack[stack.length - 2]; + if (in$(operator, chainableComparisonOps) && in$(nextOp, chainableComparisonOps)) { + chainStack = stack.slice(-3); + stack = stack.slice(0, stack.length - 3); + while (true) { + operator = nextOp; + chainStack.push(parts.shift(), parts.shift()); + nextOp = parts[0]; + if (nextOp) { + nextPrec = precedenceTable[nextOp]; + prec = precedenceTable[operator]; } - stack.push(new _this.CS.ChainedComparisonOp(_this.foldBinaryExpr(chainStack, true))); - continue; - } - } - while (stack.length > 2 && (operator = stack[stack.length - 2], prec = precedenceTable[operator], nextPrec = precedenceTable[nextOp], nextPrec < prec || __indexOf.call(chainableComparisonOps, operator) >= 0 && __indexOf.call(chainableComparisonOps, nextOp) >= 0 || nextPrec === prec && associativities[operator] === LEFT_ASSOCIATIVE)) { - rightOperand = stack.pop(); - stack.pop(); - leftOperand = stack.pop(); - stack.push(new _this.constructorLookup[operator](leftOperand, rightOperand)); - } - stack.push(parts.shift()); - stack.push(parts.shift()); - } - expr = stack.pop(); - while (stack.length > 0) { - expr = new _this.constructorLookup[stack.pop()](stack.pop(), expr); - } - return expr; - }; - this.createInterpolation = function(es) { - var init; - init = new _this.CS.String('').g(); - return _this.foldl(function(memo, s) { - var left; - if (s instanceof _this.CS.String) { - left = memo; - while (left) { - if (left instanceof _this.CS.String) { - if (left === init) { - _this.c(left, s); - delete left.generated; - } - left.data = "" + left.data + s.data; - return memo; - } else if (left instanceof _this.CS.ConcatOp) { - left = left.right; - } else { + if (!(null != nextOp && (nextPrec > prec || in$(nextOp, chainableComparisonOps)))) break; - } } - } - return new _this.CS.ConcatOp(memo, s); - }, init, es); - }; - this.createMemberExpression = function(e, accesses) { - return _this.foldl(function(left, access) { - var F, o, _ref; - F = function() {}; - F.prototype = access.op.prototype; - o = new F; - (_ref = access.op).call.apply(_ref, [o, left].concat(__slice.call(access.operands))); - return _this.c(o.r(left.raw + access.raw), e); - }, e, accesses); - }; - this.isValidRegExpFlags = function(flags) { - var f, flag, _j, _len1; - if (!flags) { - return true; - } - if (flags.length > 4) { - return false; - } - flags.sort(); - flag = null; - for (_j = 0, _len1 = flags.length; _j < _len1; _j++) { - f = flags[_j]; - if (flag === f) { - return false; - } - flag = f; - } - return true; - }; - this.stripLeadingWhitespace = function(str) { - var attempt, indent, match, matchStr, wholeMatch, _ref; - str = str.trimRight(); - matchStr = str; - indent = null; - while (match = /\n+([^\n\S]*)/.exec(matchStr)) { - wholeMatch = match[0], attempt = match[1]; - matchStr = matchStr.slice(match.index + wholeMatch.length); - if ((indent == null) || (0 < (_ref = attempt.length) && _ref < indent.length)) { - indent = attempt; - } - } - if (indent) { - str = str.replace(RegExp("\\n" + indent, "g"), '\n'); - } - str = str.replace(/^\n/, ''); - return str; - }; - this.stripLeadingWhitespaceInterpolation = function(pieces) { - var attempt, indent, index, match, matchStr, piece, wholeMatch, _j, _k, _len1, _len2, _ref; - indent = null; - for (index = _j = 0, _len1 = pieces.length; _j < _len1; index = ++_j) { - piece = pieces[index]; - if (piece instanceof _this.CS.String) { - if (index === pieces.length - 1) { - piece.data = piece.data.replace(/\s+$/, ''); - } - matchStr = piece.data; - while (match = /\n+([^\n\S]*)/.exec(matchStr)) { - wholeMatch = match[0], attempt = match[1]; - matchStr = matchStr.slice(match.index + wholeMatch.length); - if ((indent == null) || (0 < (_ref = attempt.length) && _ref < indent.length)) { - indent = attempt; - } - } - } - } - if (indent) { - for (index = _k = 0, _len2 = pieces.length; _k < _len2; index = ++_k) { - piece = pieces[index]; - if (piece instanceof _this.CS.String) { - piece.data = piece.data.replace(RegExp("\\n" + indent, "g"), '\n'); - if (index === pieces.length - 1) { - piece.data = piece.data.replace(/(\n\s*)+$/, ''); - } - if (index === 0) { - piece.data = piece.data.replace(/^\n/, ''); + stack.push(new CS.ChainedComparisonOp(foldBinaryExpr(chainStack, true))); + continue; + } + } + while (stack.length > 2 && (operator = stack[stack.length - 2], (prec = precedenceTable[operator], (nextPrec = precedenceTable[nextOp], nextPrec < prec || in$(operator, chainableComparisonOps) && in$(nextOp, chainableComparisonOps) || nextPrec === prec && associativities[operator] === LEFT_ASSOCIATIVE)))) { + rightOperand = stack.pop(); + stack.pop(); + leftOperand = stack.pop(); + stack.push(new constructorLookup[operator](leftOperand, rightOperand)); + } + stack.push(parts.shift()); + stack.push(parts.shift()); + } + expr = stack.pop(); + while (stack.length > 0) { + expr = new constructorLookup[(stack.pop())](stack.pop(), expr); + } + return expr; + }; + createInterpolation = function (es) { + var init; + init = new CS.String('').g(); + return foldl(function (memo, s) { + var left; + if (s instanceof CS.String) { + left = memo; + while (left) { + if (left instanceof CS.String) { + if (left === init) { + c(left, s); + delete left.generated; } + left.data = '' + left.data + s.data; + return memo; + } else if (left instanceof CS.ConcatOp) { + left = left.right; + } else { + break; } } } - return pieces; - }; - this.r = function(node) { - node.raw = text().replace(/[\uEFEF\uEFFE\uEFFF]/g, ''); - return node; - }; - this.p = function(node) { - node.line = line(); - node.column = column(); - node.offset = offset(); - return node; - }; - this.rp = function(node) { - return _this.r(_this.p(node)); - }; - this.c = function(to, from) { - to.line = from.line; - to.column = from.column; - to.offset = from.offset; - return to; - }; - id = function(x) { - return x; - }; - if (!options.raw) { - this.r = this.p = this.rp = id; - } - return this; - }).call({}); - - - // XXX: this overrides the function with the same name generated by PEGjs; see comment within - function peg$computePosDetails() { - function advanceCachedReportedPos() { - var ch; - - for (; peg$cachedPos < peg$reportedPos; peg$cachedPos++) { - ch = input.charAt(peg$cachedPos); - if (ch === "\n") { - if (!peg$cachedPosDetails.seenCR) { peg$cachedPosDetails.line++; } - peg$cachedPosDetails.column = 1; - peg$cachedPosDetails.seenCR = false; - } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { - peg$cachedPosDetails.line++; - peg$cachedPosDetails.column = 1; - peg$cachedPosDetails.seenCR = true; - // XXX: strip control characters when calculating position information; see #117 - } else if(!/[\uEFEF\uEFFE\uEFFF]/.test(ch)) { - peg$cachedPosDetails.column++; - peg$cachedPosDetails.seenCR = false; - } - } - } - - if (peg$cachedPos !== peg$reportedPos) { - if (peg$cachedPos > peg$reportedPos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; - } - advanceCachedReportedPos(); - } - - return peg$cachedPosDetails; + return new CS.ConcatOp(memo, s); + }, init, es); + }; + createMemberExpression = function (e, accesses) { + return foldl(function (left, access) { + var F, o; + F = function () { + }; + F.prototype = access.op.prototype; + o = new F; + access.op.call.apply(access.op, [ + o, + left + ].concat([].slice.call(access.operands))); + return c(o.r(left.raw + access.raw), e); + }, e, accesses); + }; + isValidRegExpFlags = function (flags) { + var f, flag; + if (!flags) + return true; + if (flags.length > 4) + return false; + flags.sort(); + flag = null; + for (var i$1 = 0, length$1 = flags.length; i$1 < length$1; ++i$1) { + f = flags[i$1]; + if (flag === f) + return false; + flag = f; + } + return true; + }; + stripLeadingWhitespace = function (str) { + var attempt, cache$, indent, match, matchStr, wholeMatch; + str = str.trimRight(); + matchStr = str; + indent = null; + while (match = /\n+([^\n\S]*)/.exec(matchStr)) { + cache$ = match; + wholeMatch = cache$[0]; + attempt = cache$[1]; + matchStr = matchStr.slice(match.index + wholeMatch.length); + if (!(null != indent) || 0 < attempt.length && attempt.length < indent.length) + indent = attempt; + } + if (indent) + str = str.replace(new RegExp('\\n' + indent, 'g'), '\n'); + str = str.replace(/^\n/, ''); + return str; + }; + stripLeadingWhitespaceInterpolation = function (pieces) { + var attempt, cache$, indent, index, match, matchStr, piece, wholeMatch; + indent = null; + for (var i$1 = 0, length$1 = pieces.length; i$1 < length$1; ++i$1) { + piece = pieces[i$1]; + index = i$1; + if (piece instanceof CS.String) { + if (index === pieces.length - 1) + piece.data = piece.data.replace(/\s+$/, ''); + matchStr = piece.data; + while (match = /\n+([^\n\S]*)/.exec(matchStr)) { + cache$ = match; + wholeMatch = cache$[0]; + attempt = cache$[1]; + matchStr = matchStr.slice(match.index + wholeMatch.length); + if (!(null != indent) || 0 < attempt.length && attempt.length < indent.length) + indent = attempt; + } + } + } + if (indent) + for (var i$2 = 0, length$2 = pieces.length; i$2 < length$2; ++i$2) { + piece = pieces[i$2]; + index = i$2; + if (piece instanceof CS.String) { + piece.data = piece.data.replace(new RegExp('\\n' + indent, 'g'), '\n'); + if (index === pieces.length - 1) + piece.data = piece.data.replace(/(\n\s*)+$/, ''); + if (index === 0) + piece.data = piece.data.replace(/^\n/, ''); + } + } + return pieces; + }; + r = function (node) { + node.raw = text().replace(/[\uEFEF\uEFFE\uEFFF]/g, ''); + return node; + }; + p = function (node) { + node.line = line(); + node.column = column(); + node.offset = offset(); + return node; + }; + rp = function (node) { + return r(p(node)); + }; + c = function (to, from) { + to.line = from.line; + to.column = from.column; + to.offset = from.offset; + return to; + }; + id = function (x) { + return x; + }; + if (!options.raw) + r = p = rp = id; + eval('\n // XXX: this overrides the function with the same name generated by PEGjs; see comment within\n function peg$computePosDetails() {\n function advanceCachedReportedPos() {\n var ch;\n\n for (; peg$cachedPos < peg$reportedPos; peg$cachedPos++) {\n ch = input.charAt(peg$cachedPos);\n if (ch === "\\n") {\n if (!peg$cachedPosDetails.seenCR) { peg$cachedPosDetails.line++; }\n peg$cachedPosDetails.column = 1;\n peg$cachedPosDetails.seenCR = false;\n } else if (ch === "\\r" || ch === "\\u2028" || ch === "\\u2029") {\n peg$cachedPosDetails.line++;\n peg$cachedPosDetails.column = 1;\n peg$cachedPosDetails.seenCR = true;\n // XXX: strip control characters when calculating position information; see #117\n } else if(!/[\\uEFEF\\uEFFE\\uEFFF]/.test(ch)) {\n peg$cachedPosDetails.column++;\n peg$cachedPosDetails.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== peg$reportedPos) {\n if (peg$cachedPos > peg$reportedPos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advanceCachedReportedPos();\n }\n\n return peg$cachedPosDetails;\n }\n '); + function isOwn$(o, p) { + return {}.hasOwnProperty.call(o, p); + } + function in$(member, list) { + for (var i = 0, length = list.length; i < length; ++i) + if (i in list && list[i] === member) + return true; + return false; } - ; - - (function() { - return this; - }).call({}); - peg$result = peg$startRuleFunction(); diff --git a/lib/pegjs-coffee-plugin.js b/lib/pegjs-coffee-plugin.js new file mode 100644 index 00000000..5c714df8 --- /dev/null +++ b/lib/pegjs-coffee-plugin.js @@ -0,0 +1,33 @@ +// Generated by CoffeeScript 2.0.0-beta9-dev +var CoffeeScript, compile, eachCode; +CoffeeScript = require('./module'); +eachCode = require('pegjs-each-code'); +compile = function (csCode, options) { + var csAST, jsAST; + if (null == options) + options = {}; + csAST = CoffeeScript.parse('-> ' + csCode.trimRight()); + if (csAST.body.statements.length > 1) + throw new Error('inconsistent base indentation'); + jsAST = CoffeeScript.compile(csAST, { + bare: true, + inScope: options.inScope + }); + jsAST.leadingComments = []; + jsAST.body = jsAST.body[0].expression.body.body.concat(jsAST.body.slice(1)); + return CoffeeScript.js(jsAST); +}; +exports.use = function (config) { + return config.passes.transform.unshift(function (ast) { + ast.initializer.code = CoffeeScript.cs2js(ast.initializer.code, { bare: true }); + return eachCode(ast, function (node, labels, ruleName) { + var error; + try { + return node.code = compile(node.code, { inScope: labels }); + } catch (e$) { + error = e$; + throw new Error("In the '" + ruleName + "' rule:\n" + error.message + ''); + } + }); + }); +}; diff --git a/package.json b/package.json index b6eaeddf..f17556ad 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "devDependencies": { "mocha": "~1.12.0", "pegjs": "~0.8.0", - "pegjs-coffee-plugin": "~0.2.2", + "pegjs-each-code": "~0.2.0", "commonjs-everywhere": "~0.9.0", "cluster": "~0.7.7", "semver": "~2.1.0" diff --git a/src/grammar.pegcoffee b/src/grammar.pegcoffee index a2d37a31..8e47dec1 100644 --- a/src/grammar.pegcoffee +++ b/src/grammar.pegcoffee @@ -1,43 +1,44 @@ { - @CS = require('./nodes') - - @constructorLookup = - '||': @CS.LogicalOrOp - 'or': @CS.LogicalOrOp - '&&': @CS.LogicalAndOp - 'and': @CS.LogicalAndOp - '|': @CS.BitOrOp - '^': @CS.BitXorOp - '&': @CS.BitAndOp - '?': @CS.ExistsOp - '==': @CS.EQOp - 'is': @CS.EQOp - '!=': @CS.NEQOp - 'isnt': @CS.NEQOp - '<=': @CS.LTEOp - '>=': @CS.GTEOp - '<': @CS.LTOp - '>': @CS.GTOp - 'extends': @CS.ExtendsOp - 'instanceof': @CS.InstanceofOp - 'in': @CS.InOp - 'of': @CS.OfOp - '<<': @CS.LeftShiftOp - '>>': @CS.SignedRightShiftOp - '>>>': @CS.UnsignedRightShiftOp - '+': @CS.PlusOp - '-': @CS.SubtractOp - '*': @CS.MultiplyOp - '/': @CS.DivideOp - '%': @CS.RemOp - '**': @CS.ExpOp + CS = require('./nodes') + + constructorLookup = + '||': CS.LogicalOrOp + 'or': CS.LogicalOrOp + '&&': CS.LogicalAndOp + 'and': CS.LogicalAndOp + '|': CS.BitOrOp + '^': CS.BitXorOp + '&': CS.BitAndOp + '?': CS.ExistsOp + '==': CS.EQOp + 'is': CS.EQOp + '!=': CS.NEQOp + 'isnt': CS.NEQOp + '<=': CS.LTEOp + '>=': CS.GTEOp + '<': CS.LTOp + '>': CS.GTOp + 'extends': CS.ExtendsOp + 'instanceof': CS.InstanceofOp + 'in': CS.InOp + 'of': CS.OfOp + '<<': CS.LeftShiftOp + '>>': CS.SignedRightShiftOp + '>>>': CS.UnsignedRightShiftOp + '+': CS.PlusOp + '-': CS.SubtractOp + '*': CS.MultiplyOp + '/': CS.DivideOp + '%': CS.RemOp + '**': CS.ExpOp negatableOps = ['instanceof', 'in', 'of'] chainableComparisonOps = ['<=', '>=', '<', '>', '==', 'is', '!=', 'isnt'] rightAssocOps = [';', '=', '?', '**'] precedenceHierarchy = - [ ['or', '||'] + [ + ['or', '||'] ['and', '&&'] ['|'] ['^'] @@ -69,44 +70,46 @@ result[rightAssocOp] = RIGHT_ASSOCIATIVE result - for op in negatableOps then do (op) => - fn = (a, b) => new @CS.LogicalNotOp new @constructorLookup[op] a, b - fn.prototype = @constructorLookup[op].prototype + for op in negatableOps then do (op) -> + fn = (a, b) -> new CS.LogicalNotOp new constructorLookup[op] a, b + fn.prototype = constructorLookup[op].prototype negatedOp = "not #{op}" - @constructorLookup[negatedOp] = fn + constructorLookup[negatedOp] = fn precedenceTable[negatedOp] = precedenceTable[op] associativities[negatedOp] = associativities[op] - @prefixConstructorLookup = - '++': @CS.PreIncrementOp - '--': @CS.PreDecrementOp - '+': @CS.UnaryPlusOp - '-': @CS.UnaryNegateOp - '!': @CS.LogicalNotOp - 'not': @CS.LogicalNotOp - '~': @CS.BitNotOp - 'do': @CS.DoOp - 'typeof': @CS.TypeofOp - 'delete': @CS.DeleteOp - - @postfixConstructorLookup = - '?': @CS.UnaryExistsOp - '[..]': @CS.ShallowCopyArray - '++': @CS.PostIncrementOp - '--': @CS.PostDecrementOp - - @foldl = (fn, memo, list) -> + prefixConstructorLookup = + '++': CS.PreIncrementOp + '--': CS.PreDecrementOp + '+': CS.UnaryPlusOp + '-': CS.UnaryNegateOp + '!': CS.LogicalNotOp + 'not': CS.LogicalNotOp + '~': CS.BitNotOp + 'do': CS.DoOp + 'typeof': CS.TypeofOp + 'delete': CS.DeleteOp + + postfixConstructorLookup = + '?': CS.UnaryExistsOp + '[..]': CS.ShallowCopyArray + '++': CS.PostIncrementOp + '--': CS.PostDecrementOp + + foldl = (fn, memo, list) -> for item in list memo = fn memo, item memo - @foldr = (fn, memo, list) -> - for item in list by -1 + foldr = (fn, memo, list) -> + i = list.length + while i-- + item = list[i] memo = fn memo, item memo # TODO: clean up and use a functional approach; stack === recursion - @foldBinaryExpr = (parts, ignoreChains) => + foldBinaryExpr = (parts, ignoreChains) -> return parts[0] if parts.length < 3 # should never happen stack = [].slice.call(parts, 0, 3) parts = [].slice.call(parts, 3) @@ -129,24 +132,23 @@ prec = precedenceTable[operator] # TODO: I would love `a < b is c < d` to instead denote `(a < b) is (c < d)` break unless nextOp? and (nextPrec > prec or nextOp in chainableComparisonOps) - stack.push new @CS.ChainedComparisonOp @foldBinaryExpr chainStack, true + stack.push new CS.ChainedComparisonOp foldBinaryExpr chainStack, true continue # reduce - while \ - stack.length > 2 and \ - ( \ - operator = stack[stack.length - 2] - prec = precedenceTable[operator] - nextPrec = precedenceTable[nextOp] - nextPrec < prec or - operator in chainableComparisonOps and nextOp in chainableComparisonOps or - nextPrec is prec and associativities[operator] is LEFT_ASSOCIATIVE - ) + while stack.length > 2 and + ( + operator = stack[stack.length - 2]; + prec = precedenceTable[operator]; + nextPrec = precedenceTable[nextOp]; + nextPrec < prec or + operator in chainableComparisonOps and nextOp in chainableComparisonOps or + nextPrec is prec and associativities[operator] is LEFT_ASSOCIATIVE + ) rightOperand = stack.pop() stack.pop() # operator leftOperand = stack.pop() - stack.push new @constructorLookup[operator] leftOperand, rightOperand + stack.push new constructorLookup[operator] leftOperand, rightOperand # shift stack.push parts.shift() # operator @@ -155,40 +157,40 @@ # reduce the rest of the stack expr = stack.pop() while stack.length > 0 - expr = new @constructorLookup[stack.pop()] stack.pop(), expr + expr = new constructorLookup[stack.pop()] stack.pop(), expr expr - @createInterpolation = (es) => - init = new @CS.String('').g() - @foldl (memo, s) => - if s instanceof @CS.String + createInterpolation = (es) -> + init = new CS.String('').g() + foldl ((memo, s) -> + if s instanceof CS.String left = memo while left - if left instanceof @CS.String + if left instanceof CS.String if left is init - @c left, s + c left, s delete left.generated left.data = "#{left.data}#{s.data}" return memo - else if left instanceof @CS.ConcatOp + else if left instanceof CS.ConcatOp left = left.right else break - new @CS.ConcatOp memo, s - , init, es + new CS.ConcatOp memo, s + ), init, es - @createMemberExpression = (e, accesses) => - @foldl (left, access) => + createMemberExpression = (e, accesses) -> + foldl ((left, access) -> F = -> F.prototype = access.op.prototype o = new F # rather safely assumes access.op is returning non-Object access.op.call o, left, access.operands... - @c (o.r left.raw + access.raw), e - , e, accesses + c (o.r left.raw + access.raw), e + ), e, accesses - @isValidRegExpFlags = (flags) -> + isValidRegExpFlags = (flags) -> return true unless flags return false if flags.length > 4 flags.sort() @@ -199,7 +201,7 @@ true # TODO: refactor this - @stripLeadingWhitespace = (str) -> + stripLeadingWhitespace = (str) -> str = str.trimRight() matchStr = str indent = null @@ -213,10 +215,10 @@ str # TODO: remove mutation? - @stripLeadingWhitespaceInterpolation = (pieces) => + stripLeadingWhitespaceInterpolation = (pieces) -> indent = null for piece, index in pieces - if piece instanceof @CS.String + if piece instanceof CS.String piece.data = piece.data.replace /\s+$/, '' if index is pieces.length - 1 matchStr = piece.data while match = /\n+([^\n\S]*)/.exec matchStr @@ -226,26 +228,26 @@ indent = attempt if indent for piece, index in pieces - if piece instanceof @CS.String + if piece instanceof CS.String piece.data = piece.data.replace ///\n#{indent}///g, '\n' piece.data = piece.data.replace /(\n\s*)+$/, '' if index is pieces.length - 1 piece.data = piece.data.replace /^\n/, '' if index is 0 pieces # store raw parse information - @r = (node) -> + r = (node) -> node.raw = text().replace /[\uEFEF\uEFFE\uEFFF]/g, '' node # store position information - @p = (node) -> + p = (node) -> node.line = line() node.column = column() node.offset = offset() node # composition of r and p - @rp = (node) => @r @p node + rp = (node) -> r p node # copy position information - @c = (to, from) -> + c = (to, from) -> to.line = from.line to.column = from.column to.offset = from.offset @@ -253,65 +255,60 @@ # the identity function id = (x) -> x unless options.raw - @r = @p = @rp = id - - return this -).call({}) - -` -// XXX: this overrides the function with the same name generated by PEGjs; see comment within -function peg$computePosDetails() { - function advanceCachedReportedPos() { - var ch; - - for (; peg$cachedPos < peg$reportedPos; peg$cachedPos++) { - ch = input.charAt(peg$cachedPos); - if (ch === "\n") { - if (!peg$cachedPosDetails.seenCR) { peg$cachedPosDetails.line++; } - peg$cachedPosDetails.column = 1; - peg$cachedPosDetails.seenCR = false; - } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { - peg$cachedPosDetails.line++; - peg$cachedPosDetails.column = 1; - peg$cachedPosDetails.seenCR = true; - // XXX: strip control characters when calculating position information; see #117 - } else if(!/[\uEFEF\uEFFE\uEFFF]/.test(ch)) { - peg$cachedPosDetails.column++; - peg$cachedPosDetails.seenCR = false; + r = p = rp = id + + ` + // XXX: this overrides the function with the same name generated by PEGjs; see comment within + function peg$computePosDetails() { + function advanceCachedReportedPos() { + var ch; + + for (; peg$cachedPos < peg$reportedPos; peg$cachedPos++) { + ch = input.charAt(peg$cachedPos); + if (ch === "\n") { + if (!peg$cachedPosDetails.seenCR) { peg$cachedPosDetails.line++; } + peg$cachedPosDetails.column = 1; + peg$cachedPosDetails.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + peg$cachedPosDetails.line++; + peg$cachedPosDetails.column = 1; + peg$cachedPosDetails.seenCR = true; + // XXX: strip control characters when calculating position information; see #117 + } else if(!/[\uEFEF\uEFFE\uEFFF]/.test(ch)) { + peg$cachedPosDetails.column++; + peg$cachedPosDetails.seenCR = false; + } } } - } - if (peg$cachedPos !== peg$reportedPos) { - if (peg$cachedPos > peg$reportedPos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + if (peg$cachedPos !== peg$reportedPos) { + if (peg$cachedPos > peg$reportedPos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advanceCachedReportedPos(); } - advanceCachedReportedPos(); - } - - return peg$cachedPosDetails; -} -` -(-> + return peg$cachedPosDetails; + } + ` } program = leader:TERMINATOR? _ b:toplevelBlock? { - @rp new @CS.Program b + rp new CS.Program b } toplevelBlock = s:toplevelStatement ss:(_ TERMINATOR _ s:toplevelStatement { s })* TERMINATOR? { - @rp new @CS.Block [s, ss...] + rp new CS.Block [s, ss...] } toplevelStatement = !(return / continue / break) s:statement { s } block = s:statement ss:(_ TERMINATOR _ s:statement { s })* TERMINATOR? { - @rp new @CS.Block [s, ss...] + rp new CS.Block [s, ss...] } @@ -352,28 +349,28 @@ expressionworthy seqExpression = left:postfixControlFlowExpression right:(_ ";" TERMINATOR? _ e:expression { e })? { return left unless right - @rp new @CS.SeqOp left, right + rp new CS.SeqOp left, right } postfixControlFlowExpression = expr:secondaryStatement postfixes:(_ postfixControlFlowOp)* { - @foldl (expr, postfixContainer) => + foldl ((expr, postfixContainer) -> postfix = postfixContainer[1] indicator = postfix.type switch indicator when 'if' - @rp new @CS.Conditional postfix.cond, expr, null + rp new CS.Conditional postfix.cond, expr, null when 'unless' - @rp new @CS.NegatedConditional new @CS.LogicalNotOp(postfix.cond).g(), expr, null + rp new CS.NegatedConditional new CS.LogicalNotOp(postfix.cond).g(), expr, null when 'while' - @rp new @CS.While postfix.cond, expr + rp new CS.While postfix.cond, expr when 'until' - @rp new @CS.NegatedWhile new @CS.LogicalNotOp(postfix.cond).g(), expr + rp new CS.NegatedWhile new CS.LogicalNotOp(postfix.cond).g(), expr when 'for-in' - @rp new @CS.ForIn postfix.val, postfix.key, postfix.list, postfix.step, postfix.filter, expr + rp new CS.ForIn postfix.val, postfix.key, postfix.list, postfix.step, postfix.filter, expr when 'for-of' - @rp new @CS.ForOf postfix.own, postfix.key, postfix.val, postfix.obj, postfix.filter, expr - , expr, postfixes + rp new CS.ForOf postfix.own, postfix.key, postfix.val, postfix.obj, postfix.filter, expr + ), expr, postfixes } postfixControlFlowOp = kw:(IF / UNLESS) _ e:assignmentExpression { type: kw, cond: e } @@ -383,7 +380,8 @@ postfixControlFlowExpression step:(_ BY _ a:assignmentExpression { a })? filter:(_ WHEN _ a:assignmentExpression { a })? { [val, key] = valKey ? [null, null] - { type: 'for-in', val, key, list, step: step ? new @CS.Int(1).r('1').g(), filter } + step ?= new CS.Int(1).r('1').g() + { type: 'for-in', val, key, list, step, filter } } / FOR _ own:(OWN _)? key:Assignable _ val:("," _ a:Assignable _ { a })? OF _ obj:assignmentExpression @@ -401,14 +399,14 @@ assignmentExpression ( TERMINDENT e:secondaryExpression DEDENT { e } / TERMINATOR? _ e:secondaryExpression { e } ) { - @rp new @CS.AssignOp left, right + rp new CS.AssignOp left, right } compoundAssignmentOp = left:CompoundAssignable _ !"?" op:CompoundAssignmentOperators "=" right: ( TERMINDENT e:secondaryExpression DEDENT { e } / TERMINATOR? _ e:secondaryExpression { e } ) { - @rp new @CS.CompoundAssignOp @constructorLookup[op].prototype.className, left, right + rp new CS.CompoundAssignOp constructorLookup[op].prototype.className, left, right } CompoundAssignmentOperators = $("&&" / AND / "||" / OR / "**" / [?&^|*/%] / "+" !"+" / "-" !"-" / "<<" / ">>>" / ">>") @@ -417,7 +415,7 @@ assignmentExpression ( TERMINDENT e:secondaryExpression DEDENT { e } / TERMINATOR? _ e:secondaryExpression { e } ) { - @rp new @CS.CompoundAssignOp @constructorLookup['?'].prototype.className, left, right + rp new CS.CompoundAssignOp constructorLookup['?'].prototype.className, left, right } assignmentExpressionNoImplicitObjectCall = assignmentOpNoImplicitObjectCall @@ -429,21 +427,21 @@ assignmentExpressionNoImplicitObjectCall ( TERMINDENT e:secondaryExpressionNoImplicitObjectCall DEDENT { e } / TERMINATOR? _ e:secondaryExpressionNoImplicitObjectCall { e } ) { - @rp new @CS.AssignOp left, right + rp new CS.AssignOp left, right } compoundAssignmentOpNoImplicitObjectCall = left:CompoundAssignable _ !"?" op:CompoundAssignmentOperators "=" right: ( TERMINDENT e:secondaryExpressionNoImplicitObjectCall DEDENT { e } / TERMINATOR? _ e:secondaryExpressionNoImplicitObjectCall { e } ) { - @rp new @CS.CompoundAssignOp @constructorLookup[op].prototype.className, left, right + rp new CS.CompoundAssignOp constructorLookup[op].prototype.className, left, right } existsAssignmentOpNoImplicitObjectCall = left:ExistsAssignable _ "?=" _ right: ( TERMINDENT e:secondaryExpressionNoImplicitObjectCall DEDENT { e } / TERMINATOR? _ e:secondaryExpressionNoImplicitObjectCall { e } ) { - @rp new @CS.CompoundAssignOp @constructorLookup['?'].prototype.className, left, right + rp new CS.CompoundAssignOp constructorLookup['?'].prototype.className, left, right } binaryExpression @@ -453,8 +451,8 @@ binaryExpression )* { switch rights.length when 0 then left - when 1 then [op, expr] = rights[0]; @rp new @constructorLookup[op](left, expr) - else @rp @foldBinaryExpr [left].concat(rights...) + when 1 then [op, expr] = rights[0]; rp new constructorLookup[op](left, expr) + else rp foldBinaryExpr [left].concat(rights...) } binaryOperator = $(CompoundAssignmentOperators !"=") @@ -468,51 +466,51 @@ binaryExpressionNoImplicitObjectCall )* { switch rights.length when 0 then left - when 1 then [op, expr] = rights[0]; @rp new @constructorLookup[op](left, expr) - else @rp @foldBinaryExpr [left].concat(rights...) + when 1 then [op, expr] = rights[0]; rp new constructorLookup[op](left, expr) + else rp foldBinaryExpr [left].concat(rights...) } prefixExpression = postfixExpression - / DO _ e:(nfe / expressionworthy / prefixExpression) { @rp new @CS.DoOp e } + / DO _ e:(nfe / expressionworthy / prefixExpression) { rp new CS.DoOp e } / ops:(o:PrefixOperators _ { o })+ e:(expressionworthy / prefixExpression) { - @rp @foldr (e, op) => - new @prefixConstructorLookup[op] e - , e, ops + rp foldr ((e, op) -> + new prefixConstructorLookup[op] e + ), e, ops } PrefixOperators = "++" / "--" / "+" / "-" / "!" / NOT / "~" / DO / TYPEOF / DELETE nfe - = !unassignable a:Assignable _ "=" _ f:functionLiteral { @rp new @CS.AssignOp a, f } + = !unassignable a:Assignable _ "=" _ f:functionLiteral { rp new CS.AssignOp a, f } prefixExpressionNoImplicitObjectCall = postfixExpressionNoImplicitObjectCall - / DO _ e:(nfe / expressionworthy / prefixExpressionNoImplicitObjectCall) { @rp new @CS.DoOp e } + / DO _ e:(nfe / expressionworthy / prefixExpressionNoImplicitObjectCall) { rp new CS.DoOp e } / ops:(o:PrefixOperators _ { o })+ e:(expressionworthy / prefixExpressionNoImplicitObjectCall) { - @rp @foldr (e, op) => - new @prefixConstructorLookup[op] e - , e, ops + rp foldr ((e, op) -> + new prefixConstructorLookup[op] e + ), e, ops } postfixExpression = e:leftHandSideExpression ops:PostfixOperators* { - @rp @foldl (e, op) => - new @postfixConstructorLookup[op] e - , e, ops + rp foldl ((e, op) -> + new postfixConstructorLookup[op] e + ), e, ops } PostfixOperators = "?" / "[..]" / "++" / "--" postfixExpressionNoImplicitObjectCall = e:leftHandSideExpressionNoImplicitObjectCall ops:PostfixOperators* { - @rp @foldl (e, op) => - new @postfixConstructorLookup[op] e - , e, ops + rp foldl ((e, op) -> + new postfixConstructorLookup[op] e + ), e, ops } leftHandSideExpression = callExpression / newExpression argumentList = soaked:"?"? "(" _ a:argumentListContents? _ ")" { - @rp - op: if soaked then @CS.SoakedFunctionApplication else @CS.FunctionApplication + rp + op: if soaked then CS.SoakedFunctionApplication else CS.FunctionApplication operands: [a ? []] } argumentListContents @@ -549,82 +547,82 @@ leftHandSideExpressionNoImplicitObjectCall = callExpressionNoImplicitObjectCall / secondaryExpressionNoImplicitObjectCall callExpression - = e:memberExpression accesses:callExpressionAccesses? secondaryArgs:("?"? secondaryArgumentList)? { - fn = if accesses? then @createMemberExpression e, accesses else e + = fn:memberExpression accesses:callExpressionAccesses? secondaryArgs:("?"? secondaryArgumentList)? { + fn = createMemberExpression fn, accesses if accesses? if secondaryArgs? [ soaked, list ] = secondaryArgs - secondaryCtor = if soaked then @CS.SoakedFunctionApplication else @CS.FunctionApplication - fn = @rp new secondaryCtor fn, list + secondaryCtor = if soaked then CS.SoakedFunctionApplication else CS.FunctionApplication + fn = rp new secondaryCtor fn, list fn } callExpressionAccesses = TERMINDENT as:callExpressionAccesses DEDENT { as } / as:(argumentList / MemberAccessOps)+ bs:callExpressionAccesses? { [as..., (bs ? [])...] } callExpressionNoImplicitObjectCall - = e:memberExpressionNoImplicitObjectCall accesses:(argumentList / MemberAccessOps)* secondaryArgs:("?"? secondaryArgumentListNoImplicitObjectCall)? { - fn = if accesses? then @createMemberExpression e, accesses else e + = fn:memberExpressionNoImplicitObjectCall accesses:(argumentList / MemberAccessOps)* secondaryArgs:("?"? secondaryArgumentListNoImplicitObjectCall)? { + fn = createMemberExpression fn, accesses if accesses? if secondaryArgs? [ soaked, list ] = secondaryArgs - secondaryCtor = if soaked then @CS.SoakedFunctionApplication else @CS.FunctionApplication - fn = @rp new secondaryCtor fn, list + secondaryCtor = if soaked then CS.SoakedFunctionApplication else CS.FunctionApplication + fn = rp new secondaryCtor fn, list fn } newExpression = memberExpression / NEW __ e:(expressionworthy / newExpression / prefixExpression) { - @rp new @CS.NewOp e, [] + rp new CS.NewOp e, [] } newExpressionNoImplicitObjectCall = memberExpressionNoImplicitObjectCall / NEW __ e:(expressionworthy / newExpressionNoImplicitObjectCall / prefixExpressionNoImplicitObjectCall) { - @rp new @CS.NewOp e, [] + rp new CS.NewOp e, [] } memberExpression = e: ( primaryExpression - / NEW __ e:memberExpression args:argumentList { @rp new @CS.NewOp e, args.operands[0] } + / NEW __ e:memberExpression args:argumentList { rp new CS.NewOp e, args.operands[0] } ) accesses:MemberAccessOps* { - @createMemberExpression e, accesses + createMemberExpression e, accesses } / NEW __ e:memberExpression args:secondaryArgumentList { - @rp new @CS.NewOp e, args + rp new CS.NewOp e, args } memberAccess = e: ( primaryExpression - / NEW __ e:memberExpression args:argumentList { @rp new @CS.NewOp e, args.operands[0] } + / NEW __ e:memberExpression args:argumentList { rp new CS.NewOp e, args.operands[0] } ) accesses:(argumentList MemberAccessOps / MemberAccessOps)+ { - acc = @foldl ((memo, a) -> memo.concat a), [], accesses - @createMemberExpression e, acc + acc = foldl ((memo, a) -> memo.concat a), [], accesses + createMemberExpression e, acc } / contextVar MemberNames = identifierName MemberAccessOps - = TERMINDENT "." _ e:MemberNames MemberAccessOps* DEDENT { @rp op: @CS.MemberAccessOp, operands: [e] } - / TERMINATOR? _ "." TERMINATOR? _ e:MemberNames { @rp op: @CS.MemberAccessOp, operands: [e] } - / "?." _ e:MemberNames { @rp op: @CS.SoakedMemberAccessOp, operands: [e] } - / "[" _ e:expression _ "]" { @rp op: @CS.DynamicMemberAccessOp, operands: [e] } - / "?[" _ e:expression _ "]" { @rp op: @CS.SoakedDynamicMemberAccessOp, operands: [e] } - / "::" _ e:MemberNames { @rp op: @CS.ProtoMemberAccessOp, operands: [e] } - / "::[" _ e:expression _ "]" { @rp op: @CS.DynamicProtoMemberAccessOp, operands: [e] } - / "?::" _ e:MemberNames { @rp op: @CS.SoakedProtoMemberAccessOp, operands: [e] } - / "?::[" _ e:expression _ "]" { @rp op: @CS.SoakedDynamicProtoMemberAccessOp, operands: [e] } + = TERMINDENT "." _ e:MemberNames MemberAccessOps* DEDENT { rp op: CS.MemberAccessOp, operands: [e] } + / TERMINATOR? _ "." TERMINATOR? _ e:MemberNames { rp op: CS.MemberAccessOp, operands: [e] } + / "?." _ e:MemberNames { rp op: CS.SoakedMemberAccessOp, operands: [e] } + / "[" _ e:expression _ "]" { rp op: CS.DynamicMemberAccessOp, operands: [e] } + / "?[" _ e:expression _ "]" { rp op: CS.SoakedDynamicMemberAccessOp, operands: [e] } + / "::" _ e:MemberNames { rp op: CS.ProtoMemberAccessOp, operands: [e] } + / "::[" _ e:expression _ "]" { rp op: CS.DynamicProtoMemberAccessOp, operands: [e] } + / "?::" _ e:MemberNames { rp op: CS.SoakedProtoMemberAccessOp, operands: [e] } + / "?::[" _ e:expression _ "]" { rp op: CS.SoakedDynamicProtoMemberAccessOp, operands: [e] } / "[" _ left:assignmentExpression? _ ".." exclusive:"."? _ right:assignmentExpression? _ "]" { - @rp op: @CS.Slice, operands: [not exclusive, left, right] + rp op: CS.Slice, operands: [not exclusive, left, right] } memberExpressionNoImplicitObjectCall = e: ( primaryExpression - / NEW __ e:memberExpressionNoImplicitObjectCall args:argumentList { @rp new @CS.NewOp e, args.operands[0] } + / NEW __ e:memberExpressionNoImplicitObjectCall args:argumentList { rp new CS.NewOp e, args.operands[0] } ) accesses:MemberAccessOps* { - @createMemberExpression e, accesses + createMemberExpression e, accesses } / NEW __ e:memberExpressionNoImplicitObjectCall args:secondaryArgumentListNoImplicitObjectCall { - @rp new @CS.NewOp e, args + rp new CS.NewOp e, args } primaryExpression @@ -634,7 +632,7 @@ primaryExpression / null / undefined / contextVar - / (THIS / "@") { @rp new @CS.This } + / (THIS / "@") { rp new CS.This } / identifier / range / arrayLiteral @@ -643,28 +641,28 @@ primaryExpression / JSLiteral / string / regexp - / "(" TERMINDENT e:expression DEDENT TERMINATOR? ")" { @r e.clone() } - / "(" _ e:expression _ TERMINATOR? _ ")" { @r e.clone() } + / "(" TERMINDENT e:expression DEDENT TERMINATOR? ")" { r e.clone() } + / "(" _ e:expression _ TERMINATOR? _ ")" { r e.clone() } contextVar - = a:("@" { @rp new @CS.This }) m:MemberNames { - @rp new @CS.MemberAccessOp a, m + = a:("@" { rp new CS.This }) m:MemberNames { + rp new CS.MemberAccessOp a, m } - JSLiteral = "`" d:$([^`]*) "`" { @rp new @CS.JavaScript d } + JSLiteral = "`" d:$([^`]*) "`" { rp new CS.JavaScript d } spread - = e:postfixExpression "..." { @rp new @CS.Spread e } + = e:postfixExpression "..." { rp new CS.Spread e } spreadNoImplicitObjectCall - = e:postfixExpressionNoImplicitObjectCall "..." { @rp new @CS.Spread e } + = e:postfixExpressionNoImplicitObjectCall "..." { rp new CS.Spread e } conditional = kw:(IF / UNLESS) _ cond:assignmentExpressionNoImplicitObjectCall body:conditionalBody elseClause:elseClause? { switch kw when 'if' - @rp new @CS.Conditional cond, body.block, elseClause + rp new CS.Conditional cond, body.block, elseClause when 'unless' - @rp new @CS.NegatedConditional (new @CS.LogicalNotOp cond).g(), body.block, elseClause + rp new CS.NegatedConditional (new CS.LogicalNotOp cond).g(), body.block, elseClause } conditionalBody = _ TERMINDENT b:block DEDENT { block: b } @@ -678,31 +676,31 @@ while = kw:(WHILE / UNTIL) _ cond:assignmentExpressionNoImplicitObjectCall body:whileBody { switch kw when 'while' - @rp new @CS.While cond, body.block + rp new CS.While cond, body.block when 'until' - @rp new @CS.NegatedWhile (new @CS.LogicalNotOp cond).g(), body.block + rp new CS.NegatedWhile (new CS.LogicalNotOp cond).g(), body.block } whileBody = conditionalBody loop = LOOP body:whileBody { - @rp new @CS.Loop body.block + rp new CS.Loop body.block } try = TRY body:tryBody c:catchClause? f:finallyClause? { - @rp new @CS.Try body.block, c?.assignee ? null, c?.block ? null, f?.block ? null + rp new CS.Try body.block, c?.assignee ? null, c?.block ? null, f?.block ? null } tryBody = b:functionBody { block: b } catchClause = TERMINATOR? _ CATCH _ e:Assignable? body:conditionalBody? { - @r block: (if body? then body.block else (new @CS.Block [])), assignee: e + r block: (if body? then body.block else (new CS.Block [])), assignee: e } finallyClause = TERMINATOR? _ FINALLY body:tryBody? { - @r block: body?.block ? null + r block: body?.block ? null } @@ -712,11 +710,11 @@ class boundMembers = [] stmts = if body? then body.statements ? [body] else [] for m in stmts - if m.instanceof @CS.Constructor + if m.instanceof CS.Constructor ctor = m - else if (m.instanceof @CS.ClassProtoAssignOp) and (m.expression.instanceof @CS.BoundFunction) + else if (m.instanceof CS.ClassProtoAssignOp) and (m.expression.instanceof CS.BoundFunction) boundMembers.push m - @rp new @CS.Class name, parent, ctor, body, boundMembers + rp new CS.Class name, parent, ctor, body, boundMembers } extendee = secondaryExpressionNoImplicitObjectCall classBody @@ -725,7 +723,7 @@ class / (_ THEN)? classBlock = s:classStatement ss:(_ TERMINATOR _ s:classStatement { s })* TERMINATOR? { - @rp new @CS.Block [s, ss...] + rp new CS.Block [s, ss...] } classStatement = constructor @@ -733,30 +731,30 @@ class / staticAssignment / expression constructor - = (key:ObjectInitialiserKeys &{ (key.instanceof @CS.String, @CS.Identifier) and key.data is 'constructor' }) _ ":" _ e: + = (key:ObjectInitialiserKeys &{ (key.instanceof CS.String, CS.Identifier) and key.data is 'constructor' }) _ ":" _ e: ( TERMINDENT e:expression DEDENT { e } / TERMINATOR? _ e:expression { e } ) { - fn = if e.instanceof @CS.BoundFunction - @c new @CS.Function(e.parameters, e.body).r(e.raw), e + fn = if e.instanceof CS.BoundFunction + c new CS.Function(e.parameters, e.body).r(e.raw), e else e - @rp new @CS.Constructor fn + rp new CS.Constructor fn } staticAssignment = key:contextVar _ ":" _ e: - ( TERMINDENT e:expression DEDENT { @r expr: e } - / TERMINATOR? _ e:expression { @r expr: e } + ( TERMINDENT e:expression DEDENT { r expr: e } + / TERMINATOR? _ e:expression { r expr: e } ) { - @rp new @CS.AssignOp key, e.expr + rp new CS.AssignOp key, e.expr } classProtoAssignment = key:ObjectInitialiserKeys _ ":" _ e: - ( TERMINDENT e:expression DEDENT { @r expr: e } - / e:singleLineImplicitObjectLiteral { @r expr: e } - / TERMINATOR? _ e:secondaryExpression { @r expr: e } + ( TERMINDENT e:expression DEDENT { r expr: e } + / e:singleLineImplicitObjectLiteral { r expr: e } + / TERMINATOR? _ e:secondaryExpression { r expr: e } ) { - @rp new @CS.ClassProtoAssignOp key, e.expr + rp new CS.ClassProtoAssignOp key, e.expr } @@ -766,7 +764,7 @@ forOf OF _ obj:assignmentExpressionNoImplicitObjectCall _ filter:(WHEN _ e:assignmentExpressionNoImplicitObjectCall _ { e })? body:forBody { - @rp new @CS.ForOf (Boolean own), key, val, obj, filter, body.block + rp new CS.ForOf (Boolean own), key, val, obj, filter, body.block } forIn = FOR _ valKey:(val:Assignable _ key:("," _ a:Assignable _ { a })? { [val, key] })? @@ -775,25 +773,26 @@ forIn filter:(WHEN _ e:assignmentExpressionNoImplicitObjectCall _ { e })? body:forBody { [val, key] = valKey ? [null, null] - @rp new @CS.ForIn val, key, list, step ? new @CS.Int(1).r('1').g(), filter, body.block + step ?= new CS.Int(1).r('1').g() + rp new CS.ForIn val, key, list, step, filter, body.block } switch = SWITCH _ e:(expressionworthy / assignmentExpression)? body:switchBody { - @rp new @CS.Switch e, body.cases, body.else ? null + rp new CS.Switch e, body.cases, body.else ? null } switchBody - = _ TERMINDENT b:switchBlock DEDENT { @r cases: b.cases, else: b.else } - / _ THEN _ c:case { @r cases: [c] } - / _ THEN { @r cases: [] } + = _ TERMINDENT b:switchBlock DEDENT { r cases: b.cases, else: b.else } + / _ THEN _ c:case { r cases: [c] } + / _ THEN { r cases: [] } switchBlock = c:case cs:(_ TERMINATOR _ c:case { c })* elseClause:(_ TERMINATOR _ e:elseClause { e })? TERMINATOR? { - @r cases: [c, cs...], else: elseClause + r cases: [c, cs...], else: elseClause } case = WHEN _ conditions:caseConditions body:caseBody { - @rp new @CS.SwitchCase conditions, body.block + rp new CS.SwitchCase conditions, body.block } caseCondition = assignmentExpressionNoImplicitObjectCall caseConditions @@ -807,21 +806,21 @@ functionLiteral = params:("(" _ p:(TERMINDENT p:parameterList DEDENT TERMINATOR { p } / parameterList)? _ ")" _ { p })? arrow:("->" / "=>") body:functionBody? { constructor = switch arrow - when '->' then @CS.Function - when '=>' then @CS.BoundFunction - @rp new constructor params ? [], body + when '->' then CS.Function + when '=>' then CS.BoundFunction + rp new constructor params ? [], body } functionBody = _ TERMINDENT b:block DEDENT { b } / _ s:statement { s } parameter = param:Assignable _ "=" _ default_:secondaryExpression { - @rp new @CS.DefaultParam param, default_ + rp new CS.DefaultParam param, default_ } / rest rest = a:Assignable rest:"..."? { - @rp if rest? then new @CS.Rest a else a + rp if rest? then new CS.Rest a else a } parameterList = e:parameter es:(_ ("," TERMINATOR? / TERMINATOR) _ e:parameter { e })* { @@ -832,13 +831,13 @@ functionLiteral range = "[" _ left:secondaryExpression _ ".." exclusiveDot:"."? _ right:secondaryExpression _ "]" { inclusive = not exclusiveDot - @rp new @CS.Range inclusive, left, right + rp new CS.Range inclusive, left, right } arrayLiteral = "[" members:arrayLiteralBody TERMINATOR? _ "]" { - @rp new @CS.ArrayInitialiser members + rp new CS.ArrayInitialiser members } arrayLiteralBody = TERMINDENT members:arrayLiteralMemberList DEDENT { members } @@ -860,7 +859,7 @@ arrayLiteral objectLiteral = "{" members:objectLiteralBody TERMINATOR? _ "}" { - @rp new @CS.ObjectInitialiser members + rp new CS.ObjectInitialiser members } objectLiteralBody = TERMINDENT members:objectLiteralMemberList DEDENT { members } @@ -873,20 +872,20 @@ objectLiteral objectLiteralMember = implicitObjectLiteralMember / v:contextVar { - key = @p new @CS.String(v.memberName).g() - @rp new @CS.ObjectInitialiserMember key, v + key = p new CS.String(v.memberName).g() + rp new CS.ObjectInitialiserMember key, v } / v:ObjectInitialiserKeys { - @rp new @CS.ObjectInitialiserMember v, v + rp new CS.ObjectInitialiserMember v, v } ObjectInitialiserKeys - = i:identifierName { @rp new @CS.Identifier i } + = i:identifierName { rp new CS.Identifier i } / string / Numbers implicitObjectLiteral = members:implicitObjectLiteralMemberList { - @rp new @CS.ObjectInitialiser members + rp new CS.ObjectInitialiser members } implicitObjectLiteralMemberList = e:implicitObjectLiteralMember es:(implicitObjectLiteralMemberSeparator e:implicitObjectLiteralMember { e })* { @@ -897,7 +896,7 @@ implicitObjectLiteral / _ "," TERMINATOR? _ implicitObjectLiteralMember = key:ObjectInitialiserKeys _ ":" _ val:implicitObjectLiteralMemberValue { - @rp new @CS.ObjectInitialiserMember key, val + rp new CS.ObjectInitialiserMember key, val } implicitObjectLiteralMemberValue = singleLineImplicitObjectLiteral @@ -905,7 +904,7 @@ implicitObjectLiteral / TERMINDENT o:expression DEDENT { o } singleLineImplicitObjectLiteral = members:singleLineImplicitObjectLiteralMemberList { - @rp new @CS.ObjectInitialiser members + rp new CS.ObjectInitialiser members } singleLineImplicitObjectLiteralMemberList = e:implicitObjectLiteralMember es:(singleLineImplicitObjectLiteralMemberSeparator e:implicitObjectLiteralMember { e })* { @@ -916,25 +915,25 @@ singleLineImplicitObjectLiteral macro - = "__LINE__" { @rp new @CS.Int line() } - / "__FILENAME__" { @rp new @CS.String options.inputSource ? "" } - / "__DATE__" { @rp new @CS.String (new Date).toDateString()[4..] } - / "__TIME__" { @rp new @CS.String (new Date).toTimeString()[0...8] } - / "__DATETIMEMS__" { @rp new @CS.Int +new Date } - / "__COFFEE_VERSION__" { @rp new @CS.String (require '../package.json').version } + = "__LINE__" { rp new CS.Int line() } + / "__FILENAME__" { rp new CS.String options.inputSource ? "" } + / "__DATE__" { rp new CS.String (new Date).toDateString()[4..] } + / "__TIME__" { rp new CS.String (new Date).toTimeString()[0...8] } + / "__DATETIMEMS__" { rp new CS.Int +new Date } + / "__COFFEE_VERSION__" { rp new CS.String (require '../package.json').version } bool - = (TRUE / YES / ON) { @rp new @CS.Bool true } - / (FALSE / NO / OFF) { @rp new @CS.Bool false } + = (TRUE / YES / ON) { rp new CS.Bool true } + / (FALSE / NO / OFF) { rp new CS.Bool false } Numbers - = "0b" bs:$(bit+) { @rp new @CS.Int parseInt bs, 2 } - / "0o" os:$(octalDigit+) { @rp new @CS.Int parseInt os, 8 } - / "0x" hs:$(hexDigit+) { @rp new @CS.Int parseInt hs, 16 } + = "0b" bs:$(bit+) { rp new CS.Int parseInt bs, 2 } + / "0o" os:$(octalDigit+) { rp new CS.Int parseInt os, 8 } + / "0x" hs:$(hexDigit+) { rp new CS.Int parseInt hs, 16 } / base:decimal e:[eE] sign:[+-]? exponent:decimal { - @rp new @CS.Float parseFloat "#{base.data}#{e}#{sign ? ''}#{exponent.data}" + rp new CS.Float parseFloat "#{base.data}#{e}#{sign ? ''}#{exponent.data}" } / decimal @@ -942,9 +941,9 @@ decimal // trailing and leading radix points are discouraged anyway = integral:integer fractional:$("." decimalDigit+)? { if fractional - @rp new @CS.Float parseFloat integral + fractional + rp new CS.Float parseFloat integral + fractional else - @rp new @CS.Int +integral + rp new CS.Int +integral } integer @@ -959,13 +958,13 @@ bit = [01] string = "\"\"\"" d:(stringData / "'" / $("\"" "\""? !"\""))+ "\"\"\"" { - @rp new @CS.String @stripLeadingWhitespace d.join '' + rp new CS.String stripLeadingWhitespace d.join '' } / "'''" d:(stringData / "\"" / "#" / $("'" "'"? !"'"))+ "'''" { - @rp new @CS.String @stripLeadingWhitespace d.join '' + rp new CS.String stripLeadingWhitespace d.join '' } - / "\"" d:(stringData / "'")* "\"" { @rp new @CS.String d.join '' } - / "'" d:(stringData / "\"" / "#")* "'" { @rp new @CS.String d.join '' } + / "\"" d:(stringData / "'")* "\"" { rp new CS.String d.join '' } + / "'" d:(stringData / "\"" / "#")* "'" { rp new CS.String d.join '' } stringData = [^"'\\#] / UnicodeEscapeSequence @@ -983,35 +982,35 @@ string interpolation = "\"\"\"" es: - ( d:(stringData / "'" / s:$("\"" "\""? !"\""))+ { @rp new @CS.String d.join '' } + ( d:(stringData / "'" / s:$("\"" "\""? !"\""))+ { rp new CS.String d.join '' } / "#{" _ e:expression _ "}" { e } )+ "\"\"\"" { - @rp @createInterpolation @stripLeadingWhitespaceInterpolation es + rp createInterpolation stripLeadingWhitespaceInterpolation es } / "\"" es: - ( d:(stringData / "'")+ { @rp new @CS.String d.join '' } + ( d:(stringData / "'")+ { rp new CS.String d.join '' } / "#{" _ e:expression _ "}" { e } )+ "\"" { - @rp @createInterpolation es + rp createInterpolation es } regexp = "///" es: - ( [ \r\n]+ { [@rp new @CS.String('').g()] } - / s:$[^\\/#[ \r\n]+ { [@rp (new @CS.String s).g()] } + ( [ \r\n]+ { [rp new CS.String('').g()] } + / s:$[^\\/#[ \r\n]+ { [rp (new CS.String s).g()] } / hereregexpData )+ "///" flags:[gimy]* { - unless @isValidRegExpFlags flags + unless isValidRegExpFlags flags throw new SyntaxError ['regular expression flags'], 'regular expression flags', offset(), line(), column() - interp = @createInterpolation @foldl ((memo, e) -> memo.concat(e)), [], es - return @p new @CS.RegExp interp.data, flags if interp instanceof @CS.String - @rp new @CS.HeregExp interp, flags + interp = createInterpolation foldl ((memo, e) -> memo.concat(e)), [], es + return p new CS.RegExp interp.data, flags if interp instanceof CS.String + rp new CS.HeregExp interp, flags } / "/" d:$(regexpData / [^/\\[\n]+)* "/" flags:[gimy]* { - unless @isValidRegExpFlags flags + unless isValidRegExpFlags flags throw new SyntaxError ['regular expression flags'], 'regular expression flags', offset(), line(), column() - @rp new @CS.RegExp d, flags + rp new CS.RegExp d, flags } regexpData = "[" ([^\\\]\n] / regexpData)* "]" @@ -1019,24 +1018,24 @@ regexp hereregexpData = "[" d: ( h:hereregexpData { h[0] } - / s:[^\\/\]] { @p new @CS.String s } + / s:[^\\/\]] { p new CS.String s } )* "]" { - [(@p new @CS.String "["), d..., (@p new @CS.String "]")] + [(p new CS.String "["), d..., (p new CS.String "]")] } - / d:$("\\" .) { [@rp new @CS.String d] } - / s:$("/" "/"? !"/") { [@rp new @CS.String s] } - / c:"#" !"{" { [@rp new @CS.String c] } + / d:$("\\" .) { [rp new CS.String d] } + / s:$("/" "/"? !"/") { [rp new CS.String s] } + / c:"#" !"{" { [rp new CS.String c] } / "#{" _ e:expression _ "}" { [e] } -throw = THROW _ e:secondaryExpression { @rp new @CS.Throw e } -return = RETURN _ e:secondaryExpression? { @rp new @CS.Return e } -continue = CONTINUE { @rp new @CS.Continue } -break = BREAK { @rp new @CS.Break } -debugger = DEBUGGER { @rp new @CS.Debugger } +throw = THROW _ e:secondaryExpression { rp new CS.Throw e } +return = RETURN _ e:secondaryExpression? { rp new CS.Return e } +continue = CONTINUE { rp new CS.Continue } +break = BREAK { rp new CS.Break } +debugger = DEBUGGER { rp new CS.Debugger } -undefined = UNDEFINED { @rp new @CS.Undefined } -null = NULL { @rp new @CS.Null } +undefined = UNDEFINED { rp new CS.Undefined } +null = NULL { rp new CS.Null } unassignable = ("arguments" / "eval") !identifierPart @@ -1053,7 +1052,7 @@ Assignable positionalDestructuring = "[" members:positionalDestructuringBody TERMINATOR? _ "]" { - @rp new @CS.ArrayInitialiser members + rp new CS.ArrayInitialiser members } positionalDestructuringBody = TERMINDENT members:positionalDestructuringMemberList DEDENT { members } @@ -1066,7 +1065,7 @@ positionalDestructuring namedDestructuring = "{" members:namedDestructuringBody TERMINATOR? _ "}" { - @rp new @CS.ObjectInitialiser members + rp new CS.ObjectInitialiser members } namedDestructuringBody = TERMINDENT members:namedDestructuringMemberList DEDENT { members } @@ -1077,18 +1076,18 @@ namedDestructuring } namedDestructuringMember = key:ObjectInitialiserKeys _ ":" _ val:Assignable { - @rp new @CS.ObjectInitialiserMember key, val + rp new CS.ObjectInitialiserMember key, val } / v:contextVar { - key = @rp new @CS.String v.memberName - @rp new @CS.ObjectInitialiserMember key, v + key = rp new CS.String v.memberName + rp new CS.ObjectInitialiserMember key, v } / !unassignable i:identifier { - @rp new @CS.ObjectInitialiserMember i, i + rp new CS.ObjectInitialiserMember i, i } -identifier = !reserved i:identifierName { @rp new @CS.Identifier i } +identifier = !reserved i:identifierName { rp new CS.Identifier i } identifierName = $(identifierStart identifierPart*) identifierStart = UnicodeLetter diff --git a/src/pegjs-coffee-plugin.coffee b/src/pegjs-coffee-plugin.coffee new file mode 100644 index 00000000..0a09dd9c --- /dev/null +++ b/src/pegjs-coffee-plugin.coffee @@ -0,0 +1,23 @@ +CoffeeScript = require './module' +eachCode = require 'pegjs-each-code' + +compile = (csCode, options = {}) -> + csAST = CoffeeScript.parse "-> #{csCode.trimRight()}" + if csAST.body.statements.length > 1 + throw new Error "inconsistent base indentation" + jsAST = CoffeeScript.compile csAST, bare: yes, inScope: options.inScope + jsAST.leadingComments = [] + jsAST.body = jsAST.body[0].expression.body.body.concat jsAST.body[1..] + CoffeeScript.js jsAST + +exports.use = (config) -> + config.passes.transform.unshift (ast) -> + ast.initializer.code = CoffeeScript.cs2js ast.initializer.code, bare: yes + eachCode ast, (node, labels, ruleName) -> + try + node.code = compile node.code, inScope: labels + catch error + throw new Error """ + In the '#{ruleName}' rule: + #{error.message} + """