[
  {
    "__docId__": 1,
    "kind": "external",
    "name": "Infinity",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Infinity",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 2,
    "kind": "external",
    "name": "NaN",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~NaN",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 3,
    "kind": "external",
    "name": "undefined",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~undefined",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 4,
    "kind": "external",
    "name": "null",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~null",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 5,
    "kind": "external",
    "name": "Object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 6,
    "kind": "external",
    "name": "object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 7,
    "kind": "external",
    "name": "Function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 8,
    "kind": "external",
    "name": "function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 9,
    "kind": "external",
    "name": "Boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 10,
    "kind": "external",
    "name": "boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 11,
    "kind": "external",
    "name": "Symbol",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Symbol",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 12,
    "kind": "external",
    "name": "Error",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Error",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 13,
    "kind": "external",
    "name": "EvalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~EvalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 14,
    "kind": "external",
    "name": "InternalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~InternalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 15,
    "kind": "external",
    "name": "RangeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~RangeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 16,
    "kind": "external",
    "name": "ReferenceError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~ReferenceError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 17,
    "kind": "external",
    "name": "SyntaxError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~SyntaxError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 18,
    "kind": "external",
    "name": "TypeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~TypeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 19,
    "kind": "external",
    "name": "URIError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~URIError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 20,
    "kind": "external",
    "name": "Number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 21,
    "kind": "external",
    "name": "number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 22,
    "kind": "external",
    "name": "Date",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Date",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 23,
    "kind": "external",
    "name": "String",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~String",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 24,
    "kind": "external",
    "name": "string",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~string",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 25,
    "kind": "external",
    "name": "RegExp",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~RegExp",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 26,
    "kind": "external",
    "name": "Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 27,
    "kind": "external",
    "name": "Int8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Int8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 28,
    "kind": "external",
    "name": "Uint8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Uint8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 29,
    "kind": "external",
    "name": "Uint8ClampedArray",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Uint8ClampedArray",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 30,
    "kind": "external",
    "name": "Int16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Int16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 31,
    "kind": "external",
    "name": "Uint16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Uint16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 32,
    "kind": "external",
    "name": "Int32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Int32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 33,
    "kind": "external",
    "name": "Uint32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Uint32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 34,
    "kind": "external",
    "name": "Float32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Float32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 35,
    "kind": "external",
    "name": "Float64Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Float64Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 36,
    "kind": "external",
    "name": "Map",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Map",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 37,
    "kind": "external",
    "name": "Set",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Set",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 38,
    "kind": "external",
    "name": "WeakMap",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~WeakMap",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 39,
    "kind": "external",
    "name": "WeakSet",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~WeakSet",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 40,
    "kind": "external",
    "name": "ArrayBuffer",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~ArrayBuffer",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 41,
    "kind": "external",
    "name": "DataView",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~DataView",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 42,
    "kind": "external",
    "name": "JSON",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~JSON",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 43,
    "kind": "external",
    "name": "Promise",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Promise",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 44,
    "kind": "external",
    "name": "Generator",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Generator",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 45,
    "kind": "external",
    "name": "GeneratorFunction",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~GeneratorFunction",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 46,
    "kind": "external",
    "name": "Reflect",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Reflect",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 47,
    "kind": "external",
    "name": "Proxy",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
    "memberof": "lib/.external-ecmascript.js",
    "static": true,
    "longname": "lib/.external-ecmascript.js~Proxy",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 48,
    "kind": "file",
    "name": "lib/interp/arithm.js",
    "content": "const { SpecialForms } = require(\"./environment.js\");\n\nconst { Value } = require(\"./ast.js\");\n\nSpecialForms[\"++\"] = (args, env) => {\n  if (args.length !== 1) {\n    throw new SyntaxError(\"Bad use of ++\");\n  }\n\n  return incrementHelper(args[0], env, 1);\n};\n\nSpecialForms[\"--\"] = (args, env) => {\n  if (args.length !== 1) {\n    throw new SyntaxError(\"Bad use of --\");\n  }\n\n  return incrementHelper(args[0], env, -1);\n};\n\nSpecialForms[\"+=\"] = (args, env) => {\n  if (args.length !== 2) {\n    throw new SyntaxError(\"Bad use of +=\");\n  }\n\n  const inc = args[1].evaluate(env);\n\n  return incrementHelper(args[0], env, inc);\n};\n\nSpecialForms[\"-=\"] = (args, env) => {\n  if (args.length !== 2) {\n    throw new SyntaxError(\"Bad use of -=\");\n  }\n\n  const inc = args[1].evaluate(env);\n\n  return incrementHelper(args[0], env, -inc);\n};\n\nconst incrementHelper = (variable, env, inc) => {\n  const varValue = variable.evaluate(env);\n\n  const token = { type: \"value\", value: varValue + inc };\n  const newValue = new Value(token);\n\n  return SpecialForms[\"set\"]([variable, newValue], env);\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/arithm.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 49,
    "kind": "function",
    "name": "incrementHelper",
    "memberof": "lib/interp/arithm.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/arithm.js~incrementHelper",
    "access": "public",
    "export": false,
    "importPath": "eggtended-js/lib/interp/arithm.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 41,
    "undocument": true,
    "params": [
      {
        "name": "variable",
        "types": [
          "*"
        ]
      },
      {
        "name": "env",
        "types": [
          "*"
        ]
      },
      {
        "name": "inc",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 50,
    "kind": "file",
    "name": "lib/interp/ast.js",
    "content": "// AST class nodes\nconst xRegExp = require(\"xregexp\");\nconst utils = require(\"../utils.js\");\n\nconst { SpecialForms } = require(\"./environment.js\");\n\nclass Value {\n  constructor(token) {\n    this.type = \"value\";\n    this.value = token.value;\n  }\n\n  evaluate() {\n    return this.value;\n  }\n}\n\nclass Word {\n  constructor(token) {\n    this.type = \"word\";\n    this.name = token.value;\n  }\n\n  evaluate(env) {\n    // Variable\n    if (this.name in env) {\n      return env[this.name];\n\n      // Object variable referenced without using 'this'\n    } else if (\"this\" in env && this.name in env[\"this\"]) {\n      return env[\"this\"][this.name];\n    } else {\n      throw new ReferenceError(`Undefined variable: ${this.name}`);\n    }\n  }\n}\n\nclass Apply {\n  constructor(expr) {\n    this.type = \"apply\";\n    this.operator = expr;\n    this.args = [];\n  }\n\n  evaluate(env) {\n    // Check if its a specialForm function\n    if (this.operator.type === \"word\" && this.operator.name in SpecialForms) {\n      return SpecialForms[this.operator.name](this.args, env);\n    }\n\n    // Evaluated operator\n    let op = this.operator.evaluate(env);\n    // Evaluated arguments\n    let evArgs = this.args.map(arg => arg.evaluate(env));\n\n    if (typeof op === \"function\") {\n      // Is a function\n      return op(...evArgs);\n    }\n\n    if (typeof op !== \"undefined\") {\n      // Is an object, number, string or boolean\n      let name = evArgs[0];\n      let methodArgs = evArgs.slice(1);\n\n      // Check if the name of the method/property is defined on the object\n      if (typeof op[name] !== \"undefined\") {\n        // Execute as function\n        if (typeof op[name] === \"function\") {\n          return op[name](...methodArgs);\n\n          // Return as property\n        } else {\n          return op[name];\n        }\n\n        // If the name of the method is not defined on the object...\n      } else {\n        // Check if its a Map property.\n        if (op instanceof Map) {\n          if (typeof op.get(name) === \"function\") {\n            return op.get(name)(...methodArgs);\n          } else {\n            return op.get(name);\n          }\n        }\n\n        // Try to call the 'missing' method\n        if (typeof op[\"__missing__\"] === \"function\") {\n          return op[\"__missing__\"](...methodArgs);\n\n          // As a last resort, throw an Exception\n        } else {\n          throw new SyntaxError(`The method '${name}' was not found on the\n          object '${utils.ins(op)}'`);\n        }\n      }\n    }\n\n    throw new TypeError(`Could not resolve the apply expression`);\n  }\n}\n\nclass Regex {\n  constructor(token) {\n    this.type = \"regex\";\n\n    this.body = token.body;\n    this.flags = token.flags;\n  }\n\n  evaluate() {\n    return new xRegExp(this.body, this.flags);\n  }\n}\n\nmodule.exports = {\n  Value,\n  Word,\n  Apply,\n  Regex\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/ast.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 51,
    "kind": "class",
    "name": "Value",
    "memberof": "lib/interp/ast.js",
    "static": true,
    "longname": "lib/interp/ast.js~Value",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/ast.js",
    "importStyle": "{Value}",
    "description": null,
    "lineNumber": 7,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 52,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/interp/ast.js~Value",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Value#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 8,
    "undocument": true
  },
  {
    "__docId__": 53,
    "kind": "member",
    "name": "type",
    "memberof": "lib/interp/ast.js~Value",
    "static": false,
    "longname": "lib/interp/ast.js~Value#type",
    "access": "public",
    "description": null,
    "lineNumber": 9,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 54,
    "kind": "member",
    "name": "value",
    "memberof": "lib/interp/ast.js~Value",
    "static": false,
    "longname": "lib/interp/ast.js~Value#value",
    "access": "public",
    "description": null,
    "lineNumber": 10,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 55,
    "kind": "method",
    "name": "evaluate",
    "memberof": "lib/interp/ast.js~Value",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Value#evaluate",
    "access": "public",
    "description": null,
    "lineNumber": 13,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 56,
    "kind": "class",
    "name": "Word",
    "memberof": "lib/interp/ast.js",
    "static": true,
    "longname": "lib/interp/ast.js~Word",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/ast.js",
    "importStyle": "{Word}",
    "description": null,
    "lineNumber": 18,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 57,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/interp/ast.js~Word",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Word#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 19,
    "undocument": true
  },
  {
    "__docId__": 58,
    "kind": "member",
    "name": "type",
    "memberof": "lib/interp/ast.js~Word",
    "static": false,
    "longname": "lib/interp/ast.js~Word#type",
    "access": "public",
    "description": null,
    "lineNumber": 20,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 59,
    "kind": "member",
    "name": "name",
    "memberof": "lib/interp/ast.js~Word",
    "static": false,
    "longname": "lib/interp/ast.js~Word#name",
    "access": "public",
    "description": null,
    "lineNumber": 21,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 60,
    "kind": "method",
    "name": "evaluate",
    "memberof": "lib/interp/ast.js~Word",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Word#evaluate",
    "access": "public",
    "description": null,
    "lineNumber": 24,
    "undocument": true,
    "params": [
      {
        "name": "env",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 61,
    "kind": "class",
    "name": "Apply",
    "memberof": "lib/interp/ast.js",
    "static": true,
    "longname": "lib/interp/ast.js~Apply",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/ast.js",
    "importStyle": "{Apply}",
    "description": null,
    "lineNumber": 38,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 62,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/interp/ast.js~Apply",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Apply#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 39,
    "undocument": true
  },
  {
    "__docId__": 63,
    "kind": "member",
    "name": "type",
    "memberof": "lib/interp/ast.js~Apply",
    "static": false,
    "longname": "lib/interp/ast.js~Apply#type",
    "access": "public",
    "description": null,
    "lineNumber": 40,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 64,
    "kind": "member",
    "name": "operator",
    "memberof": "lib/interp/ast.js~Apply",
    "static": false,
    "longname": "lib/interp/ast.js~Apply#operator",
    "access": "public",
    "description": null,
    "lineNumber": 41,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 65,
    "kind": "member",
    "name": "args",
    "memberof": "lib/interp/ast.js~Apply",
    "static": false,
    "longname": "lib/interp/ast.js~Apply#args",
    "access": "public",
    "description": null,
    "lineNumber": 42,
    "undocument": true,
    "type": {
      "types": [
        "*[]"
      ]
    }
  },
  {
    "__docId__": 66,
    "kind": "method",
    "name": "evaluate",
    "memberof": "lib/interp/ast.js~Apply",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Apply#evaluate",
    "access": "public",
    "description": null,
    "lineNumber": 45,
    "undocument": true,
    "params": [
      {
        "name": "env",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 67,
    "kind": "class",
    "name": "Regex",
    "memberof": "lib/interp/ast.js",
    "static": true,
    "longname": "lib/interp/ast.js~Regex",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/ast.js",
    "importStyle": "{Regex}",
    "description": null,
    "lineNumber": 104,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 68,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/interp/ast.js~Regex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Regex#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 105,
    "undocument": true
  },
  {
    "__docId__": 69,
    "kind": "member",
    "name": "type",
    "memberof": "lib/interp/ast.js~Regex",
    "static": false,
    "longname": "lib/interp/ast.js~Regex#type",
    "access": "public",
    "description": null,
    "lineNumber": 106,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 70,
    "kind": "member",
    "name": "body",
    "memberof": "lib/interp/ast.js~Regex",
    "static": false,
    "longname": "lib/interp/ast.js~Regex#body",
    "access": "public",
    "description": null,
    "lineNumber": 108,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 71,
    "kind": "member",
    "name": "flags",
    "memberof": "lib/interp/ast.js~Regex",
    "static": false,
    "longname": "lib/interp/ast.js~Regex#flags",
    "access": "public",
    "description": null,
    "lineNumber": 109,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 72,
    "kind": "method",
    "name": "evaluate",
    "memberof": "lib/interp/ast.js~Regex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/ast.js~Regex#evaluate",
    "access": "public",
    "description": null,
    "lineNumber": 112,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 73,
    "kind": "file",
    "name": "lib/interp/eggvm.js",
    "content": "// Add monkey-patching functions and extended functions\nrequire(\"./monkey-patching.js\");\nrequire(\"./require.js\");\nrequire(\"./arithm.js\");\nrequire(\"./exceptions.js\");\nrequire(\"./typing.js\");\n\nconst fs = require(\"fs\");\n\nconst { Parser } = require(\"../parser/parse.js\");\nconst { TopEnv } = require(\"./environment.js\");\nconst { json2AST } = require(\"../parser/json2AST.js\");\n\nclass Eggvm {\n  static run(program) {\n    const tree = Parser.parse(program);\n\n    return Eggvm.eval(tree);\n  }\n\n  static runFromFile(file) {\n    const program = fs.readFileSync(file, \"utf8\");\n\n    return Eggvm.run(program);\n  }\n\n  static runFromEVM(file) {\n    const rawData = fs.readFileSync(file);\n    let json = JSON.parse(rawData);\n\n    const tree = json2AST(json);\n\n    return Eggvm.eval(tree);\n  }\n\n  static eval(tree, env) {\n    // Create a new env if not already defined on parameters\n    if (env === undefined || env === null) {\n      env = Object.create(TopEnv);\n    }\n\n    return tree !== null ? tree.evaluate(env) : null;\n  }\n\n  static getEnvFromFile(file) {\n    const env = Object.create(TopEnv);\n    const tree = Parser.parseFromFile(file);\n    Eggvm.eval(tree, env);\n\n    return env;\n  }\n}\n\nmodule.exports = {\n  Eggvm\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/eggvm.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 74,
    "kind": "class",
    "name": "Eggvm",
    "memberof": "lib/interp/eggvm.js",
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/eggvm.js",
    "importStyle": "{Eggvm}",
    "description": null,
    "lineNumber": 14,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 75,
    "kind": "method",
    "name": "run",
    "memberof": "lib/interp/eggvm.js~Eggvm",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm.run",
    "access": "public",
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 76,
    "kind": "method",
    "name": "runFromFile",
    "memberof": "lib/interp/eggvm.js~Eggvm",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm.runFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 21,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 77,
    "kind": "method",
    "name": "runFromEVM",
    "memberof": "lib/interp/eggvm.js~Eggvm",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm.runFromEVM",
    "access": "public",
    "description": null,
    "lineNumber": 27,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 78,
    "kind": "method",
    "name": "eval",
    "memberof": "lib/interp/eggvm.js~Eggvm",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm.eval",
    "access": "public",
    "description": null,
    "lineNumber": 36,
    "undocument": true,
    "params": [
      {
        "name": "tree",
        "types": [
          "*"
        ]
      },
      {
        "name": "env",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 79,
    "kind": "method",
    "name": "getEnvFromFile",
    "memberof": "lib/interp/eggvm.js~Eggvm",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/eggvm.js~Eggvm.getEnvFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 45,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 80,
    "kind": "file",
    "name": "lib/interp/environment.js",
    "content": "const { SpecialForms, TopEnv } = require(\"./registry.js\");\n\nmodule.exports = {\n  SpecialForms,\n  TopEnv\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/environment.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 81,
    "kind": "file",
    "name": "lib/interp/exceptions.js",
    "content": "const { SpecialForms, TopEnv } = require(\"./registry\");\n\nSpecialForms[\"try\"] = (args, env) => {\n  if (args.length < 2) {\n    throw new SyntaxError(\"Bad use of try-catch block\");\n  }\n\n  const body = args[0];\n  const catch_body = args[1];\n\n  try {\n    body.evaluate(env);\n  } catch (err) {\n    env[\"__error__\"] = err;\n    catch_body.evaluate(env);\n  } finally {\n    if (args.length === 3) {\n      const finally_body = args[2];\n\n      finally_body.evaluate(env);\n    }\n  }\n\n  return false;\n};\n\nTopEnv[\"throw\"] = obj => {\n  throw obj;\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/exceptions.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 82,
    "kind": "file",
    "name": "lib/interp/index.js",
    "content": "const { Eggvm } = require(\"./eggvm.js\");\nconst { Value, Word, Apply, Regex } = require(\"./ast.js\");\n\nmodule.exports = {\n  Eggvm,\n  Value,\n  Word,\n  Apply,\n  Regex\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 83,
    "kind": "file",
    "name": "lib/interp/monkey-patching.js",
    "content": "//  SUB\nconst utils = require(\"../utils.js\");\n\nObject.prototype.sub = function(...indices) {\n  utils.checkIterable(this, indices.length);\n\n  // Get index\n  let index = indices[0];\n  if (this instanceof Array) {\n    index = utils.getValidIndex(this.length, indices[0]);\n  }\n\n  // Get value\n  let value;\n  if (this instanceof Map) {\n    value = this.get(index);\n  } else {\n    value = this[index];\n  }\n\n  // Return value or keep recursion\n  if (indices.length === 1) {\n    return value;\n  }\n\n  return value.sub(...indices.slice(1));\n};\n\n// SETELEM\n\nObject.prototype.setelem = function(value, ...indices) {\n  utils.checkIterable(this, indices.length);\n\n  // Get index\n  let index = indices[0];\n  if (this instanceof Array) {\n    index = utils.getValidIndex(this.length, indices[0]);\n  }\n\n  // Set value or continue the recursion\n  if (indices.length === 1) {\n    if (this instanceof Map) {\n      this.set(index, value);\n    } else {\n      this[index] = value;\n    }\n\n    return value;\n  }\n\n  const obj = this.sub(index);\n  return obj.setelem(value, ...indices.slice(1));\n};\n\n// NUMBER\n\n[\"+\", \"-\", \"*\", \"/\"].forEach(op => {\n  Number.prototype[op] = new Function(\n    \"...values\",\n    `return [this, ...values].reduce((a, b) => a ${op} b);`\n  );\n});\n\nNumber.prototype[\"__missing__\"] = Number.prototype[\"+\"];\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/monkey-patching.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 84,
    "kind": "function",
    "name": "sub",
    "memberof": "lib/interp/monkey-patching.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/monkey-patching.js~sub",
    "access": "public",
    "export": false,
    "importPath": "eggtended-js/lib/interp/monkey-patching.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 4,
    "undocument": true,
    "params": [
      {
        "name": "indices",
        "types": [
          "...*"
        ],
        "spread": true
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 85,
    "kind": "function",
    "name": "setelem",
    "memberof": "lib/interp/monkey-patching.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/interp/monkey-patching.js~setelem",
    "access": "public",
    "export": false,
    "importPath": "eggtended-js/lib/interp/monkey-patching.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 31,
    "undocument": true,
    "params": [
      {
        "name": "value",
        "types": [
          "*"
        ]
      },
      {
        "name": "indices",
        "types": [
          "...*"
        ],
        "spread": true
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 86,
    "kind": "file",
    "name": "lib/interp/registry.js",
    "content": "const xRegExp = require(\"xregexp\");\n\nconst utils = require(\"../utils.js\");\n\nconst { SymbolTable } = require(\"./symboltable.js\");\n\n// specialForms and topEnv maps\nconst SpecialForms = Object.create(null);\nconst TopEnv = Object.create(null);\n\nSpecialForms[\"if\"] = (args, env) => {\n  if (args.length !== 3) {\n    throw new SyntaxError(\"Bad number of args passed to if\");\n  }\n\n  if (args[0].evaluate(env) === true) {\n    return args[1].evaluate(env);\n  } else {\n    return args[2].evaluate(env);\n  }\n};\n\nSpecialForms[\"while\"] = (args, env) => {\n  if (args.length !== 2) {\n    throw new SyntaxError(\"Bad number of args passed to while\");\n  }\n\n  while (args[0].evaluate(env) === true) {\n    args[1].evaluate(env);\n  }\n\n  // Egg has no undefined so we return false when there's no meaningful result\n  return false;\n};\n\nSpecialForms[\"for\"] = (args, env) => {\n  if (args.length !== 4) {\n    throw new SyntaxError(\"Bad number of args passed to for\");\n  }\n\n  const forEnv = Object.create(env);\n  forEnv[\"__symbol__\"] = new SymbolTable();\n\n  // Variable\n  args[0].evaluate(forEnv);\n\n  // Condition\n  while (args[1].evaluate(forEnv) === true) {\n    // Body\n    args[3].evaluate(forEnv);\n\n    // Increment\n    args[2].evaluate(forEnv);\n  }\n\n  return false;\n};\n\nSpecialForms[\"foreach\"] = (args, env) => {\n  if (args.length !== 3) {\n    throw new SyntaxError(\"Bad number of args passed to foreach\");\n  }\n\n  if (args[0].type !== \"word\") {\n    throw new SyntaxError(\"The first argument to foreach must be a valid word\");\n  }\n\n  const localEnv = Object.create(env);\n  localEnv[\"__symbol__\"] = new SymbolTable();\n\n  const iterable = args[1].evaluate(localEnv);\n  for (const val of iterable) {\n    localEnv[args[0].name] = val;\n    args[2].evaluate(localEnv);\n  }\n\n  return false;\n};\n\nSpecialForms[\"do\"] = (args, env) => {\n  let value = false;\n\n  args.forEach(arg => {\n    value = arg.evaluate(env);\n  });\n\n  return value;\n};\n\nSpecialForms[\"def\"] = SpecialForms[\"define\"] = SpecialForms[\":=\"] = (args, env) => {\n  if (args.length !== 2) {\n    throw new SyntaxError(\"Bad use of define\");\n  }\n\n  // Value to assign to the variable\n  let value = args[1].evaluate(env);\n\n  // Variable name\n  let valName = args[0].name;\n\n  env[valName] = value;\n  return value;\n};\n\nSpecialForms[\"fun\"] = SpecialForms[\"->\"] = (args, env) => {\n  if (!args.length) {\n    throw new SyntaxError(\"Functions need a body.\");\n  }\n\n  function name(expr) {\n    if (expr.type !== \"word\") {\n      throw new SyntaxError(\"Arg names must be words\");\n    }\n\n    return expr.name;\n  }\n\n  let argNames = args.slice(0, args.length - 1).map(name);\n  let body = args[args.length - 1];\n\n  return function() {\n    if (arguments.length !== argNames.length) {\n      throw new TypeError(\"Wrong number of arguments\");\n    }\n\n    const localEnv = Object.create(env);\n    localEnv[\"__symbol__\"] = new SymbolTable();\n\n    for (let i = 0; i < arguments.length; i++) {\n      localEnv[argNames[i]] = arguments[i];\n    }\n\n    return body.evaluate(localEnv);\n  };\n};\n\nSpecialForms[\"set\"] = SpecialForms[\"=\"] = (args, env) => {\n  if (args[0].type !== \"word\") {\n    throw new SyntaxError(\"Bad use of set\");\n  }\n\n  let valName = args[0].name;\n\n  let indices = args.slice(1, -1).map(arg => arg.evaluate(env));\n\n  let value = args[args.length - 1].evaluate(env);\n\n  for (let scope = env; scope; scope = Object.getPrototypeOf(scope)) {\n    if (scope[\"__symbol__\"].checkAttribute(\"const\", valName)) {\n      throw new ReferenceError(`Trying to change 'const' variable ${args[0].name}`);\n    }\n\n    // TODO: Reduce code duplication\n    if (\"this\" in scope) {\n      // TODO: use hasOwnProperty ?\n\n      if (Object.prototype.hasOwnProperty.call(scope[\"this\"], valName)) {\n        if (indices.length === 0) {\n          scope[\"this\"][valName] = value;\n        } else {\n          scope[\"this\"][valName].setelem(value, ...indices);\n        }\n\n        return value;\n      }\n    }\n\n    if (Object.prototype.hasOwnProperty.call(scope, valName)) {\n      if (indices.length === 0) {\n        scope[valName] = value;\n      } else {\n        scope[valName].setelem(value, ...indices);\n      }\n\n      return value;\n    }\n  }\n\n  throw new ReferenceError(`Tried setting an undefined variable: ${valName}`);\n};\n\nSpecialForms[\"object\"] = (args, env) => {\n  // Create a new object and a new scope\n  const object = {};\n  const objectEnv = Object.create(env);\n  objectEnv[\"__symbol__\"] = new SymbolTable();\n\n  // Add the variable 'this' as a reference to the current object\n  objectEnv[\"this\"] = object;\n\n  // Evaluate the arguments and add the methods/properties to the object\n  const evArgs = args.map(arg => arg.evaluate(objectEnv));\n\n  for (const pair of utils.chunk(evArgs, 2)) {\n    const name = pair[0];\n    const value = pair[1];\n\n    object[name] = value;\n  }\n\n  return object;\n};\n\n// TODO: Continue implementing class?\n//\n// SpecialForms['class'] = (args, env) => {\n//   // const evArgs = args.map((arg) => evaluate(arg, env));\n//\n//   const newClass = function(x, y) {\n//     this.x = x;\n//     this.y = y;\n//   }\n//\n//   return newClass;\n// }\n\n[\"+\", \"-\", \"*\", \"/\", \"==\", \"!=\", \"<\", \">\", \">=\", \"<=\", \"&&\", \"||\"].forEach(op => {\n  TopEnv[op] = new Function(\"a, b\", `return a ${op} b;`);\n});\n\nTopEnv[\"true\"] = true;\nTopEnv[\"false\"] = false;\nTopEnv[\"null\"] = null;\n\nTopEnv[\"print\"] = value => {\n  console.log(value);\n  return value;\n};\n\nTopEnv[\"arr\"] = TopEnv[\"array\"] = (...args) => {\n  return args;\n};\n\nTopEnv[\"map\"] = TopEnv[\"dict\"] = (...args) => {\n  return new Map(utils.chunk(args, 2));\n};\n\nTopEnv[\"<-\"] = TopEnv[\"[]\"] = TopEnv[\"element\"] = (object, ...indices) => {\n  return object.sub(...indices);\n};\n\nTopEnv[\"length\"] = array => {\n  return array.length;\n};\n\nTopEnv[\"RegExp\"] = (method, ...args) => {\n  return xRegExp[method](...args);\n};\n\nTopEnv[\"child\"] = parent => {\n  return Object.create(parent);\n};\n\nTopEnv[\"__symbol__\"] = new SymbolTable();\n\n// WIP: Continue implementing class?\n// TopEnv['new'] = (...args) => {\n//   const className = args[0];\n//\n//   // TODO: Check for more exceptions\n//   if(typeof className !== \"function\") {\n//     throw new SyntaxError(`${className} must be a class with a constructor.`)\n//   }\n//\n//   return new className(...args.slice(1));\n//\n\nmodule.exports = {\n  SpecialForms,\n  TopEnv\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/registry.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 87,
    "kind": "variable",
    "name": "SpecialForms",
    "memberof": "lib/interp/registry.js",
    "static": true,
    "longname": "lib/interp/registry.js~SpecialForms",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/registry.js",
    "importStyle": "{SpecialForms}",
    "description": null,
    "lineNumber": 8,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 88,
    "kind": "variable",
    "name": "TopEnv",
    "memberof": "lib/interp/registry.js",
    "static": true,
    "longname": "lib/interp/registry.js~TopEnv",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/registry.js",
    "importStyle": "{TopEnv}",
    "description": null,
    "lineNumber": 9,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 89,
    "kind": "file",
    "name": "lib/interp/require.js",
    "content": "const { TopEnv } = require(\"./environment.js\");\nconst { Parser } = require(\"../parser/parse.js\");\nconst { SymbolTable } = require(\"./symboltable.js\");\n\nTopEnv[\"require\"] = file => {\n  if (!(file in TopEnv[\"require\"].cache)) {\n    const tree = Parser.parseFromFile(file);\n    const env = Object.create(TopEnv);\n    env[\"__symbol__\"] = new SymbolTable();\n\n    tree.evaluate(env);\n\n    const module = { exports: env[\"module\"].exports };\n\n    TopEnv[\"require\"].cache[file] = module;\n  }\n\n  return TopEnv[\"require\"].cache[file].exports;\n};\n\nTopEnv[\"require\"].cache = Object.create(null);\nTopEnv[\"module\"] = { exports: {} };\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/require.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 90,
    "kind": "file",
    "name": "lib/interp/symboltable.js",
    "content": "class SymbolTable {\n  addAttribute(attribute, value, name) {\n    if (!(name in this)) {\n      this[name] = {};\n    }\n\n    this[name][attribute] = value;\n  }\n\n  checkAttribute(attribute, name) {\n    if (name in this && attribute in this[name]) {\n      return true;\n    }\n\n    return false;\n  }\n}\n\nmodule.exports = {\n  SymbolTable\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/symboltable.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 91,
    "kind": "class",
    "name": "SymbolTable",
    "memberof": "lib/interp/symboltable.js",
    "static": true,
    "longname": "lib/interp/symboltable.js~SymbolTable",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/interp/symboltable.js",
    "importStyle": "{SymbolTable}",
    "description": null,
    "lineNumber": 1,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 92,
    "kind": "method",
    "name": "addAttribute",
    "memberof": "lib/interp/symboltable.js~SymbolTable",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/symboltable.js~SymbolTable#addAttribute",
    "access": "public",
    "description": null,
    "lineNumber": 2,
    "undocument": true,
    "params": [
      {
        "name": "attribute",
        "types": [
          "*"
        ]
      },
      {
        "name": "value",
        "types": [
          "*"
        ]
      },
      {
        "name": "name",
        "types": [
          "*"
        ]
      }
    ],
    "return": null
  },
  {
    "__docId__": 93,
    "kind": "member",
    "name": "[name]",
    "memberof": "lib/interp/symboltable.js~SymbolTable",
    "static": false,
    "longname": "lib/interp/symboltable.js~SymbolTable#[name]",
    "access": "public",
    "description": null,
    "lineNumber": 4,
    "undocument": true,
    "type": {
      "types": [
        "{}"
      ]
    }
  },
  {
    "__docId__": 94,
    "kind": "method",
    "name": "checkAttribute",
    "memberof": "lib/interp/symboltable.js~SymbolTable",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/interp/symboltable.js~SymbolTable#checkAttribute",
    "access": "public",
    "description": null,
    "lineNumber": 10,
    "undocument": true,
    "params": [
      {
        "name": "attribute",
        "types": [
          "*"
        ]
      },
      {
        "name": "name",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "boolean"
      ]
    }
  },
  {
    "__docId__": 95,
    "kind": "file",
    "name": "lib/interp/typing.js",
    "content": "const { SpecialForms, TopEnv } = require(\"./registry\");\n\nSpecialForms[\"const\"] = (args, env) => {\n  if (args[0].type !== \"word\") {\n    throw new SyntaxError(\"Bad number of arguments\");\n  }\n\n  const value = SpecialForms[\"define\"](args, env);\n\n  // Variable name\n  const name = args[0].name;\n\n  // Add const attribute to the symbol table\n  env[\"__symbol__\"].addAttribute(\"const\", true, name);\n\n  return value;\n};\n\nSpecialForms[\"define_wrapped\"] = SpecialForms[\"define\"];\nSpecialForms[\"def\"] = SpecialForms[\"define\"] = SpecialForms[\":=\"] = (args, env) => {\n  if (args.length !== 2 || args[0].type !== \"word\") {\n    throw new SyntaxError(\"Bad use of define\");\n  }\n\n  // Variable name\n  let valName = args[0].name;\n\n  if (env[\"__symbol__\"].checkAttribute(\"const\", valName)) {\n    throw new ReferenceError(`Trying to change 'const' variable ${args[0].name}`);\n  }\n\n  return SpecialForms[\"define_wrapped\"](args, env);\n};\n\n[Number, String, Boolean].forEach(type => {\n  TopEnv[String(type.name).toLowerCase()] = x => {\n    return type(x);\n  };\n});\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/interp/typing.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 96,
    "kind": "file",
    "name": "lib/parser/index.js",
    "content": "const { Lexer } = require(\"./lexer.js\");\nconst { Parser } = require(\"./parse.js\");\nconst { TokenRegex } = require(\"./tokenRegex.js\");\nconst { json2AST } = require(\"./json2AST.js\");\n\nmodule.exports = {\n  Lexer,\n  Parser,\n  TokenRegex,\n  json2AST\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/parser/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 97,
    "kind": "file",
    "name": "lib/parser/json2AST.js",
    "content": "const { Value, Word, Apply, Regex } = require(\"../interp/ast.js\");\nconst utils = require(\"../utils.js\");\n\nconst json2AST = tree => {\n  let obj = null;\n\n  if (tree.type == \"apply\") {\n    obj = new Apply(tree);\n    obj.operator = json2AST(tree.operator);\n    obj.args = tree.args.map(arg => json2AST(arg));\n  } else if (tree.type == \"word\") {\n    obj = new Word(tree);\n    obj.name = tree.name;\n  } else if (tree.type == \"value\") {\n    obj = new Value(tree);\n  } else if (tree.type == \"regex\") {\n    obj = new Regex(tree);\n    obj.body = tree.body;\n    obj.flags = tree.flags;\n  } else {\n    throw new SyntaxError(`Unrecognized token ${utils.ins(tree)}`);\n  }\n\n  return obj;\n};\n\nmodule.exports = {\n  json2AST\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/parser/json2AST.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 98,
    "kind": "function",
    "name": "json2AST",
    "memberof": "lib/parser/json2AST.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/json2AST.js~json2AST",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/json2AST.js",
    "importStyle": "{json2AST}",
    "description": null,
    "lineNumber": 4,
    "undocument": true,
    "params": [
      {
        "name": "tree",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 99,
    "kind": "file",
    "name": "lib/parser/lexer.js",
    "content": "const tokenRegex = require(\"./tokenRegex.js\");\nconst fs = require(\"fs\");\n\nclass Lexer {\n  constructor() {\n    this.lastIndex = 0;\n    this.line = 1;\n  }\n\n  setProgram(program) {\n    this.program = program;\n\n    this.lastIndex = 0;\n    this.line = 1;\n\n    return this;\n  }\n\n  tokenize(program) {\n    this.setProgram(program);\n\n    return this._getTokens();\n  }\n\n  static tokenize(program) {\n    return new Lexer().tokenize(program);\n  }\n\n  tokenizeFromFile(file) {\n    const program = fs.readFileSync(file, \"utf-8\");\n\n    return this.tokenize(program);\n  }\n\n  static tokenizeFromFile(file) {\n    return new Lexer().tokenizeFromFile(file);\n  }\n\n  static setTokens(tokens) {\n    Lexer.TOKENS = tokens;\n  }\n\n  getParBalance(program) {\n    this.setProgram(program);\n\n    let stack = 0;\n    const tokens = this._getTokens();\n    for (const token of tokens) {\n      if (token.type === \"LP\") {\n        ++stack;\n      } else if (token.type === \"RP\") {\n        --stack;\n      }\n    }\n\n    return stack;\n  }\n\n  _getTokens() {\n    const tokens = [];\n\n    let currentToken = this._getToken();\n    while (currentToken !== null) {\n      tokens.push(currentToken);\n\n      currentToken = this._getToken();\n    }\n\n    return this.__transformTokens(tokens);\n  }\n\n  _getToken() {\n    // Update lastIndex property for each expression used\n    this.__updateLastIndices();\n\n    // Match and ignore whitespaces and newlines\n    let whitespaces = Lexer.WHITES.exec(this.program);\n    if (whitespaces !== null) {\n      if (Lexer.NEWLINE.exec(whitespaces.value)) {\n        ++this.line;\n      }\n      this.lastIndex = Lexer.WHITES.lastIndex;\n\n      return this._getToken();\n    }\n\n    // Iterate through each regex\n    let token = null;\n    for (let i = 0; i < Lexer.TOKENS.length; ++i) {\n      let match = Lexer.TOKENS[i].exec(this.program);\n\n      // When matching a expression, add the current line and set the token\n      if (match !== null) {\n        match.line = this.line;\n        this.lastIndex = Lexer.TOKENS[i].lastIndex;\n\n        token = match;\n        break;\n      }\n    }\n\n    // Return the matched token, or null if anything was found\n    return token;\n  }\n\n  __transformTokens(tokens) {\n    for (let i = 0; i < tokens.length; ++i) {\n      // x: => \"x\",\n      if (tokens[i].type === \"WORD\") {\n        const nextToken = tokens[i + 1];\n        if (nextToken && nextToken.value === \":\") {\n          tokens[i].type = \"STRING\";\n        }\n      }\n\n      // Replace dots with parentehsis\n      // a.b   =>    a(\"b\")\n      // a.b.c   =>  a(\"b\")(\"c\")\n      // a.b(c, d)   => a(\"b\", c, d)\n      if (tokens[i].type === \"LP\" && tokens[i].value === \".\") {\n        tokens[i].value = \"(\";\n\n        const expr = tokens[i + 1];\n        const arg = tokens[i + 2];\n\n        if (expr && expr.type === \"WORD\") {\n          expr.type = \"STRING\";\n        }\n\n        if (arg && arg.type === \"LP\" && arg.value !== \".\") {\n          arg.type = \"COMMA\";\n          arg.value = \",\";\n        } else {\n          tokens.splice(i + 2, 0, { type: \"RP\", value: \")\" });\n        }\n      }\n    }\n\n    return tokens;\n  }\n\n  __updateLastIndices() {\n    Lexer.TOKENS.forEach(expr => {\n      expr.lastIndex = this.lastIndex;\n    });\n    Lexer.WHITES.lastIndex = this.lastIndex;\n    Lexer.NEWLINE.lastIndex = this.lastIndex;\n  }\n}\n\nLexer.TOKENS = [\n  tokenRegex.NUMBER,\n  tokenRegex.STRING,\n  tokenRegex.REGEX,\n  tokenRegex.WORD,\n  tokenRegex.LP,\n  tokenRegex.RP,\n  tokenRegex.COMMA\n];\n\nLexer.WHITES = tokenRegex.WHITES;\nLexer.NEWLINE = tokenRegex.NEWLINE;\n\nmodule.exports = {\n  Lexer\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/parser/lexer.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 100,
    "kind": "class",
    "name": "Lexer",
    "memberof": "lib/parser/lexer.js",
    "static": true,
    "longname": "lib/parser/lexer.js~Lexer",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/lexer.js",
    "importStyle": "{Lexer}",
    "description": null,
    "lineNumber": 4,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 101,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 5,
    "undocument": true
  },
  {
    "__docId__": 102,
    "kind": "member",
    "name": "lastIndex",
    "memberof": "lib/parser/lexer.js~Lexer",
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#lastIndex",
    "access": "public",
    "description": null,
    "lineNumber": 6,
    "undocument": true,
    "type": {
      "types": [
        "number"
      ]
    }
  },
  {
    "__docId__": 103,
    "kind": "member",
    "name": "line",
    "memberof": "lib/parser/lexer.js~Lexer",
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#line",
    "access": "public",
    "description": null,
    "lineNumber": 7,
    "undocument": true,
    "type": {
      "types": [
        "number"
      ]
    }
  },
  {
    "__docId__": 104,
    "kind": "method",
    "name": "setProgram",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#setProgram",
    "access": "public",
    "description": null,
    "lineNumber": 10,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 105,
    "kind": "member",
    "name": "program",
    "memberof": "lib/parser/lexer.js~Lexer",
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#program",
    "access": "public",
    "description": null,
    "lineNumber": 11,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 108,
    "kind": "method",
    "name": "tokenize",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#tokenize",
    "access": "public",
    "description": null,
    "lineNumber": 19,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 109,
    "kind": "method",
    "name": "tokenize",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/lexer.js~Lexer.tokenize",
    "access": "public",
    "description": null,
    "lineNumber": 25,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 110,
    "kind": "method",
    "name": "tokenizeFromFile",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#tokenizeFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 29,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 111,
    "kind": "method",
    "name": "tokenizeFromFile",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/lexer.js~Lexer.tokenizeFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 35,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 112,
    "kind": "method",
    "name": "setTokens",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/lexer.js~Lexer.setTokens",
    "access": "public",
    "description": null,
    "lineNumber": 39,
    "undocument": true,
    "params": [
      {
        "name": "tokens",
        "types": [
          "*"
        ]
      }
    ],
    "return": null
  },
  {
    "__docId__": 113,
    "kind": "method",
    "name": "getParBalance",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#getParBalance",
    "access": "public",
    "description": null,
    "lineNumber": 43,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 114,
    "kind": "method",
    "name": "_getTokens",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#_getTokens",
    "access": "private",
    "description": null,
    "lineNumber": 59,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 115,
    "kind": "method",
    "name": "_getToken",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#_getToken",
    "access": "private",
    "description": null,
    "lineNumber": 72,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 118,
    "kind": "method",
    "name": "__transformTokens",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#__transformTokens",
    "access": "private",
    "description": null,
    "lineNumber": 106,
    "undocument": true,
    "params": [
      {
        "name": "tokens",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 119,
    "kind": "method",
    "name": "__updateLastIndices",
    "memberof": "lib/parser/lexer.js~Lexer",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/lexer.js~Lexer#__updateLastIndices",
    "access": "private",
    "description": null,
    "lineNumber": 142,
    "undocument": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 120,
    "kind": "file",
    "name": "lib/parser/parse.js",
    "content": "const fs = require(\"fs\");\n\nconst { Lexer } = require(\"./lexer.js\");\nconst { Value, Word, Apply, Regex } = require(\"../interp/ast.js\");\n\n/**\n * Parser class. Iterates through the given string, tokenizes it and returns a AST tree.\n * @access public\n */\nclass Parser {\n  /**\n   * Attributes used by the parser, set to default values\n   */\n  constructor() {\n    this.index = 0;\n    this.tokens = [];\n    this.lookahead = null;\n  }\n\n  setProgram(program) {\n    this.program = program;\n\n    this.index = 0;\n    this.tokens = [];\n    this.lookahead = null;\n\n    return this;\n  }\n\n  parse(program) {\n    this.setProgram(program);\n\n    // Get array of tokens\n    this.tokens = Lexer.tokenize(program);\n\n    let tree = null;\n\n    // Parse if the array is not empty\n    if (this.tokens.length > 0) {\n      this.lookahead = this.__nextToken();\n      tree = this.parseExpression();\n    }\n\n    if (this.lookahead !== null) {\n      throw this.__parserSyntaxError(\"Unexpected input after the end of file.\");\n    }\n\n    return tree;\n  }\n\n  static parse(program) {\n    return new Parser().parse(program);\n  }\n\n  parseFromFile(file) {\n    const program = fs.readFileSync(file, \"utf8\");\n\n    return this.parse(program);\n  }\n\n  static parseFromFile(file) {\n    return new Parser().parseFromFile(file);\n  }\n\n  parseExpression() {\n    let expr;\n    if (this.lookahead.type === \"STRING\") {\n      expr = new Value(this.lookahead);\n    } else if (this.lookahead.type === \"NUMBER\") {\n      this.lookahead.value = Number(this.lookahead.value);\n      expr = new Value(this.lookahead);\n    } else if (this.lookahead.type === \"REGEX\") {\n      const fields = this.lookahead.value.split(\"/\");\n      expr = new Regex({ body: fields[1], flags: fields[2] });\n    } else if (this.lookahead.type === \"WORD\") {\n      expr = new Word(this.lookahead);\n    } else {\n      throw this.__parserSyntaxError(\"Unrecognized token while parsing the expression.\");\n    }\n\n    return this.parseApply(expr);\n  }\n\n  parseApply(expr) {\n    // Get next token\n    this.lookahead = this.__nextToken();\n\n    // Return if apply is empty (not left parenthesis or null)\n    if (!this.lookahead || this.lookahead.type !== \"LP\") {\n      return expr;\n    }\n\n    let tree = new Apply(expr);\n\n    this.lookahead = this.__nextToken();\n    // Parse all arguments inside the parenthesis\n    while (this.lookahead && this.lookahead.type !== \"RP\") {\n      let arg = this.parseExpression();\n      tree.args.push(arg);\n\n      if (\n        !this.lookahead ||\n        (this.lookahead.type !== \"COMMA\" && this.lookahead.type !== \"RP\")\n      ) {\n        throw this.__parserSyntaxError(`Missing , or ) after the expression`);\n      }\n\n      // Don't consume RPs as argument tokens\n      if (this.lookahead && this.lookahead.type !== \"RP\") {\n        this.lookahead = this.__nextToken();\n      }\n    }\n\n    return this.parseApply(tree);\n  }\n\n  __nextToken() {\n    const token = this.tokens[this.index++];\n\n    return token !== undefined ? token : null;\n  }\n\n  __parserSyntaxError(message) {\n    let start = this.lookahead ? this.lookahead.start : this.lastIndex;\n\n    return new SyntaxError(\n      `Parser::Line ${this.line}::Col ${start}\\n${message}\\n${this.program.slice(\n        start - 1,\n        start + 10\n      )}`\n    );\n  }\n}\n\nmodule.exports = {\n  Parser\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/parser/parse.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 121,
    "kind": "class",
    "name": "Parser",
    "memberof": "lib/parser/parse.js",
    "static": true,
    "longname": "lib/parser/parse.js~Parser",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/parse.js",
    "importStyle": "{Parser}",
    "description": "Parser class. Iterates through the given string, tokenizes it and returns a AST tree.",
    "lineNumber": 10,
    "interface": false
  },
  {
    "__docId__": 122,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#constructor",
    "access": "public",
    "description": "Attributes used by the parser, set to default values",
    "lineNumber": 14
  },
  {
    "__docId__": 123,
    "kind": "member",
    "name": "index",
    "memberof": "lib/parser/parse.js~Parser",
    "static": false,
    "longname": "lib/parser/parse.js~Parser#index",
    "access": "public",
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "type": {
      "types": [
        "number"
      ]
    }
  },
  {
    "__docId__": 124,
    "kind": "member",
    "name": "tokens",
    "memberof": "lib/parser/parse.js~Parser",
    "static": false,
    "longname": "lib/parser/parse.js~Parser#tokens",
    "access": "public",
    "description": null,
    "lineNumber": 16,
    "undocument": true,
    "type": {
      "types": [
        "*[]"
      ]
    }
  },
  {
    "__docId__": 125,
    "kind": "member",
    "name": "lookahead",
    "memberof": "lib/parser/parse.js~Parser",
    "static": false,
    "longname": "lib/parser/parse.js~Parser#lookahead",
    "access": "public",
    "description": null,
    "lineNumber": 17,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 126,
    "kind": "method",
    "name": "setProgram",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#setProgram",
    "access": "public",
    "description": null,
    "lineNumber": 20,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 127,
    "kind": "member",
    "name": "program",
    "memberof": "lib/parser/parse.js~Parser",
    "static": false,
    "longname": "lib/parser/parse.js~Parser#program",
    "access": "public",
    "description": null,
    "lineNumber": 21,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 131,
    "kind": "method",
    "name": "parse",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#parse",
    "access": "public",
    "description": null,
    "lineNumber": 30,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 134,
    "kind": "method",
    "name": "parse",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/parse.js~Parser.parse",
    "access": "public",
    "description": null,
    "lineNumber": 51,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 135,
    "kind": "method",
    "name": "parseFromFile",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#parseFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 55,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 136,
    "kind": "method",
    "name": "parseFromFile",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/parser/parse.js~Parser.parseFromFile",
    "access": "public",
    "description": null,
    "lineNumber": 61,
    "undocument": true,
    "params": [
      {
        "name": "file",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 137,
    "kind": "method",
    "name": "parseExpression",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#parseExpression",
    "access": "public",
    "description": null,
    "lineNumber": 65,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 138,
    "kind": "method",
    "name": "parseApply",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#parseApply",
    "access": "public",
    "description": null,
    "lineNumber": 84,
    "undocument": true,
    "params": [
      {
        "name": "expr",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 142,
    "kind": "method",
    "name": "__nextToken",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#__nextToken",
    "access": "private",
    "description": null,
    "lineNumber": 117,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 143,
    "kind": "method",
    "name": "__parserSyntaxError",
    "memberof": "lib/parser/parse.js~Parser",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/parse.js~Parser#__parserSyntaxError",
    "access": "private",
    "description": null,
    "lineNumber": 123,
    "undocument": true,
    "params": [
      {
        "name": "message",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 144,
    "kind": "file",
    "name": "lib/parser/tokenRegex.js",
    "content": "const xRegExp = require(\"xregexp\");\n\nclass TokenRegex {\n  constructor(name, regexLiteral, flags) {\n    this.name = name;\n    this.expression = xRegExp(regexLiteral, flags);\n  }\n\n  get lastIndex() {\n    return this.expression.lastIndex;\n  }\n\n  set lastIndex(index) {\n    this.expression.lastIndex = index;\n  }\n\n  reset() {\n    this.lastIndex = 0;\n\n    return this;\n  }\n\n  exec(program) {\n    let match = this.expression.exec(program);\n\n    if (match !== null) {\n      return {\n        type: this.name,\n        value: match[1],\n        start: this.lastIndex - match[1].length + 1,\n        end: this.lastIndex\n      };\n    }\n\n    return null;\n  }\n\n  test(program) {\n    let savedIndex = this.lastIndex;\n    const result = this.exec(program);\n    this.lastIndex = savedIndex;\n\n    return result !== null;\n  }\n}\n\nconst WHITES = new TokenRegex(\n  \"WHITE\",\n  `(\\\\s+|       # Spaces\n                                [#;].*|     # Single-line comments\n                                \\\\/\\\\*[^]*?\\\\*\\\\/  # Multiline comments\n                               )`,\n  `yx`\n);\n\nconst NEWLINE = new TokenRegex(\n  \"NEWLINE\",\n  `(\\\\r?        # Carriage return (for compatibility)\n                                 \\\\n         # Newline char\n                                )`\n);\n\nconst NUMBER = new TokenRegex(\n  \"NUMBER\",\n  `([-+]?       # Sign\n                                \\\\d*          # Digits\n                                \\\\.?\\\\d+      # Decimals\n                                (?:[eE][-+]?\\\\d+)? # Exp notatio\n                               )`,\n  \"yx\"\n);\n\nconst STRING = new TokenRegex(\n  \"STRING\",\n  `\"([^\"\\\\\\\\]*  # Any character except 'escaped \"'\n                                )\"`,\n  \"yx\"\n);\n\nconst WORD = new TokenRegex(\n  \"WORD\",\n  `(\\\\[\\\\]|     # [] is a reserved word for arrays\n                              :=|         # := is a reserved word for 'define'\n                              [^\\\\s\\\\(\\\\)\\\\{\\\\}\\\\[\\\\]\\\\.,:\"]+   # Avoid some chars\n                              )`,\n  \"yx\"\n);\n\nconst LP = new TokenRegex(\n  \"LP\",\n  `([\\\\(\\\\{\\\\[\\\\.]  # ({[ are synonyms\n                           )`,\n  \"yx\"\n);\n\nconst RP = new TokenRegex(\n  \"RP\",\n  `([\\\\)\\\\}\\\\]]     # }}] are synonyms\n                          )`,\n  \"yx\"\n);\n\nconst COMMA = new TokenRegex(\n  \"COMMA\",\n  `(,|          # comma\n                               :(?!=)      # a : that isn't followed by a = (:= is word)\n                              )`,\n  \"yx\"\n);\n\nconst REGEX = new TokenRegex(\n  \"REGEX\",\n  `(r/[^]*?/       # body of the regex\n                               [nsxAgimuy]*   # flags\n                              )`,\n  \"yx\"\n);\n\nmodule.exports = {\n  WHITES,\n  NEWLINE,\n  NUMBER,\n  STRING,\n  WORD,\n  LP,\n  RP,\n  COMMA,\n  REGEX,\n  TokenRegex\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/parser/tokenRegex.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 145,
    "kind": "variable",
    "name": "WHITES",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~WHITES",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{WHITES}",
    "description": null,
    "lineNumber": 47,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 146,
    "kind": "class",
    "name": "TokenRegex",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~TokenRegex",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 3,
    "pseudoExport": true,
    "undocument": true,
    "interface": false
  },
  {
    "__docId__": 147,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 4,
    "undocument": true
  },
  {
    "__docId__": 148,
    "kind": "member",
    "name": "name",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#name",
    "access": "public",
    "description": null,
    "lineNumber": 5,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 149,
    "kind": "member",
    "name": "expression",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#expression",
    "access": "public",
    "description": null,
    "lineNumber": 6,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 150,
    "kind": "get",
    "name": "lastIndex",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#lastIndex",
    "access": "public",
    "description": null,
    "lineNumber": 9,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 151,
    "kind": "set",
    "name": "lastIndex",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#lastIndex",
    "access": "public",
    "description": null,
    "lineNumber": 13,
    "undocument": true
  },
  {
    "__docId__": 152,
    "kind": "method",
    "name": "reset",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#reset",
    "access": "public",
    "description": null,
    "lineNumber": 17,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 154,
    "kind": "method",
    "name": "exec",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#exec",
    "access": "public",
    "description": null,
    "lineNumber": 23,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 155,
    "kind": "method",
    "name": "test",
    "memberof": "lib/parser/tokenRegex.js~TokenRegex",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "lib/parser/tokenRegex.js~TokenRegex#test",
    "access": "public",
    "description": null,
    "lineNumber": 38,
    "undocument": true,
    "params": [
      {
        "name": "program",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 157,
    "kind": "variable",
    "name": "NEWLINE",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~NEWLINE",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{NEWLINE}",
    "description": null,
    "lineNumber": 56,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 158,
    "kind": "variable",
    "name": "NUMBER",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~NUMBER",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{NUMBER}",
    "description": null,
    "lineNumber": 63,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 159,
    "kind": "variable",
    "name": "STRING",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~STRING",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{STRING}",
    "description": null,
    "lineNumber": 73,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 160,
    "kind": "variable",
    "name": "WORD",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~WORD",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{WORD}",
    "description": null,
    "lineNumber": 80,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 161,
    "kind": "variable",
    "name": "LP",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~LP",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{LP}",
    "description": null,
    "lineNumber": 89,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 162,
    "kind": "variable",
    "name": "RP",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~RP",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{RP}",
    "description": null,
    "lineNumber": 96,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 163,
    "kind": "variable",
    "name": "COMMA",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~COMMA",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{COMMA}",
    "description": null,
    "lineNumber": 103,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 164,
    "kind": "variable",
    "name": "REGEX",
    "memberof": "lib/parser/tokenRegex.js",
    "static": true,
    "longname": "lib/parser/tokenRegex.js~REGEX",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/parser/tokenRegex.js",
    "importStyle": "{REGEX}",
    "description": null,
    "lineNumber": 111,
    "undocument": true,
    "type": {
      "types": [
        "lib/parser/tokenRegex.js~TokenRegex"
      ]
    }
  },
  {
    "__docId__": 165,
    "kind": "file",
    "name": "lib/repl/colors.js",
    "content": "const { TopEnv } = require(\"../interp/environment.js\");\nconst style = require(\"ansi-styles\");\n\nconst RED = (TopEnv[\"__RED__\"] = style.red.open);\nconst GREEN = (TopEnv[\"__GREEN__\"] = style.green.open);\nconst YELLOW = (TopEnv[\"__YELLOW__\"] = style.yellow.open);\nconst BLUE = (TopEnv[\"__BLUE__\"] = style.blue.open);\nconst DEFAULT = (TopEnv[\"__DEF__\"] = style.color.close);\n\nconsole.log(RED);\n\nmodule.exports = {\n  RED,\n  GREEN,\n  YELLOW,\n  BLUE,\n  DEFAULT\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/repl/colors.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 166,
    "kind": "variable",
    "name": "RED",
    "memberof": "lib/repl/colors.js",
    "static": true,
    "longname": "lib/repl/colors.js~RED",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/colors.js",
    "importStyle": "{RED}",
    "description": null,
    "lineNumber": 4,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 167,
    "kind": "variable",
    "name": "GREEN",
    "memberof": "lib/repl/colors.js",
    "static": true,
    "longname": "lib/repl/colors.js~GREEN",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/colors.js",
    "importStyle": "{GREEN}",
    "description": null,
    "lineNumber": 5,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 168,
    "kind": "variable",
    "name": "YELLOW",
    "memberof": "lib/repl/colors.js",
    "static": true,
    "longname": "lib/repl/colors.js~YELLOW",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/colors.js",
    "importStyle": "{YELLOW}",
    "description": null,
    "lineNumber": 6,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 169,
    "kind": "variable",
    "name": "BLUE",
    "memberof": "lib/repl/colors.js",
    "static": true,
    "longname": "lib/repl/colors.js~BLUE",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/colors.js",
    "importStyle": "{BLUE}",
    "description": null,
    "lineNumber": 7,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 170,
    "kind": "variable",
    "name": "DEFAULT",
    "memberof": "lib/repl/colors.js",
    "static": true,
    "longname": "lib/repl/colors.js~DEFAULT",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/colors.js",
    "importStyle": "{DEFAULT}",
    "description": null,
    "lineNumber": 8,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 171,
    "kind": "file",
    "name": "lib/repl/extensions.js",
    "content": "const process = require(\"process\");\nconst fs = require(\"fs\");\n\nconst { SpecialForms } = require(\"../interp/registry.js\");\nconst { TopEnv } = require(\"../interp/environment.js\");\nconst { Eggvm } = require(\"../interp/eggvm.js\");\n\nconst colors = require(\"./colors.js\");\n\n// PROMPT\n\nTopEnv[\"__PROMPT__\"] = \"> \";\n\nconst getPromptLine = () => {\n  return `${colors.YELLOW} ${TopEnv[\"__PROMPT__\"]} ${colors.DEFAULT}`;\n};\n\n// Extra methods\n\nconst eggExit = (TopEnv[\"exit\"] = () => {\n  console.log(colors.BLUE + \"Closing the REPL... Bye!\" + colors.DEFAULT);\n  process.exit(0);\n});\n\nconst HELP = [\n  `${colors.BLUE} help() ${colors.DEFAULT} show this help menu`,\n  `${colors.RED} exit() | Ctrl-D ${colors.DEFAULT} close the REPL`,\n  `${colors.GREEN} run() ${colors.DEFAULT} execute a .egg file`,\n  `${colors.YELLOW} clear() ${colors.DEFAULT} clear the console`\n];\n\nconst eggHelp = (TopEnv[\"help\"] = () => {\n  console.log(\" Egg help menu:\");\n  HELP.forEach(line => {\n    console.log(line);\n  });\n\n  return \"-\".repeat(HELP[0].length - 10);\n});\n\nconst eggInfo = (TopEnv[\"info\"] = () => {\n  console.log(\n    colors.BLUE +\n      `\n                   _                 _          _\n                  | |               | |        | |\n   ___  __ _  __ _| |_ ___ _ __   __| | ___  __| |\n  / _ \\\\/ _\\` |/ _\\` | __/ _ \\\\ '_ \\\\ / _\\` |/ _ \\\\/ _\\` |\n |  __/ (_| | (_| | ||  __/ | | | (_| |  __/ (_| |\n  \\\\___|\\\\__, |\\\\__, |\\\\__\\\\___|_| |_|\\\\__,_|\\\\___|\\\\__,_|\n        __/ | __/ |\n       |___/ |___/\n` +\n      colors.DEFAULT\n  );\n  console.log(`Version ${TopEnv[\"__VERSION__\"]}`);\n  console.log(\"Created by David Afonso Dorta. License: GPLv2\");\n});\n\nconst eggClear = (TopEnv[\"clear\"] = () => {\n  console.log(\"\\u001B[2J\\u001B[0;0f\");\n  eggInfo();\n});\n\nconst eggVersion = (TopEnv[\n  \"__VERSION__\"\n] = require(\"../../package.json\").version);\n\nconst eggRun = (TopEnv[\"run\"] = (file, debug) => {\n  if (debug) {\n    console.log(fs.readFileSync(file, \"utf8\"));\n  }\n\n  Eggvm.runFromFile(file);\n});\n\nconst eggCompleter = (line, env) => {\n  // Test if get hits from current directory\n  let hits = dirHits(line);\n\n  // Show hits from the REPL variables\n  if (hits.length === 0) {\n    const word = line.split(/[\\s(),\"]+/).slice(-1)[0];\n    hits = _filter(Object.keys(SpecialForms).concat(_allProperties(env)), word);\n  }\n\n  return [hits, line];\n};\n\nconst _allProperties = obj => {\n  let keys = [];\n\n  let proto = obj;\n  while (proto) {\n    keys = keys.concat(Object.keys(proto));\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return keys;\n};\n\nconst dirHits = line => {\n  const match = line.match(/(?:run)\\((.*)/);\n  if (match) {\n    const path = match[1]\n      .replace(/[\"'`]/, \"\")\n      .trim()\n      .split(\"/\");\n    const dirPath = path.slice(0, -1);\n    const filePath = path.slice(-1);\n\n    try {\n      return _filter(fs.readdirSync(`./${dirPath}`), filePath);\n    } catch (err) {\n      return [];\n    }\n  }\n\n  return [];\n};\n\nconst _filter = (hits, word) => {\n  return hits.filter(hit => {\n    return hit.indexOf(word) === 0;\n  });\n};\n\nmodule.exports = {\n  getPromptLine,\n  eggExit,\n  eggHelp,\n  eggInfo,\n  eggClear,\n  eggVersion,\n  eggRun,\n  eggCompleter\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/repl/extensions.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 172,
    "kind": "variable",
    "name": "HELP",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~HELP",
    "access": "public",
    "export": false,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 25,
    "undocument": true,
    "type": {
      "types": [
        "undefined[]"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 173,
    "kind": "function",
    "name": "_allProperties",
    "memberof": "lib/repl/extensions.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/extensions.js~_allProperties",
    "access": "private",
    "export": false,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 90,
    "undocument": true,
    "params": [
      {
        "name": "obj",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 174,
    "kind": "function",
    "name": "dirHits",
    "memberof": "lib/repl/extensions.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/extensions.js~dirHits",
    "access": "public",
    "export": false,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 102,
    "undocument": true,
    "params": [
      {
        "name": "line",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*[]"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 175,
    "kind": "function",
    "name": "_filter",
    "memberof": "lib/repl/extensions.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/extensions.js~_filter",
    "access": "private",
    "export": false,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 122,
    "undocument": true,
    "params": [
      {
        "name": "hits",
        "types": [
          "*"
        ]
      },
      {
        "name": "word",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 176,
    "kind": "function",
    "name": "getPromptLine",
    "memberof": "lib/repl/extensions.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/extensions.js~getPromptLine",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{getPromptLine}",
    "description": null,
    "lineNumber": 14,
    "undocument": true,
    "params": [],
    "return": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 177,
    "kind": "variable",
    "name": "eggExit",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggExit",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggExit}",
    "description": null,
    "lineNumber": 20,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 178,
    "kind": "variable",
    "name": "eggHelp",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggHelp",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggHelp}",
    "description": null,
    "lineNumber": 32,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 179,
    "kind": "variable",
    "name": "eggInfo",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggInfo",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggInfo}",
    "description": null,
    "lineNumber": 41,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 180,
    "kind": "variable",
    "name": "eggClear",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggClear",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggClear}",
    "description": null,
    "lineNumber": 60,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 181,
    "kind": "variable",
    "name": "eggVersion",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggVersion",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggVersion}",
    "description": null,
    "lineNumber": 65,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 182,
    "kind": "variable",
    "name": "eggRun",
    "memberof": "lib/repl/extensions.js",
    "static": true,
    "longname": "lib/repl/extensions.js~eggRun",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggRun}",
    "description": null,
    "lineNumber": 69,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 183,
    "kind": "function",
    "name": "eggCompleter",
    "memberof": "lib/repl/extensions.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/extensions.js~eggCompleter",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/extensions.js",
    "importStyle": "{eggCompleter}",
    "description": null,
    "lineNumber": 77,
    "undocument": true,
    "params": [
      {
        "name": "line",
        "types": [
          "*"
        ]
      },
      {
        "name": "env",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "undefined[]"
      ]
    }
  },
  {
    "__docId__": 184,
    "kind": "file",
    "name": "lib/repl/repl.js",
    "content": "const process = require(\"process\");\nconst readline = require(\"readline\");\n\nconst { Lexer } = require(\"../parser/lexer.js\");\nconst { Parser } = require(\"../parser/parse.js\");\nconst { TopEnv } = require(\"../interp/environment.js\");\nconst { Eggvm } = require(\"../interp/eggvm.js\");\n\nconst extensions = require(\"./extensions.js\");\nconst colors = require(\"./colors.js\");\n\nconst repl = () => {\n  // Create the REPL environment\n  const topEnv = Object.create(TopEnv);\n  const lexer = new Lexer();\n  const parser = new Parser();\n\n  let program = \"\";\n  let stack = 0;\n\n  extensions.eggInfo();\n\n  try {\n    const rl = readline.createInterface(process.stdin, process.stdout, line => {\n      return extensions.eggCompleter(line, topEnv);\n    });\n\n    rl.setPrompt(extensions.getPromptLine());\n    rl.prompt();\n\n    rl.on(\"line\", line => {\n      program += line + \"\\n\";\n\n      // Count the number of LPS (+) or RPS (-)\n      stack = lexer.getParBalance(program);\n\n      if (stack <= 0) {\n        try {\n          Eggvm.eval(parser.parse(program), topEnv);\n        } catch (err) {\n          console.log(`${colors.RED} Error:: ${err} ${colors.DEFAULT}`);\n        } finally {\n          program = \"\";\n          stack = 0;\n        }\n      }\n\n      rl.setPrompt(extensions.getPromptLine() + \"..\".repeat(stack));\n      rl.prompt();\n    });\n\n    rl.on(\"close\", extensions.eggExit);\n\n    rl.on(\"SIGINT\", () => {\n      console.log(\n        `\\n${colors.GREEN}\\n--> Expression discarded ${colors.DEFAULT}`\n      );\n\n      program = \"\";\n      stack = 0;\n\n      rl.clearLine(process.stdout);\n\n      rl.setPrompt(extensions.getPromptLine());\n      rl.prompt();\n    });\n  } catch (err) {\n    console.log(err);\n    extensions.eggHelp();\n  }\n};\n\nmodule.exports = {\n  repl\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/repl/repl.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 185,
    "kind": "function",
    "name": "repl",
    "memberof": "lib/repl/repl.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/repl/repl.js~repl",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/repl/repl.js",
    "importStyle": "{repl}",
    "description": null,
    "lineNumber": 12,
    "undocument": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 186,
    "kind": "file",
    "name": "lib/utils.js",
    "content": "const inspect = require(\"util\").inspect;\n\nconst ins = x => inspect(x, { depth: \"null\" });\n\nconst chunk = function*(arr, step) {\n  for (let i = 0; i < arr.length; i += step) {\n    yield arr.slice(i, i + step);\n  }\n};\n\nconst checkIterable = (object, length) => {\n  if (length === 0) {\n    throw new SyntaxError(\"At least one index must be passed to sub\");\n  }\n\n  if (object instanceof Number || object instanceof String) {\n    throw new TypeError(`The object '${object}'' is not indexable!`);\n  }\n};\n\nconst getValidIndex = (length, index) => {\n  if (index < 0) {\n    index = length + index;\n  }\n\n  if (index > length) {\n    throw new RangeError(`Index ${index} is out of bounds. Array size: ${length}`);\n  }\n\n  return index;\n};\n\nmodule.exports = {\n  chunk,\n  checkIterable,\n  getValidIndex,\n  ins\n};\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/lib/utils.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 187,
    "kind": "function",
    "name": "chunk",
    "memberof": "lib/utils.js",
    "generator": true,
    "async": false,
    "static": true,
    "longname": "lib/utils.js~chunk",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/utils.js",
    "importStyle": "{chunk}",
    "description": null,
    "lineNumber": 5,
    "undocument": true,
    "params": [
      {
        "name": "arr",
        "types": [
          "*"
        ]
      },
      {
        "name": "step",
        "types": [
          "*"
        ]
      }
    ],
    "return": null
  },
  {
    "__docId__": 188,
    "kind": "function",
    "name": "checkIterable",
    "memberof": "lib/utils.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/utils.js~checkIterable",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/utils.js",
    "importStyle": "{checkIterable}",
    "description": null,
    "lineNumber": 11,
    "undocument": true,
    "params": [
      {
        "name": "object",
        "types": [
          "*"
        ]
      },
      {
        "name": "length",
        "types": [
          "*"
        ]
      }
    ],
    "return": null
  },
  {
    "__docId__": 189,
    "kind": "function",
    "name": "getValidIndex",
    "memberof": "lib/utils.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/utils.js~getValidIndex",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/utils.js",
    "importStyle": "{getValidIndex}",
    "description": null,
    "lineNumber": 21,
    "undocument": true,
    "params": [
      {
        "name": "length",
        "types": [
          "*"
        ]
      },
      {
        "name": "index",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 190,
    "kind": "function",
    "name": "ins",
    "memberof": "lib/utils.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "lib/utils.js~ins",
    "access": "public",
    "export": true,
    "importPath": "eggtended-js/lib/utils.js",
    "importStyle": "{ins}",
    "description": null,
    "lineNumber": 3,
    "undocument": true,
    "params": [
      {
        "name": "x",
        "types": [
          "*"
        ]
      }
    ],
    "return": null
  },
  {
    "kind": "index",
    "content": "![Eggtended Logo](https://i.imgur.com/9N4qe98.png)\n\nAn extended version of the **Egg** programming language from the _\"Eloquent Javascript\"_ book.\n\n|                                                          Build                                                          |                                                                             Coverage                                                                             |                                                                                                                     Quality                                                                                                                     |                                                              Documentation                                                               |                                                                 License                                                                  |\n| :---------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: |\n| [![Build Status](https://travis-ci.org/Dibad/eggtended-js.svg?branch=master)](https://travis-ci.org/Dibad/eggtended-js) | [![Coverage Status](https://coveralls.io/repos/github/Dibad/eggtended-js/badge.svg?branch=master)](https://coveralls.io/github/Dibad/eggtended-js?branch=master) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/60277e744287497ebf0433a7c004b650)](https://www.codacy.com/app/Dibad/eggtended-js?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Dibad/eggtended-js&amp;utm_campaign=Badge_Grade) | [![Document Badge](https://doc.esdoc.org/github.com/Dibad/eggtended-js/badge.svg)](https://doc.esdoc.org/github.com/Dibad/eggtended-js/) | [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) |\n\n## Author\n\n**David Afonso Dorta** - [University of La Laguna](https://www.ull.es/grados/ingenieria-informatica/). Computer Engineering, 3rd year\n",
    "longname": "/home/dav/eggtended-js/README.md",
    "name": "./README.md",
    "static": true,
    "access": "public"
  },
  {
    "kind": "packageJSON",
    "content": "{\n  \"name\": \"eggtended-js\",\n  \"version\": \"1.6.0\",\n  \"description\": \"A extended version of the Egg programming language from the Eloquent Javascript book.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"nyc mocha\",\n    \"coverage\": \"nyc report --reporter=text-lcov | coveralls\",\n    \"docs\": \"./node_modules/.bin/esdoc -c esdoc.json\",\n    \"pre-commit-install\": \"pre-commit install\"\n  },\n  \"keywords\": [\n    \"Egg\",\n    \"Parser\",\n    \"Interpreter\",\n    \"Programming\",\n    \"Language\"\n  ],\n  \"author\": \"David Afonso Dorta\",\n  \"license\": \"GPL-3.0\",\n  \"devDependencies\": {\n    \"coveralls\": \"^3.0.3\",\n    \"esdoc\": \"^1.1.0\",\n    \"esdoc-standard-plugin\": \"^1.0.0\",\n    \"eslint\": \"^5.16.0\",\n    \"husky\": \"^2.3.0\",\n    \"lint-staged\": \"^8.1.7\",\n    \"mocha\": \"^6.1.2\",\n    \"mocha-lcov-reporter\": \"^1.3.0\",\n    \"nyc\": \"^13.3.0\",\n    \"pre-commit\": \"^1.2.2\",\n    \"should\": \"^13.2.3\",\n    \"sinon\": \"^7.3.1\"\n  },\n  \"dependencies\": {\n    \"ansi-styles\": \"^3.2.1\",\n    \"xregexp\": \"^4.2.4\"\n  },\n  \"husky\": {\n    \"hooks\": {\n      \"pre-commit\": \"lint-staged\"\n    }\n  },\n  \"lint-staged\": {\n    \"linters\": {\n      \"*.js\": [\n        \"prettier --write\",\n        \"eslint --fix\",\n        \"nyc mocha\",\n        \"npm run docs --\",\n        \"git add\"\n      ]\n    },\n    \"ignore\": [\n      \"**/docs/**/*.js\"\n    ]\n  }\n}\n",
    "longname": "/home/dav/eggtended-js/package.json",
    "name": "package.json",
    "static": true,
    "access": "public"
  },
  {
    "__docId__": 191,
    "kind": "testFile",
    "name": "test/examples-test.js",
    "content": "const fs = require(\"fs\");\nconst should = require(\"should\");\nconst sinon = require(\"sinon\");\n\nconst { Parser } = require(\"../lib/parser/parse.js\");\nconst { Eggvm } = require(\"../lib/interp/eggvm.js\");\nconst parser = new Parser();\n\ndescribe(\"Testing programs from 'examples/' folder\", () => {\n  // Spy calls to 'console.log'\n  beforeEach(() => {\n    this.logSpy = sinon.spy(console, \"log\");\n  });\n\n  afterEach(() => {\n    this.logSpy.restore();\n  });\n\n  // Method to test the number and values of 'logSpy' calls\n  const assertOutput = outs => {\n    this.logSpy.callCount.should.be.eql(outs.length);\n    outs.forEach((output, index) => {\n      this.logSpy\n        .getCall(index)\n        .calledWithExactly(output)\n        .should.be.true();\n    });\n  };\n\n  // Method for creating and executing the dynamic tests\n  const executeTests = tests => {\n    tests.forEach((outputs, file) => {\n      // Path to the related .evm file\n      const fileEVM = file + \".evm\";\n\n      describe(`Test for ${file}`, () => {\n        // -- TEST PARSING --\n        it(\"should be parsed correctly\", () => {\n          const rawData = fs.readFileSync(fileEVM);\n          const expectedTree = JSON.parse(rawData);\n\n          parser.parseFromFile(file).should.match(expectedTree);\n        });\n\n        // -- TEST EXECUTION --\n        if (Array.isArray(outputs)) {\n          it(\"should print the expected output after execution\", () => {\n            // Eggvm.runFromEVM(fileEVM);\n            Eggvm.runFromEVM(fileEVM);\n            assertOutput(outputs);\n          });\n        } else {\n          it(`should throw an exception of type ${outputs.name}`, () => {\n            should.throws(() => {\n              Eggvm.runFromFile(file);\n            }, outputs);\n          });\n        }\n      });\n    });\n  };\n\n  // Define tests\n  const tests = new Map();\n\n  tests.set(\"examples/one.egg\", [50]);\n  tests.set(\"examples/two.egg\", [9]);\n  tests.set(\"examples/scope.egg\", [9, 8]);\n  tests.set(\"examples/scope-err.egg\", ReferenceError);\n  tests.set(\"examples/boolean.egg\", [\"true\"]);\n\n  tests.set(\"examples/string.egg\", [\"s\"]);\n  tests.set(\"examples/sum.egg\", [395.5]);\n  tests.set(\"examples/reto.egg\", [\"sum(array[1, 2, 3]) := 6\"]);\n\n  tests.set(\"examples/array.egg\", [[1, 4], 5]);\n  tests.set(\"examples/array-index.egg\", [1, [2, 3], 3, 3, 2]);\n  tests.set(\"examples/array-properties.egg\", [1, [5, 3], 3]);\n\n  tests.set(\"examples/set-error.egg\", TypeError);\n  tests.set(\"examples/set-error2.egg\", TypeError);\n\n  tests.set(\"examples/method3.egg\", [\"A-B-C\"]);\n  tests.set(\"examples/method-concatenation.egg\", [\"1-hello egg\"]);\n  tests.set(\"examples/property.egg\", [2, 3]);\n\n  tests.set(\"examples/string-apply.egg\", [5, \"4.00\", 19]);\n  tests.set(\"examples/operators-arithm.egg\", [6, 5, 10, -5, 0, -10]);\n  tests.set(\"examples/operators-arithm-errors.egg\", [\n    \"Bad use of ++\",\n    \"Bad use of --\",\n    \"Bad use of +=\",\n    \"Bad use of -=\"\n  ]);\n\n  tests.set(\"examples/map.egg\", [\n    new Map([[\"x\", 4], [\"y\", new Map([[\"z\", 3]])]]),\n    4,\n    new Map([[\"z\", 3]]),\n    3,\n    new Map([[\"z\", 50]])\n  ]);\n\n  tests.set(\"examples/map-colon.egg\", [\n    new Map([[\"x\", 4], [\"y\", new Map([[\"z\", 3]])]]),\n    4,\n    new Map([[\"z\", 3]]),\n    3,\n    new Map([[\"z\", 50]])\n  ]);\n\n  tests.set(\"examples/multi-sub-set.egg\", [\n    1,\n    new Map([[\"x\", 2], [\"y\", [3, 4]]]),\n    [3, 4],\n    new Map([[\"x\", 2], [\"y\", 5]]),\n    [0, 1]\n  ]);\n\n  tests.set(\"examples/map-sub.egg\", [1, new Map([[\"d\", 5], [\"e\", 3]]), 3]);\n  tests.set(\"examples/fun-inside-map.egg\", [7, 4]);\n\n  tests.set(\"examples/missing.egg\", [9]);\n  tests.set(\"examples/missing-err.egg\", SyntaxError);\n  tests.set(\"examples/objects.egg\", [0, 4, 5]);\n  tests.set(\"examples/regex.egg\", [true, 0, \"2015\", \"02\"]);\n\n  tests.set(\"examples/dot.egg\", [\"1-4-5\", 5]);\n  tests.set(\"examples/dot-obj-2.egg\", [0, 0, 0, 5, 5, 5]);\n  tests.set(\"examples/dot-num.egg\", [\"4.00\", \"4.00\", \"4.00\"]);\n\n  tests.set(\"examples/for.egg\", [0, 1, 2, 3, 4]);\n  tests.set(\"examples/foreach.egg\", [1, 2, 3, \"A\", \"B\", \"C\"]);\n\n  tests.set(\"examples/client.egg\", [\"inside module\", 5, 5, 3]);\n  tests.set(\"examples/ects-context.egg\", [0, 4, 5]);\n  tests.set(\"examples/child.egg\", [5, 5, 5]);\n\n  tests.set(\"examples/const.egg\", ReferenceError);\n  // tests.set(\"examples/const-2.egg\", [5, 5]);\n  tests.set(\"examples/const-3.egg\", ReferenceError);\n\n  tests.set(\"examples/trycatch.egg\", [\"Caught error! 42\", 20, \"Finally called\"]);\n  tests.set(\"examples/trycatch-2.egg\", [\n    \"Inner catch. Rethrowing...\",\n    \"Outer catch. 42\"\n  ]);\n\n  tests.set(\"examples/type-conversion.egg\", [false]);\n\n  // Execute all the defined tests\n  executeTests(tests);\n});\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/test/examples-test.js",
    "access": null,
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 192,
    "kind": "test",
    "name": "describe0",
    "testId": 0,
    "memberof": "test/examples-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/examples-test.js~describe0",
    "access": null,
    "description": "Testing programs from 'examples/' folder",
    "lineNumber": 9
  },
  {
    "__docId__": 193,
    "kind": "test",
    "name": "describe1",
    "testId": 1,
    "memberof": "test/examples-test.js~describe0",
    "testDepth": 1,
    "static": true,
    "longname": "test/examples-test.js~describe0.describe1",
    "access": null,
    "lineNumber": 36
  },
  {
    "__docId__": 194,
    "kind": "test",
    "name": "it2",
    "testId": 2,
    "memberof": "test/examples-test.js~describe0.describe1",
    "testDepth": 2,
    "static": true,
    "longname": "test/examples-test.js~describe0.describe1.it2",
    "access": null,
    "description": "should be parsed correctly",
    "lineNumber": 38
  },
  {
    "__docId__": 195,
    "kind": "test",
    "name": "it3",
    "testId": 3,
    "memberof": "test/examples-test.js~describe0.describe1",
    "testDepth": 2,
    "static": true,
    "longname": "test/examples-test.js~describe0.describe1.it3",
    "access": null,
    "description": "should print the expected output after execution",
    "lineNumber": 47
  },
  {
    "__docId__": 196,
    "kind": "test",
    "name": "it4",
    "testId": 4,
    "memberof": "test/examples-test.js~describe0.describe1",
    "testDepth": 2,
    "static": true,
    "longname": "test/examples-test.js~describe0.describe1.it4",
    "access": null,
    "lineNumber": 53
  },
  {
    "__docId__": 197,
    "kind": "testFile",
    "name": "test/lexer-test.js",
    "content": "const fs = require(\"fs\");\nrequire(\"should\");\nconst sinon = require(\"sinon\");\n\nconst { Lexer } = require(\"../lib/parser/lexer.js\");\n\ndescribe(\"Testing Lexer class behaviour\", () => {\n  const lexer = new Lexer();\n\n  before(() => {\n    const readFileSyncStub = sinon.stub(fs, \"readFileSync\");\n\n    const program = \"do(print(3))\";\n    readFileSyncStub.withArgs(\"testfile\", \"utf-8\").returns(program);\n  });\n\n  after(() => {\n    fs.readFileSync.restore();\n  });\n\n  it(\"should be able to tokenize a line and count the LP-RP balance\", () => {\n    // Perfectly balanced, as all things should be\n    let parBalance = lexer.getParBalance(\"foo()\");\n    parBalance.should.be.exactly(0);\n\n    parBalance = lexer.getParBalance(\"foo.bar()\");\n    parBalance.should.be.exactly(0);\n\n    parBalance = lexer.getParBalance(\"hue[\");\n    parBalance.should.be.exactly(1);\n\n    parBalance = lexer.getParBalance(\"];\");\n    parBalance.should.be.exactly(-1);\n  });\n\n  it(\"should tokenize from a file\", () => {\n    const tokens = Lexer.tokenizeFromFile(\"testfile\");\n    console.log(tokens);\n  });\n});\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/test/lexer-test.js",
    "access": null,
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 198,
    "kind": "test",
    "name": "describe5",
    "testId": 5,
    "memberof": "test/lexer-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/lexer-test.js~describe5",
    "access": null,
    "description": "Testing Lexer class behaviour",
    "lineNumber": 7
  },
  {
    "__docId__": 199,
    "kind": "test",
    "name": "it6",
    "testId": 6,
    "memberof": "test/lexer-test.js~describe5",
    "testDepth": 1,
    "static": true,
    "longname": "test/lexer-test.js~describe5.it6",
    "access": null,
    "description": "should be able to tokenize a line and count the LP-RP balance",
    "lineNumber": 21
  },
  {
    "__docId__": 200,
    "kind": "test",
    "name": "it7",
    "testId": 7,
    "memberof": "test/lexer-test.js~describe5",
    "testDepth": 1,
    "static": true,
    "longname": "test/lexer-test.js~describe5.it7",
    "access": null,
    "description": "should tokenize from a file",
    "lineNumber": 36
  },
  {
    "__docId__": 201,
    "kind": "testFile",
    "name": "test/tokenRegex-test.js",
    "content": "const tokenRegex = require(\"../lib/parser/tokenRegex.js\");\nconst should = require(\"should\");\n\ndescribe(\"Regex for LP token\", () => {\n  it(\"should recognize ( as valid a token\", () => {\n    const expected = { type: \"LP\", value: \"(\", start: 1, end: 1 };\n    tokenRegex.LP.reset()\n      .exec(\"(\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should treat { as a synonym for (\", () => {\n    const expected = { type: \"LP\", value: \"{\", start: 1, end: 1 };\n    tokenRegex.LP.reset()\n      .exec(\"{\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should treat [ as a synonym for (\", () => {\n    const expected = { type: \"LP\", value: \"[\", start: 1, end: 1 };\n    tokenRegex.LP.reset()\n      .exec(\"[\")\n      .should.be.eql(expected);\n  });\n});\n\ndescribe(\"Regex for RP token\", () => {\n  it(\"should recognize ) as valid a token\", () => {\n    const expected = { type: \"RP\", value: \")\", start: 1, end: 1 };\n    tokenRegex.RP.reset()\n      .exec(\")\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should treat } as a synonym for )\", () => {\n    const expected = { type: \"RP\", value: \"}\", start: 1, end: 1 };\n    tokenRegex.RP.reset()\n      .exec(\"}\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should treat ] as a synonym for )\", () => {\n    const expected = { type: \"RP\", value: \"]\", start: 1, end: 1 };\n    tokenRegex.RP.reset()\n      .exec(\"]\")\n      .should.be.eql(expected);\n  });\n});\n\ndescribe(\"Regex for COMMA token\", () => {\n  it(\"should recognize , as valid a token\", () => {\n    const expected = { type: \"COMMA\", value: \",\", start: 1, end: 1 };\n    tokenRegex.COMMA.reset()\n      .exec(\",\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should recognize the : as an alias for ,\", () => {\n    const expected = { type: \"COMMA\", value: \":\", start: 1, end: 1 };\n    tokenRegex.COMMA.reset()\n      .exec(\":\")\n      .should.be.eql(expected);\n\n    // Only when is not followed by a =\n    should.not.exists(tokenRegex.COMMA.reset().exec(\":=\"));\n  });\n});\n\ndescribe(\"Regex for WHITES token\", () => {\n  it(\"should recognize any quantity of space\", () => {\n    const expected = { type: \"WHITE\", value: \"  \", start: 1, end: 2 };\n    tokenRegex.WHITES.reset()\n      .exec(\"  \")\n      .should.be.eql(expected);\n  });\n\n  it(\"should recognize as white even strings with newlines\", () => {\n    const expected = { type: \"WHITE\", value: \"  \\n  \", start: 1, end: 5 };\n    tokenRegex.WHITES.reset()\n      .exec(\"  \\n  \")\n      .should.be.eql(expected);\n  });\n\n  it(\"should recognize as white one-line comments with # or ;\", () => {\n    let expected = { type: \"WHITE\", value: \"# commen t\", start: 1, end: 10 };\n    tokenRegex.WHITES.reset()\n      .exec(\"# commen t\")\n      .should.be.eql(expected);\n\n    expected = { type: \"WHITE\", value: \"; commen t\", start: 1, end: 10 };\n    tokenRegex.WHITES.reset()\n      .exec(\"; commen t\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should recognize as white multiline commments with /* */\", () => {\n    const expected = {\n      type: \"WHITE\",\n      value: \"/* this is \\n a multiline\\n comment */\",\n      start: 1,\n      end: 36\n    };\n    tokenRegex.WHITES.reset()\n      .exec(\"/* this is \\n a multiline\\n comment */\")\n      .should.be.eql(expected);\n  });\n});\n\ndescribe(\"Regex for STRING token\", () => {\n  it('should recognize anything between \" \" as valid a token', () => {\n    const expected = {\n      type: \"STRING\",\n      value: \"hello world\",\n      start: 3,\n      end: 13\n    };\n    tokenRegex.STRING.reset()\n      .exec('\"hello world\"')\n      .should.be.eql(expected);\n  });\n\n  it('shouldn\\'t recognize strings without \" \". Those are words', () => {\n    should.not.exists(tokenRegex.STRING.reset().exec(\"hello world\"));\n  });\n});\n\ndescribe(\"Regex for WORD token\", () => {\n  it(\"shouldn't include some special characters on the identifier\", () => {\n    const expected = { type: \"WORD\", value: \"fun\", start: 1, end: 3 };\n    tokenRegex.WORD.reset()\n      .exec(\"fun()\")\n      .should.be.eql(expected);\n    tokenRegex.WORD.reset()\n      .exec(\"fun[]\")\n      .should.be.eql(expected);\n    tokenRegex.WORD.reset()\n      .exec(\"fun{}\")\n      .should.be.eql(expected);\n    tokenRegex.WORD.reset()\n      .exec(\"fun, \")\n      .should.be.eql(expected);\n    tokenRegex.WORD.reset()\n      .exec(\"fun:, \")\n      .should.be.eql(expected);\n  });\n\n  it(\"should detect [] as a whole WORD, instead of LP, RP\", () => {\n    const expected = { type: \"WORD\", value: \"[]\", start: 1, end: 2 };\n    tokenRegex.WORD.reset()\n      .exec(\"[]\")\n      .should.be.eql(expected);\n  });\n\n  it(\"should detect := as a whole WORD; instead of COMMA, WORD\", () => {\n    const expected = { type: \"WORD\", value: \":=\", start: 1, end: 2 };\n    tokenRegex.WORD.reset()\n      .exec(\":=\")\n      .should.be.eql(expected);\n  });\n});\n\ndescribe(\"Regex for NUMBER token\", () => {\n  it(\"should match integers, with and without sign\", () => {\n    // Normal int\n    let expected = { type: \"NUMBER\", value: \"323\", start: 1, end: 3 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"323\")\n      .should.be.eql(expected);\n\n    // With positive sign\n    expected = { type: \"NUMBER\", value: \"+2\", start: 1, end: 2 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"+2\")\n      .should.be.eql(expected);\n\n    // With negative sign\n    expected = { type: \"NUMBER\", value: \"-123\", start: 1, end: 4 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"-123\")\n      .should.be.eql(expected);\n\n    // Signs can't go alone!!\n    should.not.exists(tokenRegex.NUMBER.reset().exec(\"-\"));\n    should.not.exists(tokenRegex.NUMBER.reset().exec(\"+\"));\n  });\n\n  it(\"should match for floats, floating point and exponential notation\", () => {\n    // Normal float\n    let expected = { type: \"NUMBER\", value: \"12.34\", start: 1, end: 5 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"12.34\")\n      .should.be.eql(expected);\n\n    // Float starting with .\n    expected = { type: \"NUMBER\", value: \".35\", start: 1, end: 3 };\n    tokenRegex.NUMBER.reset()\n      .exec(\".35\")\n      .should.be.eql(expected);\n\n    // Float in exponential notation\n    expected = { type: \"NUMBER\", value: \"2e5\", start: 1, end: 3 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"2e5\")\n      .should.be.eql(expected);\n\n    // Float with decimals and exponential notation\n    expected = { type: \"NUMBER\", value: \"45.8e5\", start: 1, end: 6 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"45.8e5\")\n      .should.be.eql(expected);\n\n    // Float with exponential notation with sign and E\n    expected = { type: \"NUMBER\", value: \"8E-34\", start: 1, end: 5 };\n    tokenRegex.NUMBER.reset()\n      .exec(\"8E-34\")\n      .should.be.eql(expected);\n\n    // Shouldn't match exponential alone or without exponential num\n    should.not.exists(tokenRegex.NUMBER.reset().exec(\"e45\"));\n    should.not.exists(tokenRegex.NUMBER.reset().exec(\"E\"));\n  });\n});\n",
    "static": true,
    "longname": "/home/dav/eggtended-js/test/tokenRegex-test.js",
    "access": null,
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 202,
    "kind": "test",
    "name": "describe8",
    "testId": 8,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe8",
    "access": null,
    "description": "Regex for LP token",
    "lineNumber": 4
  },
  {
    "__docId__": 203,
    "kind": "test",
    "name": "it9",
    "testId": 9,
    "memberof": "test/tokenRegex-test.js~describe8",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe8.it9",
    "access": null,
    "description": "should recognize ( as valid a token",
    "lineNumber": 5
  },
  {
    "__docId__": 204,
    "kind": "test",
    "name": "it10",
    "testId": 10,
    "memberof": "test/tokenRegex-test.js~describe8",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe8.it10",
    "access": null,
    "description": "should treat { as a synonym for (",
    "lineNumber": 12
  },
  {
    "__docId__": 205,
    "kind": "test",
    "name": "it11",
    "testId": 11,
    "memberof": "test/tokenRegex-test.js~describe8",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe8.it11",
    "access": null,
    "description": "should treat [ as a synonym for (",
    "lineNumber": 19
  },
  {
    "__docId__": 206,
    "kind": "test",
    "name": "describe12",
    "testId": 12,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe12",
    "access": null,
    "description": "Regex for RP token",
    "lineNumber": 27
  },
  {
    "__docId__": 207,
    "kind": "test",
    "name": "it13",
    "testId": 13,
    "memberof": "test/tokenRegex-test.js~describe12",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe12.it13",
    "access": null,
    "description": "should recognize ) as valid a token",
    "lineNumber": 28
  },
  {
    "__docId__": 208,
    "kind": "test",
    "name": "it14",
    "testId": 14,
    "memberof": "test/tokenRegex-test.js~describe12",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe12.it14",
    "access": null,
    "description": "should treat } as a synonym for )",
    "lineNumber": 35
  },
  {
    "__docId__": 209,
    "kind": "test",
    "name": "it15",
    "testId": 15,
    "memberof": "test/tokenRegex-test.js~describe12",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe12.it15",
    "access": null,
    "description": "should treat ] as a synonym for )",
    "lineNumber": 42
  },
  {
    "__docId__": 210,
    "kind": "test",
    "name": "describe16",
    "testId": 16,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe16",
    "access": null,
    "description": "Regex for COMMA token",
    "lineNumber": 50
  },
  {
    "__docId__": 211,
    "kind": "test",
    "name": "it17",
    "testId": 17,
    "memberof": "test/tokenRegex-test.js~describe16",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe16.it17",
    "access": null,
    "description": "should recognize , as valid a token",
    "lineNumber": 51
  },
  {
    "__docId__": 212,
    "kind": "test",
    "name": "it18",
    "testId": 18,
    "memberof": "test/tokenRegex-test.js~describe16",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe16.it18",
    "access": null,
    "description": "should recognize the : as an alias for ,",
    "lineNumber": 58
  },
  {
    "__docId__": 213,
    "kind": "test",
    "name": "describe19",
    "testId": 19,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe19",
    "access": null,
    "description": "Regex for WHITES token",
    "lineNumber": 69
  },
  {
    "__docId__": 214,
    "kind": "test",
    "name": "it20",
    "testId": 20,
    "memberof": "test/tokenRegex-test.js~describe19",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe19.it20",
    "access": null,
    "description": "should recognize any quantity of space",
    "lineNumber": 70
  },
  {
    "__docId__": 215,
    "kind": "test",
    "name": "it21",
    "testId": 21,
    "memberof": "test/tokenRegex-test.js~describe19",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe19.it21",
    "access": null,
    "description": "should recognize as white even strings with newlines",
    "lineNumber": 77
  },
  {
    "__docId__": 216,
    "kind": "test",
    "name": "it22",
    "testId": 22,
    "memberof": "test/tokenRegex-test.js~describe19",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe19.it22",
    "access": null,
    "description": "should recognize as white one-line comments with # or ;",
    "lineNumber": 84
  },
  {
    "__docId__": 217,
    "kind": "test",
    "name": "it23",
    "testId": 23,
    "memberof": "test/tokenRegex-test.js~describe19",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe19.it23",
    "access": null,
    "description": "should recognize as white multiline commments with /* */",
    "lineNumber": 96
  },
  {
    "__docId__": 218,
    "kind": "test",
    "name": "describe24",
    "testId": 24,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe24",
    "access": null,
    "description": "Regex for STRING token",
    "lineNumber": 109
  },
  {
    "__docId__": 219,
    "kind": "test",
    "name": "it25",
    "testId": 25,
    "memberof": "test/tokenRegex-test.js~describe24",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe24.it25",
    "access": null,
    "description": "should recognize anything between \" \" as valid a token",
    "lineNumber": 110
  },
  {
    "__docId__": 220,
    "kind": "test",
    "name": "it26",
    "testId": 26,
    "memberof": "test/tokenRegex-test.js~describe24",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe24.it26",
    "access": null,
    "description": "shouldn't recognize strings without \" \". Those are words",
    "lineNumber": 122
  },
  {
    "__docId__": 221,
    "kind": "test",
    "name": "describe27",
    "testId": 27,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe27",
    "access": null,
    "description": "Regex for WORD token",
    "lineNumber": 127
  },
  {
    "__docId__": 222,
    "kind": "test",
    "name": "it28",
    "testId": 28,
    "memberof": "test/tokenRegex-test.js~describe27",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe27.it28",
    "access": null,
    "description": "shouldn't include some special characters on the identifier",
    "lineNumber": 128
  },
  {
    "__docId__": 223,
    "kind": "test",
    "name": "it29",
    "testId": 29,
    "memberof": "test/tokenRegex-test.js~describe27",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe27.it29",
    "access": null,
    "description": "should detect [] as a whole WORD, instead of LP, RP",
    "lineNumber": 147
  },
  {
    "__docId__": 224,
    "kind": "test",
    "name": "it30",
    "testId": 30,
    "memberof": "test/tokenRegex-test.js~describe27",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe27.it30",
    "access": null,
    "description": "should detect := as a whole WORD; instead of COMMA, WORD",
    "lineNumber": 154
  },
  {
    "__docId__": 225,
    "kind": "test",
    "name": "describe31",
    "testId": 31,
    "memberof": "test/tokenRegex-test.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe31",
    "access": null,
    "description": "Regex for NUMBER token",
    "lineNumber": 162
  },
  {
    "__docId__": 226,
    "kind": "test",
    "name": "it32",
    "testId": 32,
    "memberof": "test/tokenRegex-test.js~describe31",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe31.it32",
    "access": null,
    "description": "should match integers, with and without sign",
    "lineNumber": 163
  },
  {
    "__docId__": 227,
    "kind": "test",
    "name": "it33",
    "testId": 33,
    "memberof": "test/tokenRegex-test.js~describe31",
    "testDepth": 1,
    "static": true,
    "longname": "test/tokenRegex-test.js~describe31.it33",
    "access": null,
    "description": "should match for floats, floating point and exponential notation",
    "lineNumber": 187
  }
]