UNPKG

soocrate-core

Version:

this is the core of soocrate application

1,118 lines (1,117 loc) 3.47 MB
{ "type": "File", "start": 0, "end": 9706, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 253, "column": 7 } }, "program": { "type": "Program", "start": 0, "end": 9706, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 253, "column": 7 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 31, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "local": { "type": "Identifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 }, "identifierName": "expect" }, "name": "expect" } } ], "source": { "type": "StringLiteral", "start": 19, "end": 30, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 30 } }, "extra": { "rawValue": "expect.js", "raw": "'expect.js'" }, "value": "expect.js" } }, { "type": "ImportDeclaration", "start": 33, "end": 59, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 40, "end": 45, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 40, "end": 45, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 }, "identifierName": "Mocha" }, "name": "Mocha" } } ], "source": { "type": "StringLiteral", "start": 51, "end": 58, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 25 } }, "extra": { "rawValue": "mocha", "raw": "'mocha'" }, "value": "mocha" } }, { "type": "ImportDeclaration", "start": 63, "end": 105, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 42 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 70, "end": 78, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 15 } }, "local": { "type": "Identifier", "start": 70, "end": 78, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 15 }, "identifierName": "LSEQNode" }, "name": "LSEQNode" } } ], "source": { "type": "StringLiteral", "start": 84, "end": 104, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 41 } }, "extra": { "rawValue": "../lib/lseqnode.js", "raw": "'../lib/lseqnode.js'" }, "value": "../lib/lseqnode.js" } }, { "type": "ImportDeclaration", "start": 107, "end": 145, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 38 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 114, "end": 120, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 } }, "local": { "type": "Identifier", "start": 114, "end": 120, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 }, "identifierName": "Triple" }, "name": "Triple" } } ], "source": { "type": "StringLiteral", "start": 126, "end": 144, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 37 } }, "extra": { "rawValue": "../lib/triple.js", "raw": "'../lib/triple.js'" }, "value": "../lib/triple.js" } }, { "type": "ExpressionStatement", "start": 149, "end": 9706, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 253, "column": 7 } }, "expression": { "type": "CallExpression", "start": 149, "end": 9705, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 253, "column": 6 } }, "callee": { "type": "Identifier", "start": 149, "end": 157, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 }, "identifierName": "describe" }, "name": "describe" }, "arguments": [ { "type": "StringLiteral", "start": 158, "end": 171, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 22 } }, "extra": { "rawValue": "lseqnode.js", "raw": "'lseqnode.js'" }, "value": "lseqnode.js" }, { "type": "FunctionExpression", "start": 173, "end": 9704, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 253, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 184, "end": 9704, "loc": { "start": { "line": 7, "column": 35 }, "end": { "line": 253, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 191, "end": 1060, "loc": { "start": { "line": 9, "column": 1 }, "end": { "line": 31, "column": 8 } }, "expression": { "type": "CallExpression", "start": 191, "end": 1059, "loc": { "start": { "line": 9, "column": 1 }, "end": { "line": 31, "column": 7 } }, "callee": { "type": "Identifier", "start": 191, "end": 199, "loc": { "start": { "line": 9, "column": 1 }, "end": { "line": 9, "column": 9 }, "identifierName": "describe" }, "name": "describe" }, "arguments": [ { "type": "StringLiteral", "start": 200, "end": 213, "loc": { "start": { "line": 9, "column": 10 }, "end": { "line": 9, "column": 23 } }, "extra": { "rawValue": "constructor", "raw": "'constructor'" }, "value": "constructor" }, { "type": "FunctionExpression", "start": 215, "end": 1058, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 31, "column": 6 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 225, "end": 1058, "loc": { "start": { "line": 9, "column": 35 }, "end": { "line": 31, "column": 6 } }, "body": [ { "type": "ExpressionStatement", "start": 230, "end": 520, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 17, "column": 9 } }, "expression": { "type": "CallExpression", "start": 230, "end": 519, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 17, "column": 8 } }, "callee": { "type": "Identifier", "start": 230, "end": 232, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 4 }, "identifierName": "it" }, "name": "it" }, "arguments": [ { "type": "StringLiteral", "start": 233, "end": 261, "loc": { "start": { "line": 10, "column": 5 }, "end": { "line": 10, "column": 33 } }, "extra": { "rawValue": "returns a node of length 1", "raw": "'returns a node of length 1'" }, "value": "returns a node of length 1" }, { "type": "FunctionExpression", "start": 263, "end": 518, "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 17, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 273, "end": 518, "loc": { "start": { "line": 10, "column": 45 }, "end": { "line": 17, "column": 7 } }, "body": [ { "type": "VariableDeclaration", "start": 279, "end": 299, "loc": { "start": { "line": 11, "column": 3 }, "end": { "line": 11, "column": 23 } }, "declarations": [ { "type": "VariableDeclarator", "start": 283, "end": 298, "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 22 } }, "id": { "type": "Identifier", "start": 283, "end": 293, "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 17 }, "identifierName": "tripleList" }, "name": "tripleList" }, "init": { "type": "ArrayExpression", "start": 296, "end": 298, "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 22 } }, "elements": [] } } ], "kind": "var" }, { "type": "ExpressionStatement", "start": 304, "end": 339, "loc": { "start": { "line": 12, "column": 3 }, "end": { "line": 12, "column": 38 } }, "expression": { "type": "CallExpression", "start": 304, "end": 338, "loc": { "start": { "line": 12, "column": 3 }, "end": { "line": 12, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 304, "end": 319, "loc": { "start": { "line": 12, "column": 3 }, "end": { "line": 12, "column": 18 } }, "object": { "type": "Identifier", "start": 304, "end": 314, "loc": { "start": { "line": 12, "column": 3 }, "end": { "line": 12, "column": 13 }, "identifierName": "tripleList" }, "name": "tripleList" }, "property": { "type": "Identifier", "start": 315, "end": 319, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 18 }, "identifierName": "push" }, "name": "push" }, "computed": false }, "arguments": [ { "type": "NewExpression", "start": 320, "end": 337, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 36 } }, "callee": { "type": "Identifier", "start": 324, "end": 330, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 29 }, "identifierName": "Triple" }, "name": "Triple" }, "arguments": [ { "type": "NumericLiteral", "start": 331, "end": 332, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 31 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 333, "end": 334, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 33 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 335, "end": 336, "loc": { "start": { "line": 12, "column": 34 }, "end": { "line": 12, "column": 35 } }, "extra": { "rawValue": 3, "raw": "3" }, "value": 3 } ] } ] } }, { "type": "VariableDeclaration", "start": 344, "end": 385, "loc": { "start": { "line": 13, "column": 3 }, "end": { "line": 13, "column": 44 } }, "declarations": [ { "type": "VariableDeclarator", "start": 348, "end": 384, "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 13, "column": 43 } }, "id": { "type": "Identifier", "start": 348, "end": 352, "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 13, "column": 11 }, "identifierName": "node" }, "name": "node" }, "init": { "type": "NewExpression", "start": 355, "end": 384, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 43 } }, "callee": { "type": "Identifier", "start": 359, "end": 367, "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 26 }, "identifierName": "LSEQNode" }, "name": "LSEQNode" }, "arguments": [ { "type": "Identifier", "start": 368, "end": 378, "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 13, "column": 37 }, "identifierName": "tripleList" }, "name": "tripleList" }, { "type": "StringLiteral", "start": 380, "end": 383, "loc": { "start": { "line": 13, "column": 39 }, "end": { "line": 13, "column": 42 } }, "extra": { "rawValue": "a", "raw": "\"a\"" }, "value": "a" } ] } } ], "kind": "var" }, { "type": "ExpressionStatement", "start": 390, "end": 427, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 40 } }, "expression": { "type": "CallExpression", "start": 390, "end": 426, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 39 } }, "callee": { "type": "MemberExpression", "start": 390, "end": 423, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 36 } }, "object": { "type": "MemberExpression", "start": 390, "end": 419, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 32 } }, "object": { "type": "MemberExpression", "start": 390, "end": 416, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 29 } }, "object": { "type": "CallExpression", "start": 390, "end": 413, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 26 } }, "callee": { "type": "Identifier", "start": 390, "end": 396, "loc": { "start": { "line": 14, "column": 3 }, "end": { "line": 14, "column": 9 }, "identifierName": "expect" }, "name": "expect" }, "arguments": [ { "type": "MemberExpression", "start": 397, "end": 412, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 25 } }, "object": { "type": "Identifier", "start": 397, "end": 401, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 14 }, "identifierName": "node" }, "name": "node" }, "property": { "type": "Identifier", "start": 402, "end": 412, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 25 }, "identifierName": "subCounter" },