{ "type": "File", "start": 0, "end": 1081, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 46, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1081, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 46, "column": 0 } }, "sourceType": "module", "body": [ { "type": "Identifier", "start": 16, "end": 1065, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 43, "column": 1 } }, "id": { "type": "Identifier", "start": 22, "end": 25, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 9 }, "identifierName": "Map" }, "name": "Map", "leadingComments": null }, "superClass": null, "body": { "type": "ClassBody", "start": 26, "end": 1065, "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 43, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 33, "end": 149, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 7, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 33, "end": 44, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 45, "end": 50, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 21 }, "identifierName": "items" }, "name": "items" }, { "type": "Identifier", "start": 52, "end": 58, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 29 }, "identifierName": "baseId" }, "name": "baseId" } ], "body": { "type": "BlockStatement", "start": 60, "end": 149, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 70, "end": 95, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 70, "end": 94, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 70, "end": 80, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 18 } }, "object": { "type": "ThisExpression", "start": 70, "end": 74, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 12 } } }, "property": { "type": "Identifier", "start": 75, "end": 80, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 18 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 83, "end": 94, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 32 } }, "left": { "type": "Identifier", "start": 83, "end": 88, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 26 }, "identifierName": "items" }, "name": "items" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 92, "end": 94, "loc": { "start": { "line": 5, "column": 30 }, "end": { "line": 5, "column": 32 } }, "elements": [] } } } }, { "type": "ExpressionStatement", "start": 104, "end": 143, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 47 } }, "expression": { "type": "AssignmentExpression", "start": 104, "end": 142, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 46 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 104, "end": 122, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 26 } }, "object": { "type": "ThisExpression", "start": 104, "end": 108, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 12 } } }, "property": { "type": "Identifier", "start": 109, "end": 122, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 26 }, "identifierName": "_lastUniqueId" }, "name": "_lastUniqueId" }, "computed": false }, "right": { "type": "BinaryExpression", "start": 125, "end": 142, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 46 } }, "left": { "type": "LogicalExpression", "start": 126, "end": 137, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 41 } }, "left": { "type": "Identifier", "start": 126, "end": 132, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 36 }, "identifierName": "baseId" }, "name": "baseId" }, "operator": "||", "right": { "type": "NumericLiteral", "start": 136, "end": 137, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 41 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "extra": { "parenthesized": true, "parenStart": 125 } }, "operator": "+", "right": { "type": "NumericLiteral", "start": 141, "end": 142, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 6, "column": 46 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } } } } ], "directives": [], "trailingComments": null }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 307, "end": 946, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 36, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 307, "end": 314, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 11 }, "identifierName": "addItem" }, "name": "addItem", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 317, "end": 946, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 36, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 327, "end": 336, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "start": 331, "end": 335, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 } }, "id": { "type": "Identifier", "start": 331, "end": 335, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 }, "identifierName": "item" }, "name": "item" }, "init": null } ], "kind": "let" }, { "type": "IfStatement", "start": 345, "end": 940, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 35, "column": 9 } }, "test": { "type": "BinaryExpression", "start": 349, "end": 371, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 34 } }, "left": { "type": "MemberExpression", "start": 349, "end": 365, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 28 } }, "object": { "type": "Identifier", "start": 349, "end": 358, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 21 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "Identifier", "start": 359, "end": 365, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 28 }, "identifierName": "length" }, "name": "length" }, "computed": false }, "operator": "===", "right": { "type": "NumericLiteral", "start": 370, "end": 371, "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 34 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } }, "consequent": { "type": "BlockStatement", "start": 373, "end": 647, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 26, "column": 9 } }, "body": [ { "type": "VariableDeclaration", "start": 387, "end": 411, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 393, "end": 410, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 35 } }, "id": { "type": "Identifier", "start": 393, "end": 395, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 20 }, "identifierName": "id" }, "name": "id" }, "init": { "type": "MemberExpression", "start": 398, "end": 410, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 35 } }, "object": { "type": "Identifier", "start": 398, "end": 407, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 32 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 408, "end": 409, "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 34 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 424, "end": 444, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 424, "end": 443, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 31 } }, "operator": "=", "left": { "type": "Identifier", "start": 424, "end": 428, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 16 }, "identifierName": "item" }, "name": "item" }, "right": { "type": "MemberExpression", "start": 431, "end": 443, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 31 } }, "object": { "type": "Identifier", "start": 431, "end": 440, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 28 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 441, "end": 442, "loc": { "start": { "line": 19, "column": 29 }, "end": { "line": 19, "column": 30 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "computed": true } } }, { "type": "IfStatement", "start": 457, "end": 578, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 22, "column": 13 } }, "test": { "type": "MemberExpression", "start": 461, "end": 475, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 30 } }, "object": { "type": "MemberExpression", "start": 461, "end": 471, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 26 } }, "object": { "type": "ThisExpression", "start": 461, "end": 465, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 20 } } }, "property": { "type": "Identifier", "start": 466, "end": 471, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 26 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 472, "end": 474, "loc": { "start": { "line": 20, "column": 27 }, "end": { "line": 20, "column": 29 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "consequent": { "type": "BlockStatement", "start": 477, "end": 578, "loc": { "start": { "line": 20, "column": 32 }, "end": { "line": 22, "column": 13 } }, "body": [ { "type": "ThrowStatement", "start": 533, "end": 564, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 47 } }, "argument": { "type": "BinaryExpression", "start": 539, "end": 563, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 46 } }, "left": { "type": "BinaryExpression", "start": 539, "end": 557, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 40 } }, "left": { "type": "StringLiteral", "start": 539, "end": 552, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 35 } }, "extra": { "rawValue": "ID clash: '", "raw": "\"ID clash: '\"" }, "value": "ID clash: '", "leadingComments": null }, "operator": "+", "right": { "type": "Identifier", "start": 555, "end": 557, "loc": { "start": { "line": 21, "column": 38 }, "end": { "line": 21, "column": 40 }, "identifierName": "id" }, "name": "id" }, "leadingComments": null }, "operator": "+", "right": { "type": "StringLiteral", "start": 560, "end": 563, "loc": { "start": { "line": 21, "column": 43 }, "end": { "line": 21, "column": 46 } }, "extra": { "rawValue": "'", "raw": "\"'\"" }, "value": "'" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Won't happen if given ID is string", "start": 479, "end": 516, "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 71 } } } ] } ], "directives": [] }, "alternate": null }, { "type": "ExpressionStatement", "start": 591, "end": 613, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 34 } }, "expression": { "type": "AssignmentExpression", "start": 591, "end": 612, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 33 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 591, "end": 605, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 26 } }, "object": { "type": "MemberExpression", "start": 591, "end": 601, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 22 } }, "object": { "type": "ThisExpression", "start": 591, "end": 595, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 16 } } }, "property": { "type": "Identifier", "start": 596, "end": 601, "loc": { "start": { "line": 23, "column": 17 }, "end": { "line": 23, "column": 22 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 602, "end": 604, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 25 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "right": { "type": "Identifier", "start": 608, "end": 612, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 33 }, "identifierName": "item" }, "name": "item" } } }, { "type": "ReturnStatement", "start": 626, "end": 636, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 24, "column": 22 } }, "argument": { "type": "Identifier", "start": 633, "end": 635, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 24, "column": 21 }, "identifierName": "id" }, "name": "id" } } ], "directives": [] }, "alternate": { "type": "BlockStatement", "start": 653, "end": 940, "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 35, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 667, "end": 693, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 667, "end": 692, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 37 } }, "operator": "=", "left": { "type": "Identifier", "start": 667, "end": 671, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 16 }, "identifierName": "item" }, "name": "item" }, "right": { "type": "LogicalExpression", "start": 674, "end": 692, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 37 } }, "left": { "type": "MemberExpression", "start": 674, "end": 686, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 31 } }, "object": { "type": "Identifier", "start": 674, "end": 683, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 28 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 684, "end": 685, "loc": { "start": { "line": 27, "column": 29 }, "end": { "line": 27, "column": 30 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true }, "operator": "||", "right": { "type": "ObjectExpression", "start": 690, "end": 692, "loc": { "start": { "line": 27, "column": 35 }, "end": { "line": 27, "column": 37 } }, "properties": [] } } } }, { "type": "WhileStatement", "start": 706, "end": 930, "loc": { "start": { "line": 28, "column": 12 }, "end": { "line": 34, "column": 13 } }, "test": { "type": "BooleanLiteral", "start": 713, "end": 717, "loc": { "start": { "line": 28, "column": 19 }, "end": { "line": 28, "column": 23 } }, "value": true }, "body": { "type": "BlockStatement", "start": 719, "end": 930, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 34, "column": 13 } }, "body": [ { "type": "VariableDeclaration", "start": 737, "end": 773, "loc": { "start": { "line": 29, "column": 16 }, "end": { "line": 29, "column": 52 } }, "declarations": [ { "type": "VariableDeclarator", "start": 743, "end": 772, "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 51 } }, "id": { "type": "Identifier", "start": 743, "end": 749, "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 28 }, "identifierName": "findId" }, "name": "findId" }, "init": { "type": "UpdateExpression", "start": 752, "end": 772, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 51 } }, "operator": "++", "prefix": false, "argument": { "type": "MemberExpression", "start": 752, "end": 770, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 49 } }, "object": { "type": "ThisExpression", "start": 752, "end": 756, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 35 } } }, "property": { "type": "Identifier", "start": 757, "end": 770, "loc": { "start": { "line": 29, "column": 36 }, "end": { "line": 29, "column": 49 }, "identifierName": "_lastUniqueId" }, "name": "_lastUniqueId" }, "computed": false } } } ], "kind": "const" }, { "type": "IfStatement", "start": 790, "end": 916, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 33, "column": 17 } }, "test": { "type": "UnaryExpression", "start": 794, "end": 813, "loc": { "start": { "line": 30, "column": 20 }, "end": { "line": 30, "column": 39 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 795, "end": 813, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 39 } }, "object": { "type": "MemberExpression", "start": 795, "end": 805, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 31 } }, "object": { "type": "ThisExpression", "start": 795, "end": 799, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 25 } } }, "property": { "type": "Identifier", "start": 800, "end": 805, "loc": { "start": { "line": 30, "column": 26 }, "end": { "line": 30, "column": 31 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 806, "end": 812, "loc": { "start": { "line": 30, "column": 32 }, "end": { "line": 30, "column": 38 }, "identifierName": "findId" }, "name": "findId" }, "computed": true }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "BlockStatement", "start": 815, "end": 916, "loc": { "start": { "line": 30, "column": 41 }, "end": { "line": 33, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 837, "end": 863, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 46 } }, "expression": { "type": "AssignmentExpression", "start": 837, "end": 862, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 45 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 837, "end": 855, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 38 } }, "object": { "type": "MemberExpression", "start": 837, "end": 847, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 30 } }, "object": { "type": "ThisExpression", "start": 837, "end": 841, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 24 } } }, "property": { "type": "Identifier", "start": 842, "end": 847, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 30 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 848, "end": 854, "loc": { "start": { "line": 31, "column": 31 }, "end": { "line": 31, "column": 37 }, "identifierName": "findId" }, "name": "findId" }, "computed": true }, "right": { "type": "Identifier", "start": 858, "end": 862, "loc": { "start": { "line": 31, "column": 41 }, "end": { "line": 31, "column": 45 }, "identifierName": "item" }, "name": "item" } } }, { "type": "ReturnStatement", "start": 884, "end": 898, "loc": { "start": { "line": 32, "column": 20 }, "end": { "line": 32, "column": 34 } }, "argument": { "type": "Identifier", "start": 891, "end": 897, "loc": { "start": { "line": 32, "column": 27 }, "end": { "line": 32, "column": 33 }, "identifierName": "findId" }, "name": "findId" } } ], "directives": [] }, "alternate": null } ], "directives": [] } } ], "directives": [] } } ], "directives": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 952, "end": 1063, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 42, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 952, "end": 962, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 14 }, "identifierName": "removeItem" }, "name": "removeItem" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 963, "end": 965, "loc": { "start": { "line": 38, "column": 15 }, "end": { "line": 38, "column": 17 }, "identifierName": "id" }, "name": "id" } ], "body": { "type": "BlockStatement", "start": 967, "end": 1063, "loc": { "start": { "line": 38, "column": 19 }, "end": { "line": 42, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 977, "end": 1005, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 983, "end": 1004, "loc": { "start": { "line": 39, "column": 14 }, "end": { "line": 39, "column": 35 } }, "id": { "type": "Identifier", "start": 983, "end": 987, "loc": { "start": { "line": 39, "column": 14 }, "end": { "line": 39, "column": 18 }, "identifierName": "item" }, "name": "item" }, "init": { "type": "MemberExpression", "start": 990, "end": 1004, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 35 } }, "object": { "type": "MemberExpression", "start": 990, "end": 1000, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 31 } }, "object": { "type": "ThisExpression", "start": 990, "end": 994, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 25 } } }, "property": { "type": "Identifier", "start": 995, "end": 1000, "loc": { "start": { "line": 39, "column": 26 }, "end": { "line": 39, "column": 31 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 1001, "end": 1003, "loc": { "start": { "line": 39, "column": 32 }, "end": { "line": 39, "column": 34 }, "identifierName": "id" }, "name": "id" }, "computed": true } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 1014, "end": 1036, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 30 } }, "expression": { "type": "UnaryExpression", "start": 1014, "end": 1035, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 29 } }, "operator": "delete", "prefix": true, "argument": { "type": "MemberExpression", "start": 1021, "end": 1035, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 29 } }, "object": { "type": "MemberExpression", "start": 1021, "end": 1031, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 25 } }, "object": { "type": "ThisExpression", "start": 1021, "end": 1025, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 19 } } }, "property": { "type": "Identifier", "start": 1026, "end": 1031, "loc": { "start": { "line": 40, "column": 20 }, "end": { "line": 40, "column": 25 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 1032, "end": 1034, "loc": { "start": { "line": 40, "column": 26 }, "end": { "line": 40, "column": 28 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "extra": { "parenthesizedArgument": false } } }, { "type": "ReturnStatement", "start": 1045, "end": 1057, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 20 } }, "argument": { "type": "Identifier", "start": 1052, "end": 1056, "loc": { "start": { "line": 41, "column": 15 }, "end": { "line": 41, "column": 19 }, "identifierName": "item" }, "name": "item" } } ], "directives": [] } } ] }, "leadingComments": [], "name": "_", "trailingComments": [] }, { "type": "ExportNamedDeclaration", "start": 1067, "end": 1080, "loc": { "start": { "line": 45, "column": 0 }, "end": { "line": 45, "column": 13 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", "start": 1075, "end": 1078, "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 11 } }, "local": { "type": "Identifier", "start": 1075, "end": 1078, "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 11 }, "identifierName": "Map" }, "name": "Map" }, "exported": { "type": "Identifier", "start": 1075, "end": 1078, "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 11 }, "identifierName": "Map" }, "name": "Map" } } ], "source": null }, { "type": "ExportNamedDeclaration", "start": 1067, "end": 1080, "loc": { "start": { "line": 45, "column": 0 }, "end": { "line": 45, "column": 13 } }, "declaration": { "type": "ClassDeclaration", "start": 16, "end": 1065, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 43, "column": 1 } }, "id": { "type": "Identifier", "start": 22, "end": 25, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 9 }, "identifierName": "Map" }, "name": "Map", "leadingComments": null }, "superClass": null, "body": { "type": "ClassBody", "start": 26, "end": 1065, "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 43, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 33, "end": 149, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 7, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 33, "end": 44, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 45, "end": 50, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 21 }, "identifierName": "items" }, "name": "items" }, { "type": "Identifier", "start": 52, "end": 58, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 29 }, "identifierName": "baseId" }, "name": "baseId" } ], "body": { "type": "BlockStatement", "start": 60, "end": 149, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 70, "end": 95, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 70, "end": 94, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 70, "end": 80, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 18 } }, "object": { "type": "ThisExpression", "start": 70, "end": 74, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 12 } } }, "property": { "type": "Identifier", "start": 75, "end": 80, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 18 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 83, "end": 94, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 32 } }, "left": { "type": "Identifier", "start": 83, "end": 88, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 26 }, "identifierName": "items" }, "name": "items" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 92, "end": 94, "loc": { "start": { "line": 5, "column": 30 }, "end": { "line": 5, "column": 32 } }, "elements": [] } } } }, { "type": "ExpressionStatement", "start": 104, "end": 143, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 47 } }, "expression": { "type": "AssignmentExpression", "start": 104, "end": 142, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 46 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 104, "end": 122, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 26 } }, "object": { "type": "ThisExpression", "start": 104, "end": 108, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 12 } } }, "property": { "type": "Identifier", "start": 109, "end": 122, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 26 }, "identifierName": "_lastUniqueId" }, "name": "_lastUniqueId" }, "computed": false }, "right": { "type": "BinaryExpression", "start": 125, "end": 142, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 46 } }, "left": { "type": "LogicalExpression", "start": 126, "end": 137, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 41 } }, "left": { "type": "Identifier", "start": 126, "end": 132, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 36 }, "identifierName": "baseId" }, "name": "baseId" }, "operator": "||", "right": { "type": "NumericLiteral", "start": 136, "end": 137, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 41 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "extra": { "parenthesized": true, "parenStart": 125 } }, "operator": "+", "right": { "type": "NumericLiteral", "start": 141, "end": 142, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 6, "column": 46 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } } } } ], "directives": [], "trailingComments": null }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 307, "end": 946, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 36, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 307, "end": 314, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 11 }, "identifierName": "addItem" }, "name": "addItem", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 317, "end": 946, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 36, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 327, "end": 336, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "start": 331, "end": 335, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 } }, "id": { "type": "Identifier", "start": 331, "end": 335, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 }, "identifierName": "item" }, "name": "item" }, "init": null } ], "kind": "let" }, { "type": "IfStatement", "start": 345, "end": 940, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 35, "column": 9 } }, "test": { "type": "BinaryExpression", "start": 349, "end": 371, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 34 } }, "left": { "type": "MemberExpression", "start": 349, "end": 365, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 28 } }, "object": { "type": "Identifier", "start": 349, "end": 358, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 21 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "Identifier", "start": 359, "end": 365, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 28 }, "identifierName": "length" }, "name": "length" }, "computed": false }, "operator": "===", "right": { "type": "NumericLiteral", "start": 370, "end": 371, "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 34 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } }, "consequent": { "type": "BlockStatement", "start": 373, "end": 647, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 26, "column": 9 } }, "body": [ { "type": "VariableDeclaration", "start": 387, "end": 411, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 393, "end": 410, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 35 } }, "id": { "type": "Identifier", "start": 393, "end": 395, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 20 }, "identifierName": "id" }, "name": "id" }, "init": { "type": "MemberExpression", "start": 398, "end": 410, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 35 } }, "object": { "type": "Identifier", "start": 398, "end": 407, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 32 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 408, "end": 409, "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 34 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 424, "end": 444, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 424, "end": 443, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 31 } }, "operator": "=", "left": { "type": "Identifier", "start": 424, "end": 428, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 16 }, "identifierName": "item" }, "name": "item" }, "right": { "type": "MemberExpression", "start": 431, "end": 443, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 31 } }, "object": { "type": "Identifier", "start": 431, "end": 440, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 28 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 441, "end": 442, "loc": { "start": { "line": 19, "column": 29 }, "end": { "line": 19, "column": 30 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "computed": true } } }, { "type": "IfStatement", "start": 457, "end": 578, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 22, "column": 13 } }, "test": { "type": "MemberExpression", "start": 461, "end": 475, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 30 } }, "object": { "type": "MemberExpression", "start": 461, "end": 471, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 26 } }, "object": { "type": "ThisExpression", "start": 461, "end": 465, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 20 } } }, "property": { "type": "Identifier", "start": 466, "end": 471, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 26 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 472, "end": 474, "loc": { "start": { "line": 20, "column": 27 }, "end": { "line": 20, "column": 29 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "consequent": { "type": "BlockStatement", "start": 477, "end": 578, "loc": { "start": { "line": 20, "column": 32 }, "end": { "line": 22, "column": 13 } }, "body": [ { "type": "ThrowStatement", "start": 533, "end": 564, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 47 } }, "argument": { "type": "BinaryExpression", "start": 539, "end": 563, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 46 } }, "left": { "type": "BinaryExpression", "start": 539, "end": 557, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 40 } }, "left": { "type": "StringLiteral", "start": 539, "end": 552, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 35 } }, "extra": { "rawValue": "ID clash: '", "raw": "\"ID clash: '\"" }, "value": "ID clash: '", "leadingComments": null }, "operator": "+", "right": { "type": "Identifier", "start": 555, "end": 557, "loc": { "start": { "line": 21, "column": 38 }, "end": { "line": 21, "column": 40 }, "identifierName": "id" }, "name": "id" }, "leadingComments": null }, "operator": "+", "right": { "type": "StringLiteral", "start": 560, "end": 563, "loc": { "start": { "line": 21, "column": 43 }, "end": { "line": 21, "column": 46 } }, "extra": { "rawValue": "'", "raw": "\"'\"" }, "value": "'" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Won't happen if given ID is string", "start": 479, "end": 516, "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 71 } } } ] } ], "directives": [] }, "alternate": null }, { "type": "ExpressionStatement", "start": 591, "end": 613, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 34 } }, "expression": { "type": "AssignmentExpression", "start": 591, "end": 612, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 33 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 591, "end": 605, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 26 } }, "object": { "type": "MemberExpression", "start": 591, "end": 601, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 22 } }, "object": { "type": "ThisExpression", "start": 591, "end": 595, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 16 } } }, "property": { "type": "Identifier", "start": 596, "end": 601, "loc": { "start": { "line": 23, "column": 17 }, "end": { "line": 23, "column": 22 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 602, "end": 604, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 25 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "right": { "type": "Identifier", "start": 608, "end": 612, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 33 }, "identifierName": "item" }, "name": "item" } } }, { "type": "ReturnStatement", "start": 626, "end": 636, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 24, "column": 22 } }, "argument": { "type": "Identifier", "start": 633, "end": 635, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 24, "column": 21 }, "identifierName": "id" }, "name": "id" } } ], "directives": [] }, "alternate": { "type": "BlockStatement", "start": 653, "end": 940, "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 35, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 667, "end": 693, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 667, "end": 692, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 37 } }, "operator": "=", "left": { "type": "Identifier", "start": 667, "end": 671, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 16 }, "identifierName": "item" }, "name": "item" }, "right": { "type": "LogicalExpression", "start": 674, "end": 692, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 37 } }, "left": { "type": "MemberExpression", "start": 674, "end": 686, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 31 } }, "object": { "type": "Identifier", "start": 674, "end": 683, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 28 }, "identifierName": "arguments" }, "name": "arguments" }, "property": { "type": "NumericLiteral", "start": 684, "end": 685, "loc": { "start": { "line": 27, "column": 29 }, "end": { "line": 27, "column": 30 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true }, "operator": "||", "right": { "type": "ObjectExpression", "start": 690, "end": 692, "loc": { "start": { "line": 27, "column": 35 }, "end": { "line": 27, "column": 37 } }, "properties": [] } } } }, { "type": "WhileStatement", "start": 706, "end": 930, "loc": { "start": { "line": 28, "column": 12 }, "end": { "line": 34, "column": 13 } }, "test": { "type": "BooleanLiteral", "start": 713, "end": 717, "loc": { "start": { "line": 28, "column": 19 }, "end": { "line": 28, "column": 23 } }, "value": true }, "body": { "type": "BlockStatement", "start": 719, "end": 930, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 34, "column": 13 } }, "body": [ { "type": "VariableDeclaration", "start": 737, "end": 773, "loc": { "start": { "line": 29, "column": 16 }, "end": { "line": 29, "column": 52 } }, "declarations": [ { "type": "VariableDeclarator", "start": 743, "end": 772, "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 51 } }, "id": { "type": "Identifier", "start": 743, "end": 749, "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 28 }, "identifierName": "findId" }, "name": "findId" }, "init": { "type": "UpdateExpression", "start": 752, "end": 772, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 51 } }, "operator": "++", "prefix": false, "argument": { "type": "MemberExpression", "start": 752, "end": 770, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 49 } }, "object": { "type": "ThisExpression", "start": 752, "end": 756, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 35 } } }, "property": { "type": "Identifier", "start": 757, "end": 770, "loc": { "start": { "line": 29, "column": 36 }, "end": { "line": 29, "column": 49 }, "identifierName": "_lastUniqueId" }, "name": "_lastUniqueId" }, "computed": false } } } ], "kind": "const" }, { "type": "IfStatement", "start": 790, "end": 916, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 33, "column": 17 } }, "test": { "type": "UnaryExpression", "start": 794, "end": 813, "loc": { "start": { "line": 30, "column": 20 }, "end": { "line": 30, "column": 39 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 795, "end": 813, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 39 } }, "object": { "type": "MemberExpression", "start": 795, "end": 805, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 31 } }, "object": { "type": "ThisExpression", "start": 795, "end": 799, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 25 } } }, "property": { "type": "Identifier", "start": 800, "end": 805, "loc": { "start": { "line": 30, "column": 26 }, "end": { "line": 30, "column": 31 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 806, "end": 812, "loc": { "start": { "line": 30, "column": 32 }, "end": { "line": 30, "column": 38 }, "identifierName": "findId" }, "name": "findId" }, "computed": true }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "BlockStatement", "start": 815, "end": 916, "loc": { "start": { "line": 30, "column": 41 }, "end": { "line": 33, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 837, "end": 863, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 46 } }, "expression": { "type": "AssignmentExpression", "start": 837, "end": 862, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 45 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 837, "end": 855, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 38 } }, "object": { "type": "MemberExpression", "start": 837, "end": 847, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 30 } }, "object": { "type": "ThisExpression", "start": 837, "end": 841, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 24 } } }, "property": { "type": "Identifier", "start": 842, "end": 847, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 30 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 848, "end": 854, "loc": { "start": { "line": 31, "column": 31 }, "end": { "line": 31, "column": 37 }, "identifierName": "findId" }, "name": "findId" }, "computed": true }, "right": { "type": "Identifier", "start": 858, "end": 862, "loc": { "start": { "line": 31, "column": 41 }, "end": { "line": 31, "column": 45 }, "identifierName": "item" }, "name": "item" } } }, { "type": "ReturnStatement", "start": 884, "end": 898, "loc": { "start": { "line": 32, "column": 20 }, "end": { "line": 32, "column": 34 } }, "argument": { "type": "Identifier", "start": 891, "end": 897, "loc": { "start": { "line": 32, "column": 27 }, "end": { "line": 32, "column": 33 }, "identifierName": "findId" }, "name": "findId" } } ], "directives": [] }, "alternate": null } ], "directives": [] } } ], "directives": [] } } ], "directives": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 952, "end": 1063, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 42, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 952, "end": 962, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 14 }, "identifierName": "removeItem" }, "name": "removeItem" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 963, "end": 965, "loc": { "start": { "line": 38, "column": 15 }, "end": { "line": 38, "column": 17 }, "identifierName": "id" }, "name": "id" } ], "body": { "type": "BlockStatement", "start": 967, "end": 1063, "loc": { "start": { "line": 38, "column": 19 }, "end": { "line": 42, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 977, "end": 1005, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 983, "end": 1004, "loc": { "start": { "line": 39, "column": 14 }, "end": { "line": 39, "column": 35 } }, "id": { "type": "Identifier", "start": 983, "end": 987, "loc": { "start": { "line": 39, "column": 14 }, "end": { "line": 39, "column": 18 }, "identifierName": "item" }, "name": "item" }, "init": { "type": "MemberExpression", "start": 990, "end": 1004, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 35 } }, "object": { "type": "MemberExpression", "start": 990, "end": 1000, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 31 } }, "object": { "type": "ThisExpression", "start": 990, "end": 994, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 25 } } }, "property": { "type": "Identifier", "start": 995, "end": 1000, "loc": { "start": { "line": 39, "column": 26 }, "end": { "line": 39, "column": 31 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 1001, "end": 1003, "loc": { "start": { "line": 39, "column": 32 }, "end": { "line": 39, "column": 34 }, "identifierName": "id" }, "name": "id" }, "computed": true } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 1014, "end": 1036, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 30 } }, "expression": { "type": "UnaryExpression", "start": 1014, "end": 1035, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 29 } }, "operator": "delete", "prefix": true, "argument": { "type": "MemberExpression", "start": 1021, "end": 1035, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 29 } }, "object": { "type": "MemberExpression", "start": 1021, "end": 1031, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 25 } }, "object": { "type": "ThisExpression", "start": 1021, "end": 1025, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 19 } } }, "property": { "type": "Identifier", "start": 1026, "end": 1031, "loc": { "start": { "line": 40, "column": 20 }, "end": { "line": 40, "column": 25 }, "identifierName": "items" }, "name": "items" }, "computed": false }, "property": { "type": "Identifier", "start": 1032, "end": 1034, "loc": { "start": { "line": 40, "column": 26 }, "end": { "line": 40, "column": 28 }, "identifierName": "id" }, "name": "id" }, "computed": true }, "extra": { "parenthesizedArgument": false } } }, { "type": "ReturnStatement", "start": 1045, "end": 1057, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 20 } }, "argument": { "type": "Identifier", "start": 1052, "end": 1056, "loc": { "start": { "line": 41, "column": 15 }, "end": { "line": 41, "column": 19 }, "identifierName": "item" }, "name": "item" } } ], "directives": [] } } ] }, "leadingComments": [ { "type": "CommentBlock", "value": "* @private ", "start": 0, "end": 15, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "__PseudoExport__": false, "trailingComments": [] }, "specifiers": null, "source": null, "leadingComments": null } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "* @private ", "start": 0, "end": 15, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } }, { "type": "CommentLine", "value": " Won't happen if given ID is string", "start": 479, "end": 516, "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 71 } } } ], "tokens": [ { "type": "CommentBlock", "value": "* @private ", "start": 0, "end": 15, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, { "type": { "label": "class", "keyword": "class", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "class", "start": 16, "end": 21, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Map", "start": 22, "end": 25, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 9 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 26, "end": 27, "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 2, "column": 11 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "constructor", "start": 33, "end": 44, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 44, "end": 45, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 45, "end": 50, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 21 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 50, "end": 51, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "baseId", "start": 52, "end": 58, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 29 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 58, "end": 59, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 30 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 60, "end": 61, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 4, "column": 32 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 70, "end": 74, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 74, "end": 75, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 75, "end": 80, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 18 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 81, "end": 82, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 83, "end": 88, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 26 } } }, { "type": { "label": "||", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 1, "updateContext": null }, "value": "||", "start": 89, "end": 91, "loc": { "start": { "line": 5, "column": 27 }, "end": { "line": 5, "column": 29 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 92, "end": 93, "loc": { "start": { "line": 5, "column": 30 }, "end": { "line": 5, "column": 31 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 93, "end": 94, "loc": { "start": { "line": 5, "column": 31 }, "end": { "line": 5, "column": 32 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 94, "end": 95, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 33 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 104, "end": 108, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 108, "end": 109, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "_lastUniqueId", "start": 109, "end": 122, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 26 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 123, "end": 124, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 28 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 125, "end": 126, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "baseId", "start": 126, "end": 132, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 36 } } }, { "type": { "label": "||", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 1, "updateContext": null }, "value": "||", "start": 133, "end": 135, "loc": { "start": { "line": 6, "column": 37 }, "end": { "line": 6, "column": 39 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 136, "end": 137, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 41 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 137, "end": 138, "loc": { "start": { "line": 6, "column": 41 }, "end": { "line": 6, "column": 42 } } }, { "type": { "label": "+/-", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": 9, "updateContext": null }, "value": "+", "start": 139, "end": 140, "loc": { "start": { "line": 6, "column": 43 }, "end": { "line": 6, "column": 44 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 1, "start": 141, "end": 142, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 6, "column": 46 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 142, "end": 143, "loc": { "start": { "line": 6, "column": 46 }, "end": { "line": 6, "column": 47 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 148, "end": 149, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 5 } } }, { "type": "CommentBlock", "value": "*\n * Usage:\n *\n * id = myMap.addItem(\"foo\") // ID internally generated\n * id = myMap.addItem(\"foo\", \"bar\") // ID is \"foo\"\n ", "start": 155, "end": 302, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 14, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "addItem", "start": 307, "end": 314, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 11 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 314, "end": 315, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 12 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 315, "end": 316, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 13 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 317, "end": 318, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 15 } } }, { "type": { "label": "let", "keyword": "let", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "let", "start": 327, "end": 330, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 11 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 331, "end": 335, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 335, "end": 336, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 17 } } }, { "type": { "label": "if", "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "if", "start": 345, "end": 347, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 10 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 348, "end": 349, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "arguments", "start": 349, "end": 358, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 21 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 358, "end": 359, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "length", "start": 359, "end": 365, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 28 } } }, { "type": { "label": "==/!=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 6, "updateContext": null }, "value": "===", "start": 366, "end": 369, "loc": { "start": { "line": 17, "column": 29 }, "end": { "line": 17, "column": 32 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 2, "start": 370, "end": 371, "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 34 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 371, "end": 372, "loc": { "start": { "line": 17, "column": 34 }, "end": { "line": 17, "column": 35 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 373, "end": 374, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 37 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 387, "end": 392, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 393, "end": 395, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 20 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 396, "end": 397, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "arguments", "start": 398, "end": 407, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 32 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 407, "end": 408, "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 33 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 408, "end": 409, "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 34 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 409, "end": 410, "loc": { "start": { "line": 18, "column": 34 }, "end": { "line": 18, "column": 35 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 410, "end": 411, "loc": { "start": { "line": 18, "column": 35 }, "end": { "line": 18, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 424, "end": 428, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 16 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 429, "end": 430, "loc": { "start": { "line": 19, "column": 17 }, "end": { "line": 19, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "arguments", "start": 431, "end": 440, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 28 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 440, "end": 441, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 29 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 1, "start": 441, "end": 442, "loc": { "start": { "line": 19, "column": 29 }, "end": { "line": 19, "column": 30 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 442, "end": 443, "loc": { "start": { "line": 19, "column": 30 }, "end": { "line": 19, "column": 31 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 443, "end": 444, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 32 } } }, { "type": { "label": "if", "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "if", "start": 457, "end": 459, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 14 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 460, "end": 461, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 16 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 461, "end": 465, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 20 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 465, "end": 466, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 21 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 466, "end": 471, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 26 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 471, "end": 472, "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 27 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 472, "end": 474, "loc": { "start": { "line": 20, "column": 27 }, "end": { "line": 20, "column": 29 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 474, "end": 475, "loc": { "start": { "line": 20, "column": 29 }, "end": { "line": 20, "column": 30 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 475, "end": 476, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 31 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 477, "end": 478, "loc": { "start": { "line": 20, "column": 32 }, "end": { "line": 20, "column": 33 } } }, { "type": "CommentLine", "value": " Won't happen if given ID is string", "start": 479, "end": 516, "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 71 } } }, { "type": { "label": "throw", "keyword": "throw", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "throw", "start": 533, "end": 538, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 21 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "ID clash: '", "start": 539, "end": 552, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 35 } } }, { "type": { "label": "+/-", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": 9, "updateContext": null }, "value": "+", "start": 553, "end": 554, "loc": { "start": { "line": 21, "column": 36 }, "end": { "line": 21, "column": 37 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 555, "end": 557, "loc": { "start": { "line": 21, "column": 38 }, "end": { "line": 21, "column": 40 } } }, { "type": { "label": "+/-", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": 9, "updateContext": null }, "value": "+", "start": 558, "end": 559, "loc": { "start": { "line": 21, "column": 41 }, "end": { "line": 21, "column": 42 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "'", "start": 560, "end": 563, "loc": { "start": { "line": 21, "column": 43 }, "end": { "line": 21, "column": 46 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 563, "end": 564, "loc": { "start": { "line": 21, "column": 46 }, "end": { "line": 21, "column": 47 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 577, "end": 578, "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 22, "column": 13 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 591, "end": 595, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 16 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 595, "end": 596, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 596, "end": 601, "loc": { "start": { "line": 23, "column": 17 }, "end": { "line": 23, "column": 22 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 601, "end": 602, "loc": { "start": { "line": 23, "column": 22 }, "end": { "line": 23, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 602, "end": 604, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 25 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 604, "end": 605, "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 26 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 606, "end": 607, "loc": { "start": { "line": 23, "column": 27 }, "end": { "line": 23, "column": 28 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 608, "end": 612, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 33 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 612, "end": 613, "loc": { "start": { "line": 23, "column": 33 }, "end": { "line": 23, "column": 34 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 626, "end": 632, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 24, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 633, "end": 635, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 24, "column": 21 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 635, "end": 636, "loc": { "start": { "line": 24, "column": 21 }, "end": { "line": 24, "column": 22 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 646, "end": 647, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 9 } } }, { "type": { "label": "else", "keyword": "else", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "else", "start": 648, "end": 652, "loc": { "start": { "line": 26, "column": 10 }, "end": { "line": 26, "column": 14 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 653, "end": 654, "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 667, "end": 671, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 16 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 672, "end": 673, "loc": { "start": { "line": 27, "column": 17 }, "end": { "line": 27, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "arguments", "start": 674, "end": 683, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 28 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 683, "end": 684, "loc": { "start": { "line": 27, "column": 28 }, "end": { "line": 27, "column": 29 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 684, "end": 685, "loc": { "start": { "line": 27, "column": 29 }, "end": { "line": 27, "column": 30 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 685, "end": 686, "loc": { "start": { "line": 27, "column": 30 }, "end": { "line": 27, "column": 31 } } }, { "type": { "label": "||", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 1, "updateContext": null }, "value": "||", "start": 687, "end": 689, "loc": { "start": { "line": 27, "column": 32 }, "end": { "line": 27, "column": 34 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 690, "end": 691, "loc": { "start": { "line": 27, "column": 35 }, "end": { "line": 27, "column": 36 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 691, "end": 692, "loc": { "start": { "line": 27, "column": 36 }, "end": { "line": 27, "column": 37 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 692, "end": 693, "loc": { "start": { "line": 27, "column": 37 }, "end": { "line": 27, "column": 38 } } }, { "type": { "label": "while", "keyword": "while", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "while", "start": 706, "end": 711, "loc": { "start": { "line": 28, "column": 12 }, "end": { "line": 28, "column": 17 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 712, "end": 713, "loc": { "start": { "line": 28, "column": 18 }, "end": { "line": 28, "column": 19 } } }, { "type": { "label": "true", "keyword": "true", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "true", "start": 713, "end": 717, "loc": { "start": { "line": 28, "column": 19 }, "end": { "line": 28, "column": 23 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 717, "end": 718, "loc": { "start": { "line": 28, "column": 23 }, "end": { "line": 28, "column": 24 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 719, "end": 720, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 28, "column": 26 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 737, "end": 742, "loc": { "start": { "line": 29, "column": 16 }, "end": { "line": 29, "column": 21 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "findId", "start": 743, "end": 749, "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 28 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 750, "end": 751, "loc": { "start": { "line": 29, "column": 29 }, "end": { "line": 29, "column": 30 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 752, "end": 756, "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 35 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 756, "end": 757, "loc": { "start": { "line": 29, "column": 35 }, "end": { "line": 29, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "_lastUniqueId", "start": 757, "end": 770, "loc": { "start": { "line": 29, "column": 36 }, "end": { "line": 29, "column": 49 } } }, { "type": { "label": "++/--", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": true, "binop": null }, "value": "++", "start": 770, "end": 772, "loc": { "start": { "line": 29, "column": 49 }, "end": { "line": 29, "column": 51 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 772, "end": 773, "loc": { "start": { "line": 29, "column": 51 }, "end": { "line": 29, "column": 52 } } }, { "type": { "label": "if", "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "if", "start": 790, "end": 792, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 30, "column": 18 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 793, "end": 794, "loc": { "start": { "line": 30, "column": 19 }, "end": { "line": 30, "column": 20 } } }, { "type": { "label": "prefix", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": null, "updateContext": null }, "value": "!", "start": 794, "end": 795, "loc": { "start": { "line": 30, "column": 20 }, "end": { "line": 30, "column": 21 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 795, "end": 799, "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 25 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 799, "end": 800, "loc": { "start": { "line": 30, "column": 25 }, "end": { "line": 30, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 800, "end": 805, "loc": { "start": { "line": 30, "column": 26 }, "end": { "line": 30, "column": 31 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 805, "end": 806, "loc": { "start": { "line": 30, "column": 31 }, "end": { "line": 30, "column": 32 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "findId", "start": 806, "end": 812, "loc": { "start": { "line": 30, "column": 32 }, "end": { "line": 30, "column": 38 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 812, "end": 813, "loc": { "start": { "line": 30, "column": 38 }, "end": { "line": 30, "column": 39 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 813, "end": 814, "loc": { "start": { "line": 30, "column": 39 }, "end": { "line": 30, "column": 40 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 815, "end": 816, "loc": { "start": { "line": 30, "column": 41 }, "end": { "line": 30, "column": 42 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 837, "end": 841, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 24 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 841, "end": 842, "loc": { "start": { "line": 31, "column": 24 }, "end": { "line": 31, "column": 25 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 842, "end": 847, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 30 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 847, "end": 848, "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "findId", "start": 848, "end": 854, "loc": { "start": { "line": 31, "column": 31 }, "end": { "line": 31, "column": 37 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 854, "end": 855, "loc": { "start": { "line": 31, "column": 37 }, "end": { "line": 31, "column": 38 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 856, "end": 857, "loc": { "start": { "line": 31, "column": 39 }, "end": { "line": 31, "column": 40 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 858, "end": 862, "loc": { "start": { "line": 31, "column": 41 }, "end": { "line": 31, "column": 45 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 862, "end": 863, "loc": { "start": { "line": 31, "column": 45 }, "end": { "line": 31, "column": 46 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 884, "end": 890, "loc": { "start": { "line": 32, "column": 20 }, "end": { "line": 32, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "findId", "start": 891, "end": 897, "loc": { "start": { "line": 32, "column": 27 }, "end": { "line": 32, "column": 33 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 897, "end": 898, "loc": { "start": { "line": 32, "column": 33 }, "end": { "line": 32, "column": 34 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 915, "end": 916, "loc": { "start": { "line": 33, "column": 16 }, "end": { "line": 33, "column": 17 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 929, "end": 930, "loc": { "start": { "line": 34, "column": 12 }, "end": { "line": 34, "column": 13 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 939, "end": 940, "loc": { "start": { "line": 35, "column": 8 }, "end": { "line": 35, "column": 9 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 945, "end": 946, "loc": { "start": { "line": 36, "column": 4 }, "end": { "line": 36, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "removeItem", "start": 952, "end": 962, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 14 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 962, "end": 963, "loc": { "start": { "line": 38, "column": 14 }, "end": { "line": 38, "column": 15 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 963, "end": 965, "loc": { "start": { "line": 38, "column": 15 }, "end": { "line": 38, "column": 17 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 965, "end": 966, "loc": { "start": { "line": 38, "column": 17 }, "end": { "line": 38, "column": 18 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 967, "end": 968, "loc": { "start": { "line": 38, "column": 19 }, "end": { "line": 38, "column": 20 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 977, "end": 982, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 983, "end": 987, "loc": { "start": { "line": 39, "column": 14 }, "end": { "line": 39, "column": 18 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 988, "end": 989, "loc": { "start": { "line": 39, "column": 19 }, "end": { "line": 39, "column": 20 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 990, "end": 994, "loc": { "start": { "line": 39, "column": 21 }, "end": { "line": 39, "column": 25 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 994, "end": 995, "loc": { "start": { "line": 39, "column": 25 }, "end": { "line": 39, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 995, "end": 1000, "loc": { "start": { "line": 39, "column": 26 }, "end": { "line": 39, "column": 31 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1000, "end": 1001, "loc": { "start": { "line": 39, "column": 31 }, "end": { "line": 39, "column": 32 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 1001, "end": 1003, "loc": { "start": { "line": 39, "column": 32 }, "end": { "line": 39, "column": 34 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1003, "end": 1004, "loc": { "start": { "line": 39, "column": 34 }, "end": { "line": 39, "column": 35 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1004, "end": 1005, "loc": { "start": { "line": 39, "column": 35 }, "end": { "line": 39, "column": 36 } } }, { "type": { "label": "delete", "keyword": "delete", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": null, "updateContext": null }, "value": "delete", "start": 1014, "end": 1020, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 14 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 1021, "end": 1025, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 19 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1025, "end": 1026, "loc": { "start": { "line": 40, "column": 19 }, "end": { "line": 40, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "items", "start": 1026, "end": 1031, "loc": { "start": { "line": 40, "column": 20 }, "end": { "line": 40, "column": 25 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1031, "end": 1032, "loc": { "start": { "line": 40, "column": 25 }, "end": { "line": 40, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "id", "start": 1032, "end": 1034, "loc": { "start": { "line": 40, "column": 26 }, "end": { "line": 40, "column": 28 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1034, "end": 1035, "loc": { "start": { "line": 40, "column": 28 }, "end": { "line": 40, "column": 29 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1035, "end": 1036, "loc": { "start": { "line": 40, "column": 29 }, "end": { "line": 40, "column": 30 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 1045, "end": 1051, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 1052, "end": 1056, "loc": { "start": { "line": 41, "column": 15 }, "end": { "line": 41, "column": 19 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1056, "end": 1057, "loc": { "start": { "line": 41, "column": 19 }, "end": { "line": 41, "column": 20 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1062, "end": 1063, "loc": { "start": { "line": 42, "column": 4 }, "end": { "line": 42, "column": 5 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1064, "end": 1065, "loc": { "start": { "line": 43, "column": 0 }, "end": { "line": 43, "column": 1 } } }, { "type": { "label": "export", "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "export", "start": 1067, "end": 1073, "loc": { "start": { "line": 45, "column": 0 }, "end": { "line": 45, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1074, "end": 1075, "loc": { "start": { "line": 45, "column": 7 }, "end": { "line": 45, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Map", "start": 1075, "end": 1078, "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 11 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1078, "end": 1079, "loc": { "start": { "line": 45, "column": 11 }, "end": { "line": 45, "column": 12 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1079, "end": 1080, "loc": { "start": { "line": 45, "column": 12 }, "end": { "line": 45, "column": 13 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1081, "end": 1081, "loc": { "start": { "line": 46, "column": 0 }, "end": { "line": 46, "column": 0 } } } ] }