Skip to content

Instantly share code, notes, and snippets.

@gfranko gfranko/index.js
Created Feb 11, 2014

Embed
What would you like to do?
requirebin sketch
// Node.js Environment
var code = 'function jqcon() {}',
esprima = require('esprima'),
ast = esprima.parse(code);
console.log('ast', ast);
require=function e(t,r,n){function a(o,l){if(!r[o]){if(!t[o]){var s="function"==typeof require&&require;if(!l&&s)return s(o,!0);if(i)return i(o,!0);throw Error("Cannot find module '"+o+"'")}var u=r[o]={exports:{}};t[o][0].call(u.exports,function(e){var r=t[o][1][e];return a(r?r:e)},u,u.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;n.length>o;o++)a(n[o]);return a}({"ic/jtS":[function(e,t,r){(function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):r!==void 0?t(r):t(e.esprima={})})(this,function(e){"use strict";function t(e,t){if(!e)throw Error("ASSERT: "+t)}function r(e,t){return fr.slice(e,t)}function n(e){return"0123456789".indexOf(e)>=0}function a(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return" "===e||" "===e||" "===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" ᠎              ".indexOf(e)>=0}function l(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function s(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e.charCodeAt(0)>=128&&cr.NonAsciiIdentifierStart.test(e)}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&cr.NonAsciiIdentifierPart.test(e)}function p(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function c(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function f(e){return"eval"===e||"arguments"===e}function d(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":return!0;case"yield":case"let":return!0}return dr&&c(e)?!0:p(e)}function m(){var e,t,r;for(t=!1,r=!1;gr>mr;)if(e=fr[mr],r)e=fr[mr++],l(e)&&(r=!1,"\r"===e&&"\n"===fr[mr]&&++mr,++yr,vr=mr);else if(t)l(e)?("\r"===e&&"\n"===fr[mr+1]&&++mr,++yr,++mr,vr=mr,mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL")):(e=fr[mr++],mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL"),"*"===e&&(e=fr[mr],"/"===e&&(++mr,t=!1)));else if("/"===e)if(e=fr[mr+1],"/"===e)mr+=2,r=!0;else{if("*"!==e)break;mr+=2,t=!0,mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL")}else if(o(e))++mr;else{if(!l(e))break;++mr,"\r"===e&&"\n"===fr[mr]&&++mr,++yr,vr=mr}}function y(e){var t,r,n,i=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(gr>mr&&a(fr[mr])))return"";n=fr[mr++],i=16*i+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(i)}function v(){var e,t,r,n;if(e=fr[mr],s(e)){if(t=mr,"\\"===e){if(++mr,"u"!==fr[mr])return;if(++mr,n=mr,e=y("u")){if("\\"===e||!s(e))return;r=e}else mr=n,r="u"}else r=fr[mr++];for(;gr>mr&&(e=fr[mr],u(e));)if("\\"===e){if(++mr,"u"!==fr[mr])return;if(++mr,n=mr,e=y("u")){if("\\"===e||!u(e))return;r+=e}else mr=n,r+="u"}else r+=fr[mr++];return 1===r.length?{type:or.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,mr]}:d(r)?{type:or.Keyword,value:r,lineNumber:yr,lineStart:vr,range:[t,mr]}:"null"===r?{type:or.NullLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,mr]}:"true"===r||"false"===r?{type:or.BooleanLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,mr]}:{type:or.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,mr]}}}function g(){var e,t,r,a=mr,i=fr[mr];return";"===i||"{"===i||"}"===i?(++mr,{type:or.Punctuator,value:i,lineNumber:yr,lineStart:vr,range:[a,mr]}):","===i||"("===i||")"===i?(++mr,{type:or.Punctuator,value:i,lineNumber:yr,lineStart:vr,range:[a,mr]}):(e=fr[mr+1],"."!==i||n(e)?(t=fr[mr+2],r=fr[mr+3],">"===i&&">"===e&&">"===t&&"="===r?(mr+=4,{type:or.Punctuator,value:">>>=",lineNumber:yr,lineStart:vr,range:[a,mr]}):"="===i&&"="===e&&"="===t?(mr+=3,{type:or.Punctuator,value:"===",lineNumber:yr,lineStart:vr,range:[a,mr]}):"!"===i&&"="===e&&"="===t?(mr+=3,{type:or.Punctuator,value:"!==",lineNumber:yr,lineStart:vr,range:[a,mr]}):">"===i&&">"===e&&">"===t?(mr+=3,{type:or.Punctuator,value:">>>",lineNumber:yr,lineStart:vr,range:[a,mr]}):"<"===i&&"<"===e&&"="===t?(mr+=3,{type:or.Punctuator,value:"<<=",lineNumber:yr,lineStart:vr,range:[a,mr]}):">"===i&&">"===e&&"="===t?(mr+=3,{type:or.Punctuator,value:">>=",lineNumber:yr,lineStart:vr,range:[a,mr]}):"="===e&&"<>=!+-*%&|^/".indexOf(i)>=0?(mr+=2,{type:or.Punctuator,value:i+e,lineNumber:yr,lineStart:vr,range:[a,mr]}):i===e&&"+-<>&|".indexOf(i)>=0&&"+-<>&|".indexOf(e)>=0?(mr+=2,{type:or.Punctuator,value:i+e,lineNumber:yr,lineStart:vr,range:[a,mr]}):"[]<>+-*%&|^!~?:=/".indexOf(i)>=0?{type:or.Punctuator,value:fr[mr++],lineNumber:yr,lineStart:vr,range:[a,mr]}:void 0):{type:or.Punctuator,value:fr[mr++],lineNumber:yr,lineStart:vr,range:[a,mr]})}function x(){var e,r,o;if(o=fr[mr],t(n(o)||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=mr,e="","."!==o){if(e=fr[mr++],o=fr[mr],"0"===e){if("x"===o||"X"===o){for(e+=fr[mr++];gr>mr&&(o=fr[mr],a(o));)e+=fr[mr++];return 2>=e.length&&k({},pr.UnexpectedToken,"ILLEGAL"),gr>mr&&(o=fr[mr],s(o)&&k({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseInt(e,16),lineNumber:yr,lineStart:vr,range:[r,mr]}}if(i(o)){for(e+=fr[mr++];gr>mr&&(o=fr[mr],i(o));)e+=fr[mr++];return gr>mr&&(o=fr[mr],(s(o)||n(o))&&k({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:yr,lineStart:vr,range:[r,mr]}}n(o)&&k({},pr.UnexpectedToken,"ILLEGAL")}for(;gr>mr&&(o=fr[mr],n(o));)e+=fr[mr++]}if("."===o)for(e+=fr[mr++];gr>mr&&(o=fr[mr],n(o));)e+=fr[mr++];if("e"===o||"E"===o)if(e+=fr[mr++],o=fr[mr],("+"===o||"-"===o)&&(e+=fr[mr++]),o=fr[mr],n(o))for(e+=fr[mr++];gr>mr&&(o=fr[mr],n(o));)e+=fr[mr++];else o="character "+o,mr>=gr&&(o="<end>"),k({},pr.UnexpectedToken,"ILLEGAL");return gr>mr&&(o=fr[mr],s(o)&&k({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseFloat(e),lineNumber:yr,lineStart:vr,range:[r,mr]}}function S(){var e,r,n,a,o,s,u="",p=!1;for(e=fr[mr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=mr,++mr;gr>mr;){if(n=fr[mr++],n===e){e="";break}if("\\"===n)if(n=fr[mr++],l(n))++yr,"\r"===n&&"\n"===fr[mr]&&++mr;else switch(n){case"n":u+="\n";break;case"r":u+="\r";break;case"t":u+=" ";break;case"u":case"x":s=mr,o=y(n),o?u+=o:(mr=s,u+=n);break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+=" ";break;default:i(n)?(a="01234567".indexOf(n),0!==a&&(p=!0),gr>mr&&i(fr[mr])&&(p=!0,a=8*a+"01234567".indexOf(fr[mr++]),"0123".indexOf(n)>=0&&gr>mr&&i(fr[mr])&&(a=8*a+"01234567".indexOf(fr[mr++]))),u+=String.fromCharCode(a)):u+=n}else{if(l(n))break;u+=n}}return""!==e&&k({},pr.UnexpectedToken,"ILLEGAL"),{type:or.StringLiteral,value:u,octal:p,lineNumber:yr,lineStart:vr,range:[r,mr]}}function h(){var e,r,n,a,i,o,s,p=!1,c=!1;for(xr=null,m(),n=mr,r=fr[mr],t("/"===r,"Regular expression literal must start with a slash"),e=fr[mr++];gr>mr;)if(r=fr[mr++],e+=r,"\\"===r)r=fr[mr++],l(r)&&k({},pr.UnterminatedRegExp),e+=r;else if(p)"]"===r&&(p=!1);else{if("/"===r){c=!0;break}"["===r?p=!0:l(r)&&k({},pr.UnterminatedRegExp)}for(c||k({},pr.UnterminatedRegExp),a=e.substr(1,e.length-2),i="";gr>mr&&(r=fr[mr],u(r));)if(++mr,"\\"===r&&gr>mr)if(r=fr[mr],"u"===r)if(++mr,s=mr,r=y("u"))for(i+=r,e+="\\u";mr>s;++s)e+=fr[s];else mr=s,i+="u",e+="\\u";else e+="\\";else i+=r,e+=r;try{o=RegExp(a,i)}catch(f){k({},pr.InvalidRegExp)}return{literal:e,value:o,range:[n,mr]}}function b(e){return e.type===or.Identifier||e.type===or.Keyword||e.type===or.BooleanLiteral||e.type===or.NullLiteral}function E(){var e,t;return m(),mr>=gr?{type:or.EOF,lineNumber:yr,lineStart:vr,range:[mr,mr]}:(t=g(),t!==void 0?t:(e=fr[mr],"'"===e||'"'===e?S():"."===e||n(e)?x():(t=v(),t!==void 0?t:(k({},pr.UnexpectedToken,"ILLEGAL"),void 0))))}function w(){var e;return xr?(mr=xr.range[1],yr=xr.lineNumber,vr=xr.lineStart,e=xr,xr=null,e):(xr=null,E())}function L(){var e,t,r;return null!==xr?xr:(e=mr,t=yr,r=vr,xr=E(),mr=e,yr=t,vr=r,xr)}function I(){var e,t,r,n;return e=mr,t=yr,r=vr,m(),n=yr!==t,mr=e,yr=t,vr=r,n}function k(e,t){var r,n=Array.prototype.slice.call(arguments,2),a=t.replace(/%(\d)/g,function(e,t){return n[t]||""});throw"number"==typeof e.lineNumber?(r=Error("Line "+e.lineNumber+": "+a),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-vr+1):(r=Error("Line "+yr+": "+a),r.index=mr,r.lineNumber=yr,r.column=mr-vr+1),r}function P(){try{k.apply(null,arguments)}catch(e){if(!hr.errors)throw e;hr.errors.push(e)}}function N(e){if(e.type===or.EOF&&k(e,pr.UnexpectedEOS),e.type===or.NumericLiteral&&k(e,pr.UnexpectedNumber),e.type===or.StringLiteral&&k(e,pr.UnexpectedString),e.type===or.Identifier&&k(e,pr.UnexpectedIdentifier),e.type===or.Keyword){if(p(e.value))k(e,pr.UnexpectedReserved);else if(dr&&c(e.value))return P(e,pr.StrictReservedWord),void 0;k(e,pr.UnexpectedToken,e.value)}k(e,pr.UnexpectedToken,e.value)}function O(e){var t=w();(t.type!==or.Punctuator||t.value!==e)&&N(t)}function C(e){var t=w();(t.type!==or.Keyword||t.value!==e)&&N(t)}function A(e){var t=L();return t.type===or.Punctuator&&t.value===e}function D(e){var t=L();return t.type===or.Keyword&&t.value===e}function F(){var e=L(),t=e.value;return e.type!==or.Punctuator?!1:"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t}function R(){var e,t;if(";"===fr[mr])return w(),void 0;if(t=yr,m(),yr===t){if(A(";"))return w(),void 0;e=L(),e.type===or.EOF||A("}")||N(e)}}function U(e){return e.type===sr.Identifier||e.type===sr.MemberExpression}function B(){var e=[];for(O("[");!A("]");)A(",")?(w(),e.push(null)):(e.push(ut()),A("]")||O(","));return O("]"),{type:sr.ArrayExpression,elements:e}}function j(e,t){var r,n;return r=dr,n=Bt(),t&&dr&&f(e[0].name)&&P(t,pr.StrictParamName),dr=r,{type:sr.FunctionExpression,id:null,params:e,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function T(){var e=w();return e.type===or.StringLiteral||e.type===or.NumericLiteral?(dr&&e.octal&&P(e,pr.StrictOctalLiteral),Zt(e)):{type:sr.Identifier,name:e.value}}function M(){var e,t,r,n;return e=L(),e.type===or.Identifier?(r=T(),"get"!==e.value||A(":")?"set"!==e.value||A(":")?(O(":"),{type:sr.Property,key:r,value:ut(),kind:"init"}):(t=T(),O("("),e=L(),e.type!==or.Identifier?(O(")"),P(e,pr.UnexpectedToken,e.value),{type:sr.Property,key:t,value:j([]),kind:"set"}):(n=[dt()],O(")"),{type:sr.Property,key:t,value:j(n,e),kind:"set"})):(t=T(),O("("),O(")"),{type:sr.Property,key:t,value:j([]),kind:"get"})):e.type!==or.EOF&&e.type!==or.Punctuator?(t=T(),O(":"),{type:sr.Property,key:t,value:ut(),kind:"init"}):(N(e),void 0)}function G(){var e,t,r,n=[],a={},i=String;for(O("{");!A("}");)e=M(),t=e.key.type===sr.Identifier?e.key.name:i(e.key.value),r="init"===e.kind?ur.Data:"get"===e.kind?ur.Get:ur.Set,Object.prototype.hasOwnProperty.call(a,t)?(a[t]===ur.Data?dr&&r===ur.Data?P({},pr.StrictDuplicateProperty):r!==ur.Data&&P({},pr.AccessorDataProperty):r===ur.Data?P({},pr.AccessorDataProperty):a[t]&r&&P({},pr.AccessorGetSet),a[t]|=r):a[t]=r,n.push(e),A("}")||O(",");return O("}"),{type:sr.ObjectExpression,properties:n}}function V(){var e;return O("("),e=pt(),O(")"),e}function q(){var e=L(),t=e.type;if(t===or.Identifier)return{type:sr.Identifier,name:w().value};if(t===or.StringLiteral||t===or.NumericLiteral)return dr&&e.octal&&P(e,pr.StrictOctalLiteral),Zt(w());if(t===or.Keyword){if(D("this"))return w(),{type:sr.ThisExpression};if(D("function"))return Tt()}return t===or.BooleanLiteral?(w(),e.value="true"===e.value,Zt(e)):t===or.NullLiteral?(w(),e.value=null,Zt(e)):A("[")?B():A("{")?G():A("(")?V():A("/")||A("/=")?Zt(h()):N(w())}function H(){var e=[];if(O("("),!A(")"))for(;gr>mr&&(e.push(ut()),!A(")"));)O(",");return O(")"),e}function W(){var e=w();return b(e)||N(e),{type:sr.Identifier,name:e.value}}function K(){return O("."),W()}function z(){var e;return O("["),e=pt(),O("]"),e}function X(){var e;return C("new"),e={type:sr.NewExpression,callee:$(),arguments:[]},A("(")&&(e.arguments=H()),e}function Z(){var e;for(e=D("new")?X():q();A(".")||A("[")||A("(");)e=A("(")?{type:sr.CallExpression,callee:e,arguments:H()}:A("[")?{type:sr.MemberExpression,computed:!0,object:e,property:z()}:{type:sr.MemberExpression,computed:!1,object:e,property:K()};return e}function $(){var e;for(e=D("new")?X():q();A(".")||A("[");)e=A("[")?{type:sr.MemberExpression,computed:!0,object:e,property:z()}:{type:sr.MemberExpression,computed:!1,object:e,property:K()};return e}function _(){var e,t=Z();return e=L(),e.type!==or.Punctuator?t:(!A("++")&&!A("--")||I()||(dr&&t.type===sr.Identifier&&f(t.name)&&P({},pr.StrictLHSPostfix),U(t)||P({},pr.InvalidLHSInAssignment),t={type:sr.UpdateExpression,operator:w().value,argument:t,prefix:!1}),t)}function J(){var e,t;return e=L(),e.type!==or.Punctuator&&e.type!==or.Keyword?_():A("++")||A("--")?(e=w(),t=J(),dr&&t.type===sr.Identifier&&f(t.name)&&P({},pr.StrictLHSPrefix),U(t)||P({},pr.InvalidLHSInAssignment),t={type:sr.UpdateExpression,operator:e.value,argument:t,prefix:!0}):A("+")||A("-")||A("~")||A("!")?t={type:sr.UnaryExpression,operator:w().value,argument:J(),prefix:!0}:D("delete")||D("void")||D("typeof")?(t={type:sr.UnaryExpression,operator:w().value,argument:J(),prefix:!0},dr&&"delete"===t.operator&&t.argument.type===sr.Identifier&&P({},pr.StrictDelete),t):_()}function Q(){for(var e=J();A("*")||A("/")||A("%");)e={type:sr.BinaryExpression,operator:w().value,left:e,right:J()};return e}function Y(){for(var e=Q();A("+")||A("-");)e={type:sr.BinaryExpression,operator:w().value,left:e,right:Q()};return e}function et(){for(var e=Y();A("<<")||A(">>")||A(">>>");)e={type:sr.BinaryExpression,operator:w().value,left:e,right:Y()};return e}function tt(){var e,t;for(t=Sr.allowIn,Sr.allowIn=!0,e=et();A("<")||A(">")||A("<=")||A(">=")||t&&D("in")||D("instanceof");)e={type:sr.BinaryExpression,operator:w().value,left:e,right:et()};return Sr.allowIn=t,e}function rt(){for(var e=tt();A("==")||A("!=")||A("===")||A("!==");)e={type:sr.BinaryExpression,operator:w().value,left:e,right:tt()};return e}function nt(){for(var e=rt();A("&");)w(),e={type:sr.BinaryExpression,operator:"&",left:e,right:rt()};return e}function at(){for(var e=nt();A("^");)w(),e={type:sr.BinaryExpression,operator:"^",left:e,right:nt()};return e}function it(){for(var e=at();A("|");)w(),e={type:sr.BinaryExpression,operator:"|",left:e,right:at()};return e}function ot(){for(var e=it();A("&&");)w(),e={type:sr.LogicalExpression,operator:"&&",left:e,right:it()};return e}function lt(){for(var e=ot();A("||");)w(),e={type:sr.LogicalExpression,operator:"||",left:e,right:ot()};return e}function st(){var e,t,r;return e=lt(),A("?")&&(w(),t=Sr.allowIn,Sr.allowIn=!0,r=ut(),Sr.allowIn=t,O(":"),e={type:sr.ConditionalExpression,test:e,consequent:r,alternate:ut()}),e}function ut(){var e,t;return e=L(),t=st(),F()&&(U(t)||P({},pr.InvalidLHSInAssignment),dr&&t.type===sr.Identifier&&f(t.name)&&P(e,pr.StrictLHSAssignment),t={type:sr.AssignmentExpression,operator:w().value,left:t,right:ut()}),t}function pt(){var e=ut();if(A(","))for(e={type:sr.SequenceExpression,expressions:[e]};gr>mr&&A(",");)w(),e.expressions.push(ut());return e}function ct(){for(var e,t=[];gr>mr&&!A("}")&&(e=Mt(),void 0!==e);)t.push(e);return t}function ft(){var e;return O("{"),e=ct(),O("}"),{type:sr.BlockStatement,body:e}}function dt(){var e=w();return e.type!==or.Identifier&&N(e),{type:sr.Identifier,name:e.value}}function mt(e){var t=dt(),r=null;return dr&&f(t.name)&&P({},pr.StrictVarName),"const"===e?(O("="),r=ut()):A("=")&&(w(),r=ut()),{type:sr.VariableDeclarator,id:t,init:r}}function yt(e){var t=[];do{if(t.push(mt(e)),!A(","))break;w()}while(gr>mr);return t}function vt(){var e;return C("var"),e=yt(),R(),{type:sr.VariableDeclaration,declarations:e,kind:"var"}}function gt(e){var t;return C(e),t=yt(e),R(),{type:sr.VariableDeclaration,declarations:t,kind:e}}function xt(){return O(";"),{type:sr.EmptyStatement}}function St(){var e=pt();return R(),{type:sr.ExpressionStatement,expression:e}}function ht(){var e,t,r;return C("if"),O("("),e=pt(),O(")"),t=Ut(),D("else")?(w(),r=Ut()):r=null,{type:sr.IfStatement,test:e,consequent:t,alternate:r}}function bt(){var e,t,r;return C("do"),r=Sr.inIteration,Sr.inIteration=!0,e=Ut(),Sr.inIteration=r,C("while"),O("("),t=pt(),O(")"),A(";")&&w(),{type:sr.DoWhileStatement,body:e,test:t}}function Et(){var e,t,r;return C("while"),O("("),e=pt(),O(")"),r=Sr.inIteration,Sr.inIteration=!0,t=Ut(),Sr.inIteration=r,{type:sr.WhileStatement,test:e,body:t}}function wt(){var e=w();return{type:sr.VariableDeclaration,declarations:yt(),kind:e.value}}function Lt(){var e,t,r,n,a,i,o;return e=t=r=null,C("for"),O("("),A(";")?w():(D("var")||D("let")?(Sr.allowIn=!1,e=wt(),Sr.allowIn=!0,1===e.declarations.length&&D("in")&&(w(),n=e,a=pt(),e=null)):(Sr.allowIn=!1,e=pt(),Sr.allowIn=!0,D("in")&&(U(e)||P({},pr.InvalidLHSInForIn),w(),n=e,a=pt(),e=null)),n===void 0&&O(";")),n===void 0&&(A(";")||(t=pt()),O(";"),A(")")||(r=pt())),O(")"),o=Sr.inIteration,Sr.inIteration=!0,i=Ut(),Sr.inIteration=o,n===void 0?{type:sr.ForStatement,init:e,test:t,update:r,body:i}:{type:sr.ForInStatement,left:n,right:a,body:i,each:!1}}function It(){var e,t=null;return C("continue"),";"===fr[mr]?(w(),Sr.inIteration||k({},pr.IllegalContinue),{type:sr.ContinueStatement,label:null}):I()?(Sr.inIteration||k({},pr.IllegalContinue),{type:sr.ContinueStatement,label:null}):(e=L(),e.type===or.Identifier&&(t=dt(),Object.prototype.hasOwnProperty.call(Sr.labelSet,t.name)||k({},pr.UnknownLabel,t.name)),R(),null!==t||Sr.inIteration||k({},pr.IllegalContinue),{type:sr.ContinueStatement,label:t})}function kt(){var e,t=null;return C("break"),";"===fr[mr]?(w(),Sr.inIteration||Sr.inSwitch||k({},pr.IllegalBreak),{type:sr.BreakStatement,label:null}):I()?(Sr.inIteration||Sr.inSwitch||k({},pr.IllegalBreak),{type:sr.BreakStatement,label:null}):(e=L(),e.type===or.Identifier&&(t=dt(),Object.prototype.hasOwnProperty.call(Sr.labelSet,t.name)||k({},pr.UnknownLabel,t.name)),R(),null!==t||Sr.inIteration||Sr.inSwitch||k({},pr.IllegalBreak),{type:sr.BreakStatement,label:t})}function Pt(){var e,t=null;return C("return"),Sr.inFunctionBody||P({},pr.IllegalReturn)," "===fr[mr]&&s(fr[mr+1])?(t=pt(),R(),{type:sr.ReturnStatement,argument:t}):I()?{type:sr.ReturnStatement,argument:null}:(A(";")||(e=L(),A("}")||e.type===or.EOF||(t=pt())),R(),{type:sr.ReturnStatement,argument:t})}function Nt(){var e,t;return dr&&P({},pr.StrictModeWith),C("with"),O("("),e=pt(),O(")"),t=Ut(),{type:sr.WithStatement,object:e,body:t}}function Ot(){var e,t,r=[];for(D("default")?(w(),e=null):(C("case"),e=pt()),O(":");gr>mr&&!(A("}")||D("default")||D("case"))&&(t=Ut(),void 0!==t);)r.push(t);return{type:sr.SwitchCase,test:e,consequent:r}}function Ct(){var e,t,r,n,a;if(C("switch"),O("("),e=pt(),O(")"),O("{"),t=[],A("}"))return w(),{type:sr.SwitchStatement,discriminant:e,cases:t};for(n=Sr.inSwitch,Sr.inSwitch=!0,a=!1;gr>mr&&!A("}");)r=Ot(),null===r.test&&(a&&k({},pr.MultipleDefaultsInSwitch),a=!0),t.push(r);return Sr.inSwitch=n,O("}"),{type:sr.SwitchStatement,discriminant:e,cases:t}}function At(){var e;return C("throw"),I()&&k({},pr.NewlineAfterThrow),e=pt(),R(),{type:sr.ThrowStatement,argument:e}}function Dt(){var e;return C("catch"),O("("),A(")")&&N(L()),e=dt(),dr&&f(e.name)&&P({},pr.StrictCatchVariable),O(")"),{type:sr.CatchClause,param:e,body:ft()}}function Ft(){var e,t=[],r=null;return C("try"),e=ft(),D("catch")&&t.push(Dt()),D("finally")&&(w(),r=ft()),0!==t.length||r||k({},pr.NoCatchOrFinally),{type:sr.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:r}}function Rt(){return C("debugger"),R(),{type:sr.DebuggerStatement}}function Ut(){var e,t,r=L();if(r.type===or.EOF&&N(r),r.type===or.Punctuator)switch(r.value){case";":return xt();case"{":return ft();case"(":return St();default:}if(r.type===or.Keyword)switch(r.value){case"break":return kt();case"continue":return It();case"debugger":return Rt();case"do":return bt();case"for":return Lt();case"function":return jt();case"if":return ht();case"return":return Pt();case"switch":return Ct();case"throw":return At();case"try":return Ft();case"var":return vt();case"while":return Et();case"with":return Nt();default:}return e=pt(),e.type===sr.Identifier&&A(":")?(w(),Object.prototype.hasOwnProperty.call(Sr.labelSet,e.name)&&k({},pr.Redeclaration,"Label",e.name),Sr.labelSet[e.name]=!0,t=Ut(),delete Sr.labelSet[e.name],{type:sr.LabeledStatement,label:e,body:t}):(R(),{type:sr.ExpressionStatement,expression:e})}function Bt(){var e,t,n,a,i,o,l,s,u=[];for(O("{");gr>mr&&(t=L(),t.type===or.StringLiteral)&&(e=Mt(),u.push(e),e.expression.type===sr.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(dr=!0,a&&P(a,pr.StrictOctalLiteral)):!a&&t.octal&&(a=t);for(i=Sr.labelSet,o=Sr.inIteration,l=Sr.inSwitch,s=Sr.inFunctionBody,Sr.labelSet={},Sr.inIteration=!1,Sr.inSwitch=!1,Sr.inFunctionBody=!0;gr>mr&&!A("}")&&(e=Mt(),void 0!==e);)u.push(e);return O("}"),Sr.labelSet=i,Sr.inIteration=o,Sr.inSwitch=l,Sr.inFunctionBody=s,{type:sr.BlockStatement,body:u}}function jt(){var e,t,r,n,a,i,o,l,s,u=[];if(C("function"),n=L(),e=dt(),dr?f(n.value)&&P(n,pr.StrictFunctionName):f(n.value)?(i=n,o=pr.StrictFunctionName):c(n.value)&&(i=n,o=pr.StrictReservedWord),O("("),!A(")"))for(s={};gr>mr&&(n=L(),t=dt(),dr?(f(n.value)&&(a=n,o=pr.StrictParamName),Object.prototype.hasOwnProperty.call(s,n.value)&&(a=n,o=pr.StrictParamDupe)):i||(f(n.value)?(i=n,o=pr.StrictParamName):c(n.value)?(i=n,o=pr.StrictReservedWord):Object.prototype.hasOwnProperty.call(s,n.value)&&(i=n,o=pr.StrictParamDupe)),u.push(t),s[t.name]=!0,!A(")"));)O(",");return O(")"),l=dr,r=Bt(),dr&&i&&k(i,o),dr&&a&&P(a,o),dr=l,{type:sr.FunctionDeclaration,id:e,params:u,defaults:[],body:r,rest:null,generator:!1,expression:!1}}function Tt(){var e,t,r,n,a,i,o,l,s=null,u=[];if(C("function"),A("(")||(e=L(),s=dt(),dr?f(e.value)&&P(e,pr.StrictFunctionName):f(e.value)?(r=e,n=pr.StrictFunctionName):c(e.value)&&(r=e,n=pr.StrictReservedWord)),O("("),!A(")"))for(l={};gr>mr&&(e=L(),a=dt(),dr?(f(e.value)&&(t=e,n=pr.StrictParamName),Object.prototype.hasOwnProperty.call(l,e.value)&&(t=e,n=pr.StrictParamDupe)):r||(f(e.value)?(r=e,n=pr.StrictParamName):c(e.value)?(r=e,n=pr.StrictReservedWord):Object.prototype.hasOwnProperty.call(l,e.value)&&(r=e,n=pr.StrictParamDupe)),u.push(a),l[a.name]=!0,!A(")"));)O(",");return O(")"),o=dr,i=Bt(),dr&&r&&k(r,n),dr&&t&&P(t,n),dr=o,{type:sr.FunctionExpression,id:s,params:u,defaults:[],body:i,rest:null,generator:!1,expression:!1}}function Mt(){var e=L();if(e.type===or.Keyword)switch(e.value){case"const":case"let":return gt(e.value);case"function":return jt();default:return Ut()}return e.type!==or.EOF?Ut():void 0}function Gt(){for(var e,t,n,a,i=[];gr>mr&&(t=L(),t.type===or.StringLiteral)&&(e=Mt(),i.push(e),e.expression.type===sr.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(dr=!0,a&&P(a,pr.StrictOctalLiteral)):!a&&t.octal&&(a=t);for(;gr>mr&&(e=Mt(),void 0!==e);)i.push(e);return i}function Vt(){var e;return dr=!1,e={type:sr.Program,body:Gt()}}function qt(e,r,n,a,i){t("number"==typeof n,"Comment must have valid position"),hr.comments.length>0&&hr.comments[hr.comments.length-1].range[1]>n||hr.comments.push({type:e,value:r,range:[n,a],loc:i})}function Ht(){var e,t,r,n,a,i;for(e="",a=!1,i=!1;gr>mr;)if(t=fr[mr],i)t=fr[mr++],l(t)?(r.end={line:yr,column:mr-vr-1},i=!1,qt("Line",e,n,mr-1,r),"\r"===t&&"\n"===fr[mr]&&++mr,++yr,vr=mr,e=""):mr>=gr?(i=!1,e+=t,r.end={line:yr,column:gr-vr},qt("Line",e,n,gr,r)):e+=t;else if(a)l(t)?("\r"===t&&"\n"===fr[mr+1]?(++mr,e+="\r\n"):e+=t,++yr,++mr,vr=mr,mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL")):(t=fr[mr++],mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=fr[mr],"/"===t&&(e=e.substr(0,e.length-1),a=!1,++mr,r.end={line:yr,column:mr-vr},qt("Block",e,n,mr,r),e="")));else if("/"===t)if(t=fr[mr+1],"/"===t)r={start:{line:yr,column:mr-vr}},n=mr,mr+=2,i=!0,mr>=gr&&(r.end={line:yr,column:mr-vr},i=!1,qt("Line",e,n,mr,r));else{if("*"!==t)break;n=mr,mr+=2,a=!0,r={start:{line:yr,column:mr-vr-2}},mr>=gr&&k({},pr.UnexpectedToken,"ILLEGAL")}else if(o(t))++mr;else{if(!l(t))break;++mr,"\r"===t&&"\n"===fr[mr]&&++mr,++yr,vr=mr}}function Wt(){var e,t,r,n=[];for(e=0;hr.comments.length>e;++e)t=hr.comments[e],r={type:t.type,value:t.value},hr.range&&(r.range=t.range),hr.loc&&(r.loc=t.loc),n.push(r);hr.comments=n}function Kt(){var e,t,n,a,i;return m(),e=mr,t={start:{line:yr,column:mr-vr}},n=hr.advance(),t.end={line:yr,column:mr-vr},n.type!==or.EOF&&(a=[n.range[0],n.range[1]],i=r(n.range[0],n.range[1]),hr.tokens.push({type:lr[n.type],value:i,range:a,loc:t})),n}function zt(){var e,t,r,n;return m(),e=mr,t={start:{line:yr,column:mr-vr}},r=hr.scanRegExp(),t.end={line:yr,column:mr-vr},hr.tokens.length>0&&(n=hr.tokens[hr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&hr.tokens.pop()),hr.tokens.push({type:"RegularExpression",value:r.literal,range:[e,mr],loc:t}),r}function Xt(){var e,t,r,n=[];for(e=0;hr.tokens.length>e;++e)t=hr.tokens[e],r={type:t.type,value:t.value},hr.range&&(r.range=t.range),hr.loc&&(r.loc=t.loc),n.push(r);hr.tokens=n}function Zt(e){return{type:sr.Literal,value:e.value}}function $t(e){return{type:sr.Literal,value:e.value,raw:r(e.range[0],e.range[1])}}function _t(){var e={};return e.range=[mr,mr],e.loc={start:{line:yr,column:mr-vr},end:{line:yr,column:mr-vr}},e.end=function(){this.range[1]=mr,this.loc.end.line=yr,this.loc.end.column=mr-vr},e.applyGroup=function(e){hr.range&&(e.groupRange=[this.range[0],this.range[1]]),hr.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){hr.range&&(e.range=[this.range[0],this.range[1]]),hr.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function Jt(){var e,t;return m(),e=_t(),O("("),t=pt(),O(")"),e.end(),e.applyGroup(t),t}function Qt(){var e,t;for(m(),e=_t(),t=D("new")?X():q();A(".")||A("[");)A("[")?(t={type:sr.MemberExpression,computed:!0,object:t,property:z()},e.end(),e.apply(t)):(t={type:sr.MemberExpression,computed:!1,object:t,property:K()},e.end(),e.apply(t));return t}function Yt(){var e,t;for(m(),e=_t(),t=D("new")?X():q();A(".")||A("[")||A("(");)A("(")?(t={type:sr.CallExpression,callee:t,arguments:H()},e.end(),e.apply(t)):A("[")?(t={type:sr.MemberExpression,computed:!0,object:t,property:z()},e.end(),e.apply(t)):(t={type:sr.MemberExpression,computed:!1,object:t,property:K()},e.end(),e.apply(t));return t}function er(e){var t,r,n;t="[object Array]"===Object.prototype.toString.apply(e)?[]:{};for(r in e)e.hasOwnProperty(r)&&"groupRange"!==r&&"groupLoc"!==r&&(n=e[r],t[r]=null===n||"object"!=typeof n||n instanceof RegExp?n:er(n));return t}function tr(e,t){return function(r){function n(e){return e.type===sr.LogicalExpression||e.type===sr.BinaryExpression}function a(r){var i,o;n(r.left)&&a(r.left),n(r.right)&&a(r.right),e&&(r.left.groupRange||r.right.groupRange?(i=r.left.groupRange?r.left.groupRange[0]:r.left.range[0],o=r.right.groupRange?r.right.groupRange[1]:r.right.range[1],r.range=[i,o]):r.range===void 0&&(i=r.left.range[0],o=r.right.range[1],r.range=[i,o])),t&&(r.left.groupLoc||r.right.groupLoc?(i=r.left.groupLoc?r.left.groupLoc.start:r.left.loc.start,o=r.right.groupLoc?r.right.groupLoc.end:r.right.loc.end,r.loc={start:i,end:o}):r.loc===void 0&&(r.loc={start:r.left.loc.start,end:r.right.loc.end}))}return function(){var i,o;return m(),i=_t(),o=r.apply(null,arguments),i.end(),e&&o.range===void 0&&i.apply(o),t&&o.loc===void 0&&i.apply(o),n(o)&&a(o),o}}}function rr(){var e;hr.comments&&(hr.skipComment=m,m=Ht),hr.raw&&(hr.createLiteral=Zt,Zt=$t),(hr.range||hr.loc)&&(hr.parseGroupExpression=V,hr.parseLeftHandSideExpression=$,hr.parseLeftHandSideExpressionAllowCall=Z,V=Jt,$=Qt,Z=Yt,e=tr(hr.range,hr.loc),hr.parseAdditiveExpression=Y,hr.parseAssignmentExpression=ut,hr.parseBitwiseANDExpression=nt,hr.parseBitwiseORExpression=it,hr.parseBitwiseXORExpression=at,hr.parseBlock=ft,hr.parseFunctionSourceElements=Bt,hr.parseCatchClause=Dt,hr.parseComputedMember=z,hr.parseConditionalExpression=st,hr.parseConstLetDeclaration=gt,hr.parseEqualityExpression=rt,hr.parseExpression=pt,hr.parseForVariableDeclaration=wt,hr.parseFunctionDeclaration=jt,hr.parseFunctionExpression=Tt,hr.parseLogicalANDExpression=ot,hr.parseLogicalORExpression=lt,hr.parseMultiplicativeExpression=Q,hr.parseNewExpression=X,hr.parseNonComputedProperty=W,hr.parseObjectProperty=M,hr.parseObjectPropertyKey=T,hr.parsePostfixExpression=_,hr.parsePrimaryExpression=q,hr.parseProgram=Vt,hr.parsePropertyFunction=j,hr.parseRelationalExpression=tt,hr.parseStatement=Ut,hr.parseShiftExpression=et,hr.parseSwitchCase=Ot,hr.parseUnaryExpression=J,hr.parseVariableDeclaration=mt,hr.parseVariableIdentifier=dt,Y=e(hr.parseAdditiveExpression),ut=e(hr.parseAssignmentExpression),nt=e(hr.parseBitwiseANDExpression),it=e(hr.parseBitwiseORExpression),at=e(hr.parseBitwiseXORExpression),ft=e(hr.parseBlock),Bt=e(hr.parseFunctionSourceElements),Dt=e(hr.parseCatchClause),z=e(hr.parseComputedMember),st=e(hr.parseConditionalExpression),gt=e(hr.parseConstLetDeclaration),rt=e(hr.parseEqualityExpression),pt=e(hr.parseExpression),wt=e(hr.parseForVariableDeclaration),jt=e(hr.parseFunctionDeclaration),Tt=e(hr.parseFunctionExpression),$=e($),ot=e(hr.parseLogicalANDExpression),lt=e(hr.parseLogicalORExpression),Q=e(hr.parseMultiplicativeExpression),X=e(hr.parseNewExpression),W=e(hr.parseNonComputedProperty),M=e(hr.parseObjectProperty),T=e(hr.parseObjectPropertyKey),_=e(hr.parsePostfixExpression),q=e(hr.parsePrimaryExpression),Vt=e(hr.parseProgram),j=e(hr.parsePropertyFunction),tt=e(hr.parseRelationalExpression),Ut=e(hr.parseStatement),et=e(hr.parseShiftExpression),Ot=e(hr.parseSwitchCase),J=e(hr.parseUnaryExpression),mt=e(hr.parseVariableDeclaration),dt=e(hr.parseVariableIdentifier)),hr.tokens!==void 0&&(hr.advance=E,hr.scanRegExp=h,E=Kt,h=zt)}function nr(){"function"==typeof hr.skipComment&&(m=hr.skipComment),hr.raw&&(Zt=hr.createLiteral),(hr.range||hr.loc)&&(Y=hr.parseAdditiveExpression,ut=hr.parseAssignmentExpression,nt=hr.parseBitwiseANDExpression,it=hr.parseBitwiseORExpression,at=hr.parseBitwiseXORExpression,ft=hr.parseBlock,Bt=hr.parseFunctionSourceElements,Dt=hr.parseCatchClause,z=hr.parseComputedMember,st=hr.parseConditionalExpression,gt=hr.parseConstLetDeclaration,rt=hr.parseEqualityExpression,pt=hr.parseExpression,wt=hr.parseForVariableDeclaration,jt=hr.parseFunctionDeclaration,Tt=hr.parseFunctionExpression,V=hr.parseGroupExpression,$=hr.parseLeftHandSideExpression,Z=hr.parseLeftHandSideExpressionAllowCall,ot=hr.parseLogicalANDExpression,lt=hr.parseLogicalORExpression,Q=hr.parseMultiplicativeExpression,X=hr.parseNewExpression,W=hr.parseNonComputedProperty,M=hr.parseObjectProperty,T=hr.parseObjectPropertyKey,q=hr.parsePrimaryExpression,_=hr.parsePostfixExpression,Vt=hr.parseProgram,j=hr.parsePropertyFunction,tt=hr.parseRelationalExpression,Ut=hr.parseStatement,et=hr.parseShiftExpression,Ot=hr.parseSwitchCase,J=hr.parseUnaryExpression,mt=hr.parseVariableDeclaration,dt=hr.parseVariableIdentifier),"function"==typeof hr.scanRegExp&&(E=hr.advance,h=hr.scanRegExp)}function ar(e){var t,r=e.length,n=[];for(t=0;r>t;++t)n[t]=e.charAt(t);return n}function ir(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),fr=e,mr=0,yr=fr.length>0?1:0,vr=0,gr=fr.length,xr=null,Sr={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},hr={},t!==void 0&&(hr.range="boolean"==typeof t.range&&t.range,hr.loc="boolean"==typeof t.loc&&t.loc,hr.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(hr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(hr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(hr.errors=[])),gr>0&&fr[0]===void 0&&(e instanceof String&&(fr=e.valueOf()),fr[0]===void 0&&(fr=ar(e))),rr();
try{r=Vt(),hr.comments!==void 0&&(Wt(),r.comments=hr.comments),hr.tokens!==void 0&&(Xt(),r.tokens=hr.tokens),hr.errors!==void 0&&(r.errors=hr.errors),(hr.range||hr.loc)&&(r.body=er(r.body))}catch(a){throw a}finally{nr(),hr={}}return r}var or,lr,sr,ur,pr,cr,fr,dr,mr,yr,vr,gr,xr,Sr,hr;or={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},lr={},lr[or.BooleanLiteral]="Boolean",lr[or.EOF]="<end>",lr[or.Identifier]="Identifier",lr[or.Keyword]="Keyword",lr[or.NullLiteral]="Null",lr[or.NumericLiteral]="Numeric",lr[or.Punctuator]="Punctuator",lr[or.StringLiteral]="String",sr={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},ur={Data:1,Get:2,Set:4},pr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},cr={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},"esprima"[0]===void 0&&(r=function(e,t){return fr.slice(e,t).join("")}),e.version="1.0.4",e.parse=ir,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in sr)sr.hasOwnProperty(e)&&(t[e]=sr[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})},{}],esprima:[function(e,t){t.exports=e("ic/jtS")},{}]},{},[]);var code="function jqcon() {}",esprima=require("esprima"),ast=esprima.parse(code);console.log("ast",ast);
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.