soocrate-core
Version:
this is the core of soocrate application
1,287 lines (1,286 loc) • 1.78 MB
JSON
{
"type": "File",
"start": 0,
"end": 4128,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 119,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 4128,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 119,
"column": 0
}
},
"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": 57,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 24
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 40,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 40,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 9
},
"identifierName": "BI"
},
"name": "BI"
}
}
],
"source": {
"type": "StringLiteral",
"start": 48,
"end": 56,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 23
}
},
"extra": {
"rawValue": "BigInt",
"raw": "'BigInt'"
},
"value": "BigInt"
}
},
{
"type": "ImportDeclaration",
"start": 59,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 66,
"end": 71,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 66,
"end": 71,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
},
"identifierName": "Mocha"
},
"name": "Mocha"
}
}
],
"source": {
"type": "StringLiteral",
"start": 77,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 25
}
},
"extra": {
"rawValue": "mocha",
"raw": "'mocha'"
},
"value": "mocha"
}
},
{
"type": "VariableDeclaration",
"start": 89,
"end": 135,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 93,
"end": 134,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 45
}
},
"id": {
"type": "Identifier",
"start": 93,
"end": 97,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 8
},
"identifierName": "Base"
},
"name": "Base"
},
"init": {
"type": "NewExpression",
"start": 100,
"end": 134,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 45
}
},
"callee": {
"type": "CallExpression",
"start": 105,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 41
}
},
"callee": {
"type": "Identifier",
"start": 105,
"end": 112,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 23
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 113,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 5,
"column": 40
}
},
"extra": {
"rawValue": "../lib/base.js",
"raw": "'../lib/base.js'"
},
"value": "../lib/base.js"
}
],
"extra": {
"parenthesized": true,
"parenStart": 104
}
},
"arguments": [
{
"type": "NumericLiteral",
"start": 132,
"end": 133,
"loc": {
"start": {
"line": 5,
"column": 43
},
"end": {
"line": 5,
"column": 44
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
}
]
}
}
],
"kind": "var"
},
{
"type": "ImportDeclaration",
"start": 137,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 38
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 144,
"end": 146,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 144,
"end": 146,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 9
},
"identifierName": "ID"
},
"name": "ID"
}
}
],
"source": {
"type": "StringLiteral",
"start": 152,
"end": 174,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 37
}
},
"extra": {
"rawValue": "../lib/identifier.js",
"raw": "'../lib/identifier.js'"
},
"value": "../lib/identifier.js"
}
},
{
"type": "ImportDeclaration",
"start": 177,
"end": 215,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 38
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 184,
"end": 190,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 184,
"end": 190,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 13
},
"identifierName": "Triple"
},
"name": "Triple"
}
}
],
"source": {
"type": "StringLiteral",
"start": 196,
"end": 214,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 7,
"column": 37
}
},
"extra": {
"rawValue": "../lib/triple.js",
"raw": "'../lib/triple.js'"
},
"value": "../lib/triple.js"
}
},
{
"type": "ImportDeclaration",
"start": 217,
"end": 259,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 42
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 224,
"end": 232,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 224,
"end": 232,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "LSEQNode"
},
"name": "LSEQNode"
}
}
],
"source": {
"type": "StringLiteral",
"start": 238,
"end": 258,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 41
}
},
"extra": {
"rawValue": "../lib/lseqnode.js",
"raw": "'../lib/lseqnode.js'"
},
"value": "../lib/lseqnode.js"
},
"trailingComments": [
{
"type": "CommentLine",
"value": " using a departure base value of 3 bits",
"start": 263,
"end": 304,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 41
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 306,
"end": 4126,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 118,
"column": 7
}
},
"expression": {
"type": "CallExpression",
"start": 306,
"end": 4125,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 118,
"column": 6
}
},
"callee": {
"type": "Identifier",
"start": 306,
"end": 314,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 8
},
"identifierName": "describe"
},
"name": "describe",
"leadingComments": null
},
"arguments": [
{
"type": "StringLiteral",
"start": 315,
"end": 329,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 23
}
},
"extra": {
"rawValue": "positions.js",
"raw": "'positions.js'"
},
"value": "positions.js"
},
{
"type": "FunctionExpression",
"start": 331,
"end": 4124,
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 118,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 342,
"end": 4124,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 118,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 355,
"end": 620,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 20,
"column": 7
}
},
"expression": {
"type": "CallExpression",
"start": 355,
"end": 619,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 20,
"column": 6
}
},
"callee": {
"type": "Identifier",
"start": 355,
"end": 363,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 12
},
"identifierName": "describe"
},
"name": "describe"
},
"arguments": [
{
"type": "StringLiteral",
"start": 364,
"end": 375,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 24
}
},
"extra": {
"rawValue": "positions",
"raw": "'positions'"
},
"value": "positions"
},
{
"type": "FunctionExpression",
"start": 377,
"end": 618,
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 20,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 387,
"end": 618,
"loc": {
"start": {
"line": 13,
"column": 36
},
"end": {
"line": 20,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 391,
"end": 611,
"loc": {
"start": {
"line": 14,
"column": 1
},
"end": {
"line": 19,
"column": 4
}
},
"expression": {
"type": "CallExpression",
"start": 391,
"end": 610,
"loc": {
"start": {
"line": 14,
"column": 1
},
"end": {
"line": 19,
"column": 3
}
},
"callee": {
"type": "Identifier",
"start": 391,
"end": 393,
"loc": {
"start": {
"line": 14,
"column": 1
},
"end": {
"line": 14,
"column": 3
},
"identifierName": "it"
},
"name": "it"
},
"arguments": [
{
"type": "StringLiteral",
"start": 394,
"end": 420,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 30
}
},
"extra": {
"rawValue": "is initialized correctly",
"raw": "'is initialized correctly'"
},
"value": "is initialized correctly"
},
{
"type": "FunctionExpression",
"start": 422,
"end": 609,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 19,
"column": 2
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 432,
"end": 609,
"loc": {
"start": {
"line": 14,
"column": 42
},
"end": {
"line": 19,
"column": 2
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 440,
"end": 484,
"loc": {
"start": {
"line": 15,
"column": 5
},
"end": {
"line": 15,
"column": 49
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 444,
"end": 483,
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 15,
"column": 48
}
},
"id": {
"type": "Identifier",
"start": 444,
"end": 446,
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 15,
"column": 11
},
"identifierName": "i1"
},
"name": "i1"
},
"init": {
"type": "NewExpression",
"start": 449,
"end": 483,
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 15,
"column": 48
}
},
"callee": {
"type": "Identifier",
"start": 453,
"end": 455,
"loc": {
"start": {
"line": 15,
"column": 18
},
"end": {
"line": 15,
"column": 20
},
"identifierName": "ID"
},
"name": "ID"
},
"arguments": [
{
"type": "CallExpression",
"start": 456,
"end": 474,
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 39
}
},
"callee": {
"type": "MemberExpression",
"start": 456,
"end": 469,
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 456,
"end": 458,
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 23
},
"identifierName": "BI"
},
"name": "BI"
},
"property": {
"type": "Identifier",
"start": 459,
"end": 469,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 15,
"column": 34
},
"identifierName": "int2bigInt"
},
"name": "int2bigInt"
},
"computed": false
},
"arguments": [
{
"type": "NumericLiteral",
"start": 470,
"end": 471,
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 36
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 472,
"end": 473,
"loc": {
"start": {
"line": 15,
"column": 37
},
"end": {
"line": 15,
"column": 38
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
]
},
{
"type": "ArrayExpression",
"start": 475,
"end": 478,
"loc": {
"start": {
"line": 15,
"column": 40
},
"end": {
"line": 15,
"column": 43
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 476,
"end": 477,
"loc": {
"start": {
"line": 15,
"column": 41
},
"end": {
"line": 15,
"column": 42
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
]
},
{
"type": "ArrayExpression",
"start": 479,
"end": 482,
"loc": {
"start": {
"line": 15,
"column": 44
},
"end": {
"line": 15,
"column": 47
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 480,
"end": 481,
"loc": {
"start": {
"line": 15,
"column": 45
},
"end": {
"line": 15,
"column": 46
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
]
}
]
}
}
],
"kind": "var"
},
{
"type": "ExpressionStatement",
"start": 491,
"end": 527,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 41
}
},
"expression": {
"type": "CallExpression",
"start": 491,
"end": 526,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 40
}
},
"callee": {
"type": "MemberExpression",
"start": 491,
"end": 524,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 491,
"end": 521,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 35
}
},
"object": {
"type": "MemberExpression",
"start": 491,
"end": 518,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 32
}
},
"object": {
"type": "CallExpression",
"start": 491,
"end": 515,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 29
}
},
"callee": {
"type": "Identifier",
"start": 491,
"end": 497,
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 11
},
"identifierName": "expect"
},
"name": "expect"
},
"arguments": [
{
"type": "CallExpression",
"start": 498,
"end": 514,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,