yjs/docs/ast/source/Util/relativePosition.js.json
2018-04-27 18:45:01 +02:00

14010 lines
372 KiB
JSON

{
"type": "File",
"start": 0,
"end": 3296,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 110,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 3296,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 110,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 27
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "ID"
},
"name": "ID"
}
}
],
"source": {
"type": "StringLiteral",
"start": 15,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 27
}
},
"extra": {
"rawValue": "./ID/ID.js",
"raw": "'./ID/ID.js'"
},
"value": "./ID/ID.js"
}
},
{
"type": "ImportDeclaration",
"start": 28,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 35
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 35,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 35,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "RootID"
},
"name": "RootID"
}
}
],
"source": {
"type": "StringLiteral",
"start": 47,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
},
"extra": {
"rawValue": "./ID/RootID.js",
"raw": "'./ID/RootID.js'"
},
"value": "./ID/RootID.js"
}
},
{
"type": "ImportDeclaration",
"start": 64,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 32
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 71,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 71,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 9
},
"identifierName": "GC"
},
"name": "GC"
}
}
],
"source": {
"type": "StringLiteral",
"start": 79,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 32
}
},
"extra": {
"rawValue": "../Struct/GC.js",
"raw": "'../Struct/GC.js'"
},
"value": "../Struct/GC.js",
"leadingComments": null,
"trailingComments": null
},
"trailingComments": [
{
"type": "CommentLine",
"value": " TODO: Implement function to describe ranges",
"start": 98,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A relative position that is based on the Yjs model. In contrast to an\n * absolute position (position by index), the relative position can be\n * recomputed when remote changes are received. For example:\n *\n * ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the cursor position.\n *\n * A relative cursor position can be obtained with the function\n * {@link getRelativePosition} and it can be transformed to an absolute position\n * with {@link fromRelativePosition}.\n *\n * Pro tip: Use this to implement shared cursor locations in YText or YXml!\n * The relative position is {@link encodable}, so you can send it to other\n * clients.\n *\n * @example\n * // Current cursor position is at position 10\n * let relativePosition = getRelativePosition(yText, 10)\n * // modify yText\n * yText.insert(0, 'abc')\n * yText.delete(3, 10)\n * // Compute the cursor position\n * let absolutePosition = fromRelativePosition(y, relativePosition)\n * absolutePosition.type // => yText\n * console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3\n *\n * @typedef {encodable} RelativePosition\n ",
"start": 146,
"end": 1249,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 34,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Create a relativePosition based on a absolute position.\n *\n * @param {YType} type The base type (e.g. YText or YArray).\n * @param {Integer} offset The absolute position.\n ",
"start": 1251,
"end": 1431,
"loc": {
"start": {
"line": 36,
"column": 0
},
"end": {
"line": 41,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 1432,
"end": 1854,
"loc": {
"start": {
"line": 42,
"column": 0
},
"end": {
"line": 55,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 1439,
"end": 1854,
"loc": {
"start": {
"line": 42,
"column": 7
},
"end": {
"line": 55,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 1448,
"end": 1467,
"loc": {
"start": {
"line": 42,
"column": 16
},
"end": {
"line": 42,
"column": 35
},
"identifierName": "getRelativePosition"
},
"name": "getRelativePosition",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1469,
"end": 1473,
"loc": {
"start": {
"line": 42,
"column": 37
},
"end": {
"line": 42,
"column": 41
},
"identifierName": "type"
},
"name": "type"
},
{
"type": "Identifier",
"start": 1475,
"end": 1481,
"loc": {
"start": {
"line": 42,
"column": 43
},
"end": {
"line": 42,
"column": 49
},
"identifierName": "offset"
},
"name": "offset"
}
],
"body": {
"type": "BlockStatement",
"start": 1483,
"end": 1854,
"loc": {
"start": {
"line": 42,
"column": 51
},
"end": {
"line": 55,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 1531,
"end": 1550,
"loc": {
"start": {
"line": 44,
"column": 2
},
"end": {
"line": 44,
"column": 21
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 1535,
"end": 1550,
"loc": {
"start": {
"line": 44,
"column": 6
},
"end": {
"line": 44,
"column": 21
}
},
"id": {
"type": "Identifier",
"start": 1535,
"end": 1536,
"loc": {
"start": {
"line": 44,
"column": 6
},
"end": {
"line": 44,
"column": 7
},
"identifierName": "t"
},
"name": "t",
"leadingComments": null
},
"init": {
"type": "MemberExpression",
"start": 1539,
"end": 1550,
"loc": {
"start": {
"line": 44,
"column": 10
},
"end": {
"line": 44,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 1539,
"end": 1543,
"loc": {
"start": {
"line": 44,
"column": 10
},
"end": {
"line": 44,
"column": 14
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 1544,
"end": 1550,
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 21
},
"identifierName": "_start"
},
"name": "_start"
},
"computed": false
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " TODO: rename to createRelativePosition",
"start": 1487,
"end": 1528,
"loc": {
"start": {
"line": 43,
"column": 2
},
"end": {
"line": 43,
"column": 43
}
}
}
]
},
{
"type": "WhileStatement",
"start": 1553,
"end": 1748,
"loc": {
"start": {
"line": 45,
"column": 2
},
"end": {
"line": 53,
"column": 3
}
},
"test": {
"type": "BinaryExpression",
"start": 1560,
"end": 1570,
"loc": {
"start": {
"line": 45,
"column": 9
},
"end": {
"line": 45,
"column": 19
}
},
"left": {
"type": "Identifier",
"start": 1560,
"end": 1561,
"loc": {
"start": {
"line": 45,
"column": 9
},
"end": {
"line": 45,
"column": 10
},
"identifierName": "t"
},
"name": "t"
},
"operator": "!==",
"right": {
"type": "NullLiteral",
"start": 1566,
"end": 1570,
"loc": {
"start": {
"line": 45,
"column": 15
},
"end": {
"line": 45,
"column": 19
}
}
}
},
"body": {
"type": "BlockStatement",
"start": 1572,
"end": 1748,
"loc": {
"start": {
"line": 45,
"column": 21
},
"end": {
"line": 53,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 1578,
"end": 1727,
"loc": {
"start": {
"line": 46,
"column": 4
},
"end": {
"line": 51,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 1582,
"end": 1602,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 28
}
},
"left": {
"type": "MemberExpression",
"start": 1582,
"end": 1592,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 18
}
},
"object": {
"type": "Identifier",
"start": 1582,
"end": 1583,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 9
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1584,
"end": 1592,
"loc": {
"start": {
"line": 46,
"column": 10
},
"end": {
"line": 46,
"column": 18
},
"identifierName": "_deleted"
},
"name": "_deleted"
},
"computed": false
},
"operator": "===",
"right": {
"type": "BooleanLiteral",
"start": 1597,
"end": 1602,
"loc": {
"start": {
"line": 46,
"column": 23
},
"end": {
"line": 46,
"column": 28
}
},
"value": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 1604,
"end": 1727,
"loc": {
"start": {
"line": 46,
"column": 30
},
"end": {
"line": 51,
"column": 5
}
},
"body": [
{
"type": "IfStatement",
"start": 1612,
"end": 1695,
"loc": {
"start": {
"line": 47,
"column": 6
},
"end": {
"line": 49,
"column": 7
}
},
"test": {
"type": "BinaryExpression",
"start": 1616,
"end": 1634,
"loc": {
"start": {
"line": 47,
"column": 10
},
"end": {
"line": 47,
"column": 28
}
},
"left": {
"type": "MemberExpression",
"start": 1616,
"end": 1625,
"loc": {
"start": {
"line": 47,
"column": 10
},
"end": {
"line": 47,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 1616,
"end": 1617,
"loc": {
"start": {
"line": 47,
"column": 10
},
"end": {
"line": 47,
"column": 11
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1618,
"end": 1625,
"loc": {
"start": {
"line": 47,
"column": 12
},
"end": {
"line": 47,
"column": 19
},
"identifierName": "_length"
},
"name": "_length"
},
"computed": false
},
"operator": ">",
"right": {
"type": "Identifier",
"start": 1628,
"end": 1634,
"loc": {
"start": {
"line": 47,
"column": 22
},
"end": {
"line": 47,
"column": 28
},
"identifierName": "offset"
},
"name": "offset"
}
},
"consequent": {
"type": "BlockStatement",
"start": 1636,
"end": 1695,
"loc": {
"start": {
"line": 47,
"column": 30
},
"end": {
"line": 49,
"column": 7
}
},
"body": [
{
"type": "ReturnStatement",
"start": 1646,
"end": 1687,
"loc": {
"start": {
"line": 48,
"column": 8
},
"end": {
"line": 48,
"column": 49
}
},
"argument": {
"type": "ArrayExpression",
"start": 1653,
"end": 1687,
"loc": {
"start": {
"line": 48,
"column": 15
},
"end": {
"line": 48,
"column": 49
}
},
"elements": [
{
"type": "MemberExpression",
"start": 1654,
"end": 1664,
"loc": {
"start": {
"line": 48,
"column": 16
},
"end": {
"line": 48,
"column": 26
}
},
"object": {
"type": "MemberExpression",
"start": 1654,
"end": 1659,
"loc": {
"start": {
"line": 48,
"column": 16
},
"end": {
"line": 48,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 1654,
"end": 1655,
"loc": {
"start": {
"line": 48,
"column": 16
},
"end": {
"line": 48,
"column": 17
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1656,
"end": 1659,
"loc": {
"start": {
"line": 48,
"column": 18
},
"end": {
"line": 48,
"column": 21
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1660,
"end": 1664,
"loc": {
"start": {
"line": 48,
"column": 22
},
"end": {
"line": 48,
"column": 26
},
"identifierName": "user"
},
"name": "user"
},
"computed": false
},
{
"type": "BinaryExpression",
"start": 1666,
"end": 1686,
"loc": {
"start": {
"line": 48,
"column": 28
},
"end": {
"line": 48,
"column": 48
}
},
"left": {
"type": "MemberExpression",
"start": 1666,
"end": 1677,
"loc": {
"start": {
"line": 48,
"column": 28
},
"end": {
"line": 48,
"column": 39
}
},
"object": {
"type": "MemberExpression",
"start": 1666,
"end": 1671,
"loc": {
"start": {
"line": 48,
"column": 28
},
"end": {
"line": 48,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 1666,
"end": 1667,
"loc": {
"start": {
"line": 48,
"column": 28
},
"end": {
"line": 48,
"column": 29
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1668,
"end": 1671,
"loc": {
"start": {
"line": 48,
"column": 30
},
"end": {
"line": 48,
"column": 33
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1672,
"end": 1677,
"loc": {
"start": {
"line": 48,
"column": 34
},
"end": {
"line": 48,
"column": 39
},
"identifierName": "clock"
},
"name": "clock"
},
"computed": false
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 1680,
"end": 1686,
"loc": {
"start": {
"line": 48,
"column": 42
},
"end": {
"line": 48,
"column": 48
},
"identifierName": "offset"
},
"name": "offset"
}
}
]
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 1702,
"end": 1721,
"loc": {
"start": {
"line": 50,
"column": 6
},
"end": {
"line": 50,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1702,
"end": 1721,
"loc": {
"start": {
"line": 50,
"column": 6
},
"end": {
"line": 50,
"column": 25
}
},
"operator": "-=",
"left": {
"type": "Identifier",
"start": 1702,
"end": 1708,
"loc": {
"start": {
"line": 50,
"column": 6
},
"end": {
"line": 50,
"column": 12
},
"identifierName": "offset"
},
"name": "offset"
},
"right": {
"type": "MemberExpression",
"start": 1712,
"end": 1721,
"loc": {
"start": {
"line": 50,
"column": 16
},
"end": {
"line": 50,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 1712,
"end": 1713,
"loc": {
"start": {
"line": 50,
"column": 16
},
"end": {
"line": 50,
"column": 17
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1714,
"end": 1721,
"loc": {
"start": {
"line": 50,
"column": 18
},
"end": {
"line": 50,
"column": 25
},
"identifierName": "_length"
},
"name": "_length"
},
"computed": false
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 1732,
"end": 1744,
"loc": {
"start": {
"line": 52,
"column": 4
},
"end": {
"line": 52,
"column": 16
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1732,
"end": 1744,
"loc": {
"start": {
"line": 52,
"column": 4
},
"end": {
"line": 52,
"column": 16
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 1732,
"end": 1733,
"loc": {
"start": {
"line": 52,
"column": 4
},
"end": {
"line": 52,
"column": 5
},
"identifierName": "t"
},
"name": "t"
},
"right": {
"type": "MemberExpression",
"start": 1736,
"end": 1744,
"loc": {
"start": {
"line": 52,
"column": 8
},
"end": {
"line": 52,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 1736,
"end": 1737,
"loc": {
"start": {
"line": 52,
"column": 8
},
"end": {
"line": 52,
"column": 9
},
"identifierName": "t"
},
"name": "t"
},
"property": {
"type": "Identifier",
"start": 1738,
"end": 1744,
"loc": {
"start": {
"line": 52,
"column": 10
},
"end": {
"line": 52,
"column": 16
},
"identifierName": "_right"
},
"name": "_right"
},
"computed": false
}
}
}
],
"directives": []
}
},
{
"type": "ReturnStatement",
"start": 1751,
"end": 1852,
"loc": {
"start": {
"line": 54,
"column": 2
},
"end": {
"line": 54,
"column": 103
}
},
"argument": {
"type": "ArrayExpression",
"start": 1758,
"end": 1852,
"loc": {
"start": {
"line": 54,
"column": 9
},
"end": {
"line": 54,
"column": 103
}
},
"elements": [
{
"type": "StringLiteral",
"start": 1759,
"end": 1766,
"loc": {
"start": {
"line": 54,
"column": 10
},
"end": {
"line": 54,
"column": 17
}
},
"extra": {
"rawValue": "endof",
"raw": "'endof'"
},
"value": "endof"
},
{
"type": "MemberExpression",
"start": 1768,
"end": 1781,
"loc": {
"start": {
"line": 54,
"column": 19
},
"end": {
"line": 54,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 1768,
"end": 1776,
"loc": {
"start": {
"line": 54,
"column": 19
},
"end": {
"line": 54,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 1768,
"end": 1772,
"loc": {
"start": {
"line": 54,
"column": 19
},
"end": {
"line": 54,
"column": 23
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 1773,
"end": 1776,
"loc": {
"start": {
"line": 54,
"column": 24
},
"end": {
"line": 54,
"column": 27
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1777,
"end": 1781,
"loc": {
"start": {
"line": 54,
"column": 28
},
"end": {
"line": 54,
"column": 32
},
"identifierName": "user"
},
"name": "user"
},
"computed": false
},
{
"type": "LogicalExpression",
"start": 1783,
"end": 1805,
"loc": {
"start": {
"line": 54,
"column": 34
},
"end": {
"line": 54,
"column": 56
}
},
"left": {
"type": "MemberExpression",
"start": 1783,
"end": 1797,
"loc": {
"start": {
"line": 54,
"column": 34
},
"end": {
"line": 54,
"column": 48
}
},
"object": {
"type": "MemberExpression",
"start": 1783,
"end": 1791,
"loc": {
"start": {
"line": 54,
"column": 34
},
"end": {
"line": 54,
"column": 42
}
},
"object": {
"type": "Identifier",
"start": 1783,
"end": 1787,
"loc": {
"start": {
"line": 54,
"column": 34
},
"end": {
"line": 54,
"column": 38
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 1788,
"end": 1791,
"loc": {
"start": {
"line": 54,
"column": 39
},
"end": {
"line": 54,
"column": 42
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1792,
"end": 1797,
"loc": {
"start": {
"line": 54,
"column": 43
},
"end": {
"line": 54,
"column": 48
},
"identifierName": "clock"
},
"name": "clock"
},
"computed": false
},
"operator": "||",
"right": {
"type": "NullLiteral",
"start": 1801,
"end": 1805,
"loc": {
"start": {
"line": 54,
"column": 52
},
"end": {
"line": 54,
"column": 56
}
}
}
},
{
"type": "LogicalExpression",
"start": 1807,
"end": 1828,
"loc": {
"start": {
"line": 54,
"column": 58
},
"end": {
"line": 54,
"column": 79
}
},
"left": {
"type": "MemberExpression",
"start": 1807,
"end": 1820,
"loc": {
"start": {
"line": 54,
"column": 58
},
"end": {
"line": 54,
"column": 71
}
},
"object": {
"type": "MemberExpression",
"start": 1807,
"end": 1815,
"loc": {
"start": {
"line": 54,
"column": 58
},
"end": {
"line": 54,
"column": 66
}
},
"object": {
"type": "Identifier",
"start": 1807,
"end": 1811,
"loc": {
"start": {
"line": 54,
"column": 58
},
"end": {
"line": 54,
"column": 62
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 1812,
"end": 1815,
"loc": {
"start": {
"line": 54,
"column": 63
},
"end": {
"line": 54,
"column": 66
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1816,
"end": 1820,
"loc": {
"start": {
"line": 54,
"column": 67
},
"end": {
"line": 54,
"column": 71
},
"identifierName": "name"
},
"name": "name"
},
"computed": false
},
"operator": "||",
"right": {
"type": "NullLiteral",
"start": 1824,
"end": 1828,
"loc": {
"start": {
"line": 54,
"column": 75
},
"end": {
"line": 54,
"column": 79
}
}
}
},
{
"type": "LogicalExpression",
"start": 1830,
"end": 1851,
"loc": {
"start": {
"line": 54,
"column": 81
},
"end": {
"line": 54,
"column": 102
}
},
"left": {
"type": "MemberExpression",
"start": 1830,
"end": 1843,
"loc": {
"start": {
"line": 54,
"column": 81
},
"end": {
"line": 54,
"column": 94
}
},
"object": {
"type": "MemberExpression",
"start": 1830,
"end": 1838,
"loc": {
"start": {
"line": 54,
"column": 81
},
"end": {
"line": 54,
"column": 89
}
},
"object": {
"type": "Identifier",
"start": 1830,
"end": 1834,
"loc": {
"start": {
"line": 54,
"column": 81
},
"end": {
"line": 54,
"column": 85
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 1835,
"end": 1838,
"loc": {
"start": {
"line": 54,
"column": 86
},
"end": {
"line": 54,
"column": 89
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1839,
"end": 1843,
"loc": {
"start": {
"line": 54,
"column": 90
},
"end": {
"line": 54,
"column": 94
},
"identifierName": "type"
},
"name": "type"
},
"computed": false
},
"operator": "||",
"right": {
"type": "NullLiteral",
"start": 1847,
"end": 1851,
"loc": {
"start": {
"line": 54,
"column": 98
},
"end": {
"line": 54,
"column": 102
}
}
}
}
]
}
}
],
"directives": [],
"trailingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " TODO: Implement function to describe ranges",
"start": 98,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A relative position that is based on the Yjs model. In contrast to an\n * absolute position (position by index), the relative position can be\n * recomputed when remote changes are received. For example:\n *\n * ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the cursor position.\n *\n * A relative cursor position can be obtained with the function\n * {@link getRelativePosition} and it can be transformed to an absolute position\n * with {@link fromRelativePosition}.\n *\n * Pro tip: Use this to implement shared cursor locations in YText or YXml!\n * The relative position is {@link encodable}, so you can send it to other\n * clients.\n *\n * @example\n * // Current cursor position is at position 10\n * let relativePosition = getRelativePosition(yText, 10)\n * // modify yText\n * yText.insert(0, 'abc')\n * yText.delete(3, 10)\n * // Compute the cursor position\n * let absolutePosition = fromRelativePosition(y, relativePosition)\n * absolutePosition.type // => yText\n * console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3\n *\n * @typedef {encodable} RelativePosition\n ",
"start": 146,
"end": 1249,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 34,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Create a relativePosition based on a absolute position.\n *\n * @param {YType} type The base type (e.g. YText or YArray).\n * @param {Integer} offset The absolute position.\n ",
"start": 1251,
"end": 1431,
"loc": {
"start": {
"line": 36,
"column": 0
},
"end": {
"line": 41,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
}
]
},
"leadingComments": [
{
"type": "CommentLine",
"value": " TODO: Implement function to describe ranges",
"start": 98,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A relative position that is based on the Yjs model. In contrast to an\n * absolute position (position by index), the relative position can be\n * recomputed when remote changes are received. For example:\n *\n * ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the cursor position.\n *\n * A relative cursor position can be obtained with the function\n * {@link getRelativePosition} and it can be transformed to an absolute position\n * with {@link fromRelativePosition}.\n *\n * Pro tip: Use this to implement shared cursor locations in YText or YXml!\n * The relative position is {@link encodable}, so you can send it to other\n * clients.\n *\n * @example\n * // Current cursor position is at position 10\n * let relativePosition = getRelativePosition(yText, 10)\n * // modify yText\n * yText.insert(0, 'abc')\n * yText.delete(3, 10)\n * // Compute the cursor position\n * let absolutePosition = fromRelativePosition(y, relativePosition)\n * absolutePosition.type // => yText\n * console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3\n *\n * @typedef {encodable} RelativePosition\n ",
"start": 146,
"end": 1249,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 34,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Create a relativePosition based on a absolute position.\n *\n * @param {YType} type The base type (e.g. YText or YArray).\n * @param {Integer} offset The absolute position.\n ",
"start": 1251,
"end": 1431,
"loc": {
"start": {
"line": 36,
"column": 0
},
"end": {
"line": 41,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 2399,
"end": 3295,
"loc": {
"start": {
"line": 71,
"column": 0
},
"end": {
"line": 109,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 2406,
"end": 3295,
"loc": {
"start": {
"line": 71,
"column": 7
},
"end": {
"line": 109,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 2415,
"end": 2435,
"loc": {
"start": {
"line": 71,
"column": 16
},
"end": {
"line": 71,
"column": 36
},
"identifierName": "fromRelativePosition"
},
"name": "fromRelativePosition",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 2437,
"end": 2438,
"loc": {
"start": {
"line": 71,
"column": 38
},
"end": {
"line": 71,
"column": 39
},
"identifierName": "y"
},
"name": "y"
},
{
"type": "Identifier",
"start": 2440,
"end": 2444,
"loc": {
"start": {
"line": 71,
"column": 41
},
"end": {
"line": 71,
"column": 45
},
"identifierName": "rpos"
},
"name": "rpos"
}
],
"body": {
"type": "BlockStatement",
"start": 2446,
"end": 3295,
"loc": {
"start": {
"line": 71,
"column": 47
},
"end": {
"line": 109,
"column": 1
}
},
"body": [
{
"type": "IfStatement",
"start": 2450,
"end": 3293,
"loc": {
"start": {
"line": 72,
"column": 2
},
"end": {
"line": 108,
"column": 3
}
},
"test": {
"type": "BinaryExpression",
"start": 2454,
"end": 2473,
"loc": {
"start": {
"line": 72,
"column": 6
},
"end": {
"line": 72,
"column": 25
}
},
"left": {
"type": "MemberExpression",
"start": 2454,
"end": 2461,
"loc": {
"start": {
"line": 72,
"column": 6
},
"end": {
"line": 72,
"column": 13
}
},
"object": {
"type": "Identifier",
"start": 2454,
"end": 2458,
"loc": {
"start": {
"line": 72,
"column": 6
},
"end": {
"line": 72,
"column": 10
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2459,
"end": 2460,
"loc": {
"start": {
"line": 72,
"column": 11
},
"end": {
"line": 72,
"column": 12
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
"computed": true
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 2466,
"end": 2473,
"loc": {
"start": {
"line": 72,
"column": 18
},
"end": {
"line": 72,
"column": 25
}
},
"extra": {
"rawValue": "endof",
"raw": "'endof'"
},
"value": "endof"
}
},
"consequent": {
"type": "BlockStatement",
"start": 2475,
"end": 2777,
"loc": {
"start": {
"line": 72,
"column": 27
},
"end": {
"line": 87,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 2481,
"end": 2487,
"loc": {
"start": {
"line": 73,
"column": 4
},
"end": {
"line": 73,
"column": 10
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 2485,
"end": 2487,
"loc": {
"start": {
"line": 73,
"column": 8
},
"end": {
"line": 73,
"column": 10
}
},
"id": {
"type": "Identifier",
"start": 2485,
"end": 2487,
"loc": {
"start": {
"line": 73,
"column": 8
},
"end": {
"line": 73,
"column": 10
},
"identifierName": "id"
},
"name": "id"
},
"init": null
}
],
"kind": "let"
},
{
"type": "IfStatement",
"start": 2492,
"end": 2610,
"loc": {
"start": {
"line": 74,
"column": 4
},
"end": {
"line": 78,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 2496,
"end": 2512,
"loc": {
"start": {
"line": 74,
"column": 8
},
"end": {
"line": 74,
"column": 24
}
},
"left": {
"type": "MemberExpression",
"start": 2496,
"end": 2503,
"loc": {
"start": {
"line": 74,
"column": 8
},
"end": {
"line": 74,
"column": 15
}
},
"object": {
"type": "Identifier",
"start": 2496,
"end": 2500,
"loc": {
"start": {
"line": 74,
"column": 8
},
"end": {
"line": 74,
"column": 12
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2501,
"end": 2502,
"loc": {
"start": {
"line": 74,
"column": 13
},
"end": {
"line": 74,
"column": 14
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
},
"computed": true
},
"operator": "===",
"right": {
"type": "NullLiteral",
"start": 2508,
"end": 2512,
"loc": {
"start": {
"line": 74,
"column": 20
},
"end": {
"line": 74,
"column": 24
}
}
}
},
"consequent": {
"type": "BlockStatement",
"start": 2514,
"end": 2557,
"loc": {
"start": {
"line": 74,
"column": 26
},
"end": {
"line": 76,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 2522,
"end": 2551,
"loc": {
"start": {
"line": 75,
"column": 6
},
"end": {
"line": 75,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2522,
"end": 2551,
"loc": {
"start": {
"line": 75,
"column": 6
},
"end": {
"line": 75,
"column": 35
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 2522,
"end": 2524,
"loc": {
"start": {
"line": 75,
"column": 6
},
"end": {
"line": 75,
"column": 8
},
"identifierName": "id"
},
"name": "id"
},
"right": {
"type": "NewExpression",
"start": 2527,
"end": 2551,
"loc": {
"start": {
"line": 75,
"column": 11
},
"end": {
"line": 75,
"column": 35
}
},
"callee": {
"type": "Identifier",
"start": 2531,
"end": 2533,
"loc": {
"start": {
"line": 75,
"column": 15
},
"end": {
"line": 75,
"column": 17
},
"identifierName": "ID"
},
"name": "ID"
},
"arguments": [
{
"type": "MemberExpression",
"start": 2534,
"end": 2541,
"loc": {
"start": {
"line": 75,
"column": 18
},
"end": {
"line": 75,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 2534,
"end": 2538,
"loc": {
"start": {
"line": 75,
"column": 18
},
"end": {
"line": 75,
"column": 22
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2539,
"end": 2540,
"loc": {
"start": {
"line": 75,
"column": 23
},
"end": {
"line": 75,
"column": 24
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"computed": true
},
{
"type": "MemberExpression",
"start": 2543,
"end": 2550,
"loc": {
"start": {
"line": 75,
"column": 27
},
"end": {
"line": 75,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 2543,
"end": 2547,
"loc": {
"start": {
"line": 75,
"column": 27
},
"end": {
"line": 75,
"column": 31
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2548,
"end": 2549,
"loc": {
"start": {
"line": 75,
"column": 32
},
"end": {
"line": 75,
"column": 33
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
"computed": true
}
]
}
}
}
],
"directives": []
},
"alternate": {
"type": "BlockStatement",
"start": 2563,
"end": 2610,
"loc": {
"start": {
"line": 76,
"column": 11
},
"end": {
"line": 78,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 2571,
"end": 2604,
"loc": {
"start": {
"line": 77,
"column": 6
},
"end": {
"line": 77,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2571,
"end": 2604,
"loc": {
"start": {
"line": 77,
"column": 6
},
"end": {
"line": 77,
"column": 39
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 2571,
"end": 2573,
"loc": {
"start": {
"line": 77,
"column": 6
},
"end": {
"line": 77,
"column": 8
},
"identifierName": "id"
},
"name": "id"
},
"right": {
"type": "NewExpression",
"start": 2576,
"end": 2604,
"loc": {
"start": {
"line": 77,
"column": 11
},
"end": {
"line": 77,
"column": 39
}
},
"callee": {
"type": "Identifier",
"start": 2580,
"end": 2586,
"loc": {
"start": {
"line": 77,
"column": 15
},
"end": {
"line": 77,
"column": 21
},
"identifierName": "RootID"
},
"name": "RootID"
},
"arguments": [
{
"type": "MemberExpression",
"start": 2587,
"end": 2594,
"loc": {
"start": {
"line": 77,
"column": 22
},
"end": {
"line": 77,
"column": 29
}
},
"object": {
"type": "Identifier",
"start": 2587,
"end": 2591,
"loc": {
"start": {
"line": 77,
"column": 22
},
"end": {
"line": 77,
"column": 26
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2592,
"end": 2593,
"loc": {
"start": {
"line": 77,
"column": 27
},
"end": {
"line": 77,
"column": 28
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
},
"computed": true
},
{
"type": "MemberExpression",
"start": 2596,
"end": 2603,
"loc": {
"start": {
"line": 77,
"column": 31
},
"end": {
"line": 77,
"column": 38
}
},
"object": {
"type": "Identifier",
"start": 2596,
"end": 2600,
"loc": {
"start": {
"line": 77,
"column": 31
},
"end": {
"line": 77,
"column": 35
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2601,
"end": 2602,
"loc": {
"start": {
"line": 77,
"column": 36
},
"end": {
"line": 77,
"column": 37
}
},
"extra": {
"rawValue": 4,
"raw": "4"
},
"value": 4
},
"computed": true
}
]
}
}
}
],
"directives": []
}
},
{
"type": "VariableDeclaration",
"start": 2615,
"end": 2640,
"loc": {
"start": {
"line": 79,
"column": 4
},
"end": {
"line": 79,
"column": 29
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 2621,
"end": 2640,
"loc": {
"start": {
"line": 79,
"column": 10
},
"end": {
"line": 79,
"column": 29
}
},
"id": {
"type": "Identifier",
"start": 2621,
"end": 2625,
"loc": {
"start": {
"line": 79,
"column": 10
},
"end": {
"line": 79,
"column": 14
},
"identifierName": "type"
},
"name": "type"
},
"init": {
"type": "CallExpression",
"start": 2628,
"end": 2640,
"loc": {
"start": {
"line": 79,
"column": 17
},
"end": {
"line": 79,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 2628,
"end": 2636,
"loc": {
"start": {
"line": 79,
"column": 17
},
"end": {
"line": 79,
"column": 25
}
},
"object": {
"type": "MemberExpression",
"start": 2628,
"end": 2632,
"loc": {
"start": {
"line": 79,
"column": 17
},
"end": {
"line": 79,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 2628,
"end": 2629,
"loc": {
"start": {
"line": 79,
"column": 17
},
"end": {
"line": 79,
"column": 18
},
"identifierName": "y"
},
"name": "y"
},
"property": {
"type": "Identifier",
"start": 2630,
"end": 2632,
"loc": {
"start": {
"line": 79,
"column": 19
},
"end": {
"line": 79,
"column": 21
},
"identifierName": "os"
},
"name": "os"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 2633,
"end": 2636,
"loc": {
"start": {
"line": 79,
"column": 22
},
"end": {
"line": 79,
"column": 25
},
"identifierName": "get"
},
"name": "get"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 2637,
"end": 2639,
"loc": {
"start": {
"line": 79,
"column": 26
},
"end": {
"line": 79,
"column": 28
},
"identifierName": "id"
},
"name": "id"
}
]
}
}
],
"kind": "const"
},
{
"type": "IfStatement",
"start": 2645,
"end": 2716,
"loc": {
"start": {
"line": 80,
"column": 4
},
"end": {
"line": 82,
"column": 5
}
},
"test": {
"type": "LogicalExpression",
"start": 2649,
"end": 2689,
"loc": {
"start": {
"line": 80,
"column": 8
},
"end": {
"line": 80,
"column": 48
}
},
"left": {
"type": "BinaryExpression",
"start": 2649,
"end": 2662,
"loc": {
"start": {
"line": 80,
"column": 8
},
"end": {
"line": 80,
"column": 21
}
},
"left": {
"type": "Identifier",
"start": 2649,
"end": 2653,
"loc": {
"start": {
"line": 80,
"column": 8
},
"end": {
"line": 80,
"column": 12
},
"identifierName": "type"
},
"name": "type"
},
"operator": "===",
"right": {
"type": "NullLiteral",
"start": 2658,
"end": 2662,
"loc": {
"start": {
"line": 80,
"column": 17
},
"end": {
"line": 80,
"column": 21
}
}
}
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"start": 2666,
"end": 2689,
"loc": {
"start": {
"line": 80,
"column": 25
},
"end": {
"line": 80,
"column": 48
}
},
"left": {
"type": "MemberExpression",
"start": 2666,
"end": 2682,
"loc": {
"start": {
"line": 80,
"column": 25
},
"end": {
"line": 80,
"column": 41
}
},
"object": {
"type": "Identifier",
"start": 2666,
"end": 2670,
"loc": {
"start": {
"line": 80,
"column": 25
},
"end": {
"line": 80,
"column": 29
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 2671,
"end": 2682,
"loc": {
"start": {
"line": 80,
"column": 30
},
"end": {
"line": 80,
"column": 41
},
"identifierName": "constructor"
},
"name": "constructor"
},
"computed": false
},
"operator": "===",
"right": {
"type": "Identifier",
"start": 2687,
"end": 2689,
"loc": {
"start": {
"line": 80,
"column": 46
},
"end": {
"line": 80,
"column": 48
},
"identifierName": "GC"
},
"name": "GC"
}
}
},
"consequent": {
"type": "BlockStatement",
"start": 2691,
"end": 2716,
"loc": {
"start": {
"line": 80,
"column": 50
},
"end": {
"line": 82,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 2699,
"end": 2710,
"loc": {
"start": {
"line": 81,
"column": 6
},
"end": {
"line": 81,
"column": 17
}
},
"argument": {
"type": "NullLiteral",
"start": 2706,
"end": 2710,
"loc": {
"start": {
"line": 81,
"column": 13
},
"end": {
"line": 81,
"column": 17
}
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ReturnStatement",
"start": 2721,
"end": 2773,
"loc": {
"start": {
"line": 83,
"column": 4
},
"end": {
"line": 86,
"column": 5
}
},
"argument": {
"type": "ObjectExpression",
"start": 2728,
"end": 2773,
"loc": {
"start": {
"line": 83,
"column": 11
},
"end": {
"line": 86,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 2736,
"end": 2740,
"loc": {
"start": {
"line": 84,
"column": 6
},
"end": {
"line": 84,
"column": 10
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 2736,
"end": 2740,
"loc": {
"start": {
"line": 84,
"column": 6
},
"end": {
"line": 84,
"column": 10
},
"identifierName": "type"
},
"name": "type"
},
"value": {
"type": "Identifier",
"start": 2736,
"end": 2740,
"loc": {
"start": {
"line": 84,
"column": 6
},
"end": {
"line": 84,
"column": 10
},
"identifierName": "type"
},
"name": "type"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 2748,
"end": 2767,
"loc": {
"start": {
"line": 85,
"column": 6
},
"end": {
"line": 85,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 2748,
"end": 2754,
"loc": {
"start": {
"line": 85,
"column": 6
},
"end": {
"line": 85,
"column": 12
},
"identifierName": "offset"
},
"name": "offset"
},
"value": {
"type": "MemberExpression",
"start": 2756,
"end": 2767,
"loc": {
"start": {
"line": 85,
"column": 14
},
"end": {
"line": 85,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 2756,
"end": 2760,
"loc": {
"start": {
"line": 85,
"column": 14
},
"end": {
"line": 85,
"column": 18
},
"identifierName": "type"
},
"name": "type"
},
"property": {
"type": "Identifier",
"start": 2761,
"end": 2767,
"loc": {
"start": {
"line": 85,
"column": 19
},
"end": {
"line": 85,
"column": 25
},
"identifierName": "length"
},
"name": "length"
},
"computed": false
}
}
]
}
}
],
"directives": []
},
"alternate": {
"type": "BlockStatement",
"start": 2783,
"end": 3293,
"loc": {
"start": {
"line": 87,
"column": 9
},
"end": {
"line": 108,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 2789,
"end": 2803,
"loc": {
"start": {
"line": 88,
"column": 4
},
"end": {
"line": 88,
"column": 18
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 2793,
"end": 2803,
"loc": {
"start": {
"line": 88,
"column": 8
},
"end": {
"line": 88,
"column": 18
}
},
"id": {
"type": "Identifier",
"start": 2793,
"end": 2799,
"loc": {
"start": {
"line": 88,
"column": 8
},
"end": {
"line": 88,
"column": 14
},
"identifierName": "offset"
},
"name": "offset"
},
"init": {
"type": "NumericLiteral",
"start": 2802,
"end": 2803,
"loc": {
"start": {
"line": 88,
"column": 17
},
"end": {
"line": 88,
"column": 18
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 2808,
"end": 2878,
"loc": {
"start": {
"line": 89,
"column": 4
},
"end": {
"line": 89,
"column": 74
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 2812,
"end": 2878,
"loc": {
"start": {
"line": 89,
"column": 8
},
"end": {
"line": 89,
"column": 74
}
},
"id": {
"type": "Identifier",
"start": 2812,
"end": 2818,
"loc": {
"start": {
"line": 89,
"column": 8
},
"end": {
"line": 89,
"column": 14
},
"identifierName": "struct"
},
"name": "struct"
},
"init": {
"type": "MemberExpression",
"start": 2821,
"end": 2878,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 74
}
},
"object": {
"type": "CallExpression",
"start": 2821,
"end": 2874,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 70
}
},
"callee": {
"type": "MemberExpression",
"start": 2821,
"end": 2848,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 44
}
},
"object": {
"type": "MemberExpression",
"start": 2821,
"end": 2825,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 2821,
"end": 2822,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 18
},
"identifierName": "y"
},
"name": "y"
},
"property": {
"type": "Identifier",
"start": 2823,
"end": 2825,
"loc": {
"start": {
"line": 89,
"column": 19
},
"end": {
"line": 89,
"column": 21
},
"identifierName": "os"
},
"name": "os"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 2826,
"end": 2848,
"loc": {
"start": {
"line": 89,
"column": 22
},
"end": {
"line": 89,
"column": 44
},
"identifierName": "findNodeWithUpperBound"
},
"name": "findNodeWithUpperBound"
},
"computed": false
},
"arguments": [
{
"type": "NewExpression",
"start": 2849,
"end": 2873,
"loc": {
"start": {
"line": 89,
"column": 45
},
"end": {
"line": 89,
"column": 69
}
},
"callee": {
"type": "Identifier",
"start": 2853,
"end": 2855,
"loc": {
"start": {
"line": 89,
"column": 49
},
"end": {
"line": 89,
"column": 51
},
"identifierName": "ID"
},
"name": "ID"
},
"arguments": [
{
"type": "MemberExpression",
"start": 2856,
"end": 2863,
"loc": {
"start": {
"line": 89,
"column": 52
},
"end": {
"line": 89,
"column": 59
}
},
"object": {
"type": "Identifier",
"start": 2856,
"end": 2860,
"loc": {
"start": {
"line": 89,
"column": 52
},
"end": {
"line": 89,
"column": 56
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2861,
"end": 2862,
"loc": {
"start": {
"line": 89,
"column": 57
},
"end": {
"line": 89,
"column": 58
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
"computed": true
},
{
"type": "MemberExpression",
"start": 2865,
"end": 2872,
"loc": {
"start": {
"line": 89,
"column": 61
},
"end": {
"line": 89,
"column": 68
}
},
"object": {
"type": "Identifier",
"start": 2865,
"end": 2869,
"loc": {
"start": {
"line": 89,
"column": 61
},
"end": {
"line": 89,
"column": 65
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 2870,
"end": 2871,
"loc": {
"start": {
"line": 89,
"column": 66
},
"end": {
"line": 89,
"column": 67
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"computed": true
}
]
}
]
},
"property": {
"type": "Identifier",
"start": 2875,
"end": 2878,
"loc": {
"start": {
"line": 89,
"column": 71
},
"end": {
"line": 89,
"column": 74
},
"identifierName": "val"
},
"name": "val"
},
"computed": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 2883,
"end": 2912,
"loc": {
"start": {
"line": 90,
"column": 4
},
"end": {
"line": 90,
"column": 33
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 2889,
"end": 2912,
"loc": {
"start": {
"line": 90,
"column": 10
},
"end": {
"line": 90,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 2889,
"end": 2895,
"loc": {
"start": {
"line": 90,
"column": 10
},
"end": {
"line": 90,
"column": 16
},
"identifierName": "parent"
},
"name": "parent"
},
"init": {
"type": "MemberExpression",
"start": 2898,
"end": 2912,
"loc": {
"start": {
"line": 90,
"column": 19
},
"end": {
"line": 90,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 2898,
"end": 2904,
"loc": {
"start": {
"line": 90,
"column": 19
},
"end": {
"line": 90,
"column": 25
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 2905,
"end": 2912,
"loc": {
"start": {
"line": 90,
"column": 26
},
"end": {
"line": 90,
"column": 33
},
"identifierName": "_parent"
},
"name": "_parent"
},
"computed": false
}
}
],
"kind": "const"
},
{
"type": "IfStatement",
"start": 2917,
"end": 2992,
"loc": {
"start": {
"line": 91,
"column": 4
},
"end": {
"line": 93,
"column": 5
}
},
"test": {
"type": "LogicalExpression",
"start": 2921,
"end": 2965,
"loc": {
"start": {
"line": 91,
"column": 8
},
"end": {
"line": 91,
"column": 52
}
},
"left": {
"type": "BinaryExpression",
"start": 2921,
"end": 2946,
"loc": {
"start": {
"line": 91,
"column": 8
},
"end": {
"line": 91,
"column": 33
}
},
"left": {
"type": "MemberExpression",
"start": 2921,
"end": 2939,
"loc": {
"start": {
"line": 91,
"column": 8
},
"end": {
"line": 91,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 2921,
"end": 2927,
"loc": {
"start": {
"line": 91,
"column": 8
},
"end": {
"line": 91,
"column": 14
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 2928,
"end": 2939,
"loc": {
"start": {
"line": 91,
"column": 15
},
"end": {
"line": 91,
"column": 26
},
"identifierName": "constructor"
},
"name": "constructor"
},
"computed": false
},
"operator": "===",
"right": {
"type": "Identifier",
"start": 2944,
"end": 2946,
"loc": {
"start": {
"line": 91,
"column": 31
},
"end": {
"line": 91,
"column": 33
},
"identifierName": "GC"
},
"name": "GC"
}
},
"operator": "||",
"right": {
"type": "MemberExpression",
"start": 2950,
"end": 2965,
"loc": {
"start": {
"line": 91,
"column": 37
},
"end": {
"line": 91,
"column": 52
}
},
"object": {
"type": "Identifier",
"start": 2950,
"end": 2956,
"loc": {
"start": {
"line": 91,
"column": 37
},
"end": {
"line": 91,
"column": 43
},
"identifierName": "parent"
},
"name": "parent"
},
"property": {
"type": "Identifier",
"start": 2957,
"end": 2965,
"loc": {
"start": {
"line": 91,
"column": 44
},
"end": {
"line": 91,
"column": 52
},
"identifierName": "_deleted"
},
"name": "_deleted"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 2967,
"end": 2992,
"loc": {
"start": {
"line": 91,
"column": 54
},
"end": {
"line": 93,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 2975,
"end": 2986,
"loc": {
"start": {
"line": 92,
"column": 6
},
"end": {
"line": 92,
"column": 17
}
},
"argument": {
"type": "NullLiteral",
"start": 2982,
"end": 2986,
"loc": {
"start": {
"line": 92,
"column": 13
},
"end": {
"line": 92,
"column": 17
}
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "IfStatement",
"start": 2997,
"end": 3068,
"loc": {
"start": {
"line": 94,
"column": 4
},
"end": {
"line": 96,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 3001,
"end": 3017,
"loc": {
"start": {
"line": 94,
"column": 8
},
"end": {
"line": 94,
"column": 24
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 3002,
"end": 3017,
"loc": {
"start": {
"line": 94,
"column": 9
},
"end": {
"line": 94,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 3002,
"end": 3008,
"loc": {
"start": {
"line": 94,
"column": 9
},
"end": {
"line": 94,
"column": 15
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3009,
"end": 3017,
"loc": {
"start": {
"line": 94,
"column": 16
},
"end": {
"line": 94,
"column": 24
},
"identifierName": "_deleted"
},
"name": "_deleted"
},
"computed": false
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 3019,
"end": 3068,
"loc": {
"start": {
"line": 94,
"column": 26
},
"end": {
"line": 96,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 3027,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 6
},
"end": {
"line": 95,
"column": 41
}
},
"expression": {
"type": "AssignmentExpression",
"start": 3027,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 6
},
"end": {
"line": 95,
"column": 41
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 3027,
"end": 3033,
"loc": {
"start": {
"line": 95,
"column": 6
},
"end": {
"line": 95,
"column": 12
},
"identifierName": "offset"
},
"name": "offset"
},
"right": {
"type": "BinaryExpression",
"start": 3036,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 15
},
"end": {
"line": 95,
"column": 41
}
},
"left": {
"type": "MemberExpression",
"start": 3036,
"end": 3043,
"loc": {
"start": {
"line": 95,
"column": 15
},
"end": {
"line": 95,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 3036,
"end": 3040,
"loc": {
"start": {
"line": 95,
"column": 15
},
"end": {
"line": 95,
"column": 19
},
"identifierName": "rpos"
},
"name": "rpos"
},
"property": {
"type": "NumericLiteral",
"start": 3041,
"end": 3042,
"loc": {
"start": {
"line": 95,
"column": 20
},
"end": {
"line": 95,
"column": 21
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"computed": true
},
"operator": "-",
"right": {
"type": "MemberExpression",
"start": 3046,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 25
},
"end": {
"line": 95,
"column": 41
}
},
"object": {
"type": "MemberExpression",
"start": 3046,
"end": 3056,
"loc": {
"start": {
"line": 95,
"column": 25
},
"end": {
"line": 95,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 3046,
"end": 3052,
"loc": {
"start": {
"line": 95,
"column": 25
},
"end": {
"line": 95,
"column": 31
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3053,
"end": 3056,
"loc": {
"start": {
"line": 95,
"column": 32
},
"end": {
"line": 95,
"column": 35
},
"identifierName": "_id"
},
"name": "_id"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 3057,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 36
},
"end": {
"line": 95,
"column": 41
},
"identifierName": "clock"
},
"name": "clock"
},
"computed": false
}
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 3073,
"end": 3094,
"loc": {
"start": {
"line": 97,
"column": 4
},
"end": {
"line": 97,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 3073,
"end": 3094,
"loc": {
"start": {
"line": 97,
"column": 4
},
"end": {
"line": 97,
"column": 25
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 3073,
"end": 3079,
"loc": {
"start": {
"line": 97,
"column": 4
},
"end": {
"line": 97,
"column": 10
},
"identifierName": "struct"
},
"name": "struct"
},
"right": {
"type": "MemberExpression",
"start": 3082,
"end": 3094,
"loc": {
"start": {
"line": 97,
"column": 13
},
"end": {
"line": 97,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 3082,
"end": 3088,
"loc": {
"start": {
"line": 97,
"column": 13
},
"end": {
"line": 97,
"column": 19
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3089,
"end": 3094,
"loc": {
"start": {
"line": 97,
"column": 20
},
"end": {
"line": 97,
"column": 25
},
"identifierName": "_left"
},
"name": "_left"
},
"computed": false
}
}
},
{
"type": "WhileStatement",
"start": 3099,
"end": 3229,
"loc": {
"start": {
"line": 98,
"column": 4
},
"end": {
"line": 103,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 3106,
"end": 3121,
"loc": {
"start": {
"line": 98,
"column": 11
},
"end": {
"line": 98,
"column": 26
}
},
"left": {
"type": "Identifier",
"start": 3106,
"end": 3112,
"loc": {
"start": {
"line": 98,
"column": 11
},
"end": {
"line": 98,
"column": 17
},
"identifierName": "struct"
},
"name": "struct"
},
"operator": "!==",
"right": {
"type": "NullLiteral",
"start": 3117,
"end": 3121,
"loc": {
"start": {
"line": 98,
"column": 22
},
"end": {
"line": 98,
"column": 26
}
}
}
},
"body": {
"type": "BlockStatement",
"start": 3123,
"end": 3229,
"loc": {
"start": {
"line": 98,
"column": 28
},
"end": {
"line": 103,
"column": 5
}
},
"body": [
{
"type": "IfStatement",
"start": 3131,
"end": 3195,
"loc": {
"start": {
"line": 99,
"column": 6
},
"end": {
"line": 101,
"column": 7
}
},
"test": {
"type": "UnaryExpression",
"start": 3135,
"end": 3151,
"loc": {
"start": {
"line": 99,
"column": 10
},
"end": {
"line": 99,
"column": 26
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 3136,
"end": 3151,
"loc": {
"start": {
"line": 99,
"column": 11
},
"end": {
"line": 99,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 3136,
"end": 3142,
"loc": {
"start": {
"line": 99,
"column": 11
},
"end": {
"line": 99,
"column": 17
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3143,
"end": 3151,
"loc": {
"start": {
"line": 99,
"column": 18
},
"end": {
"line": 99,
"column": 26
},
"identifierName": "_deleted"
},
"name": "_deleted"
},
"computed": false
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 3153,
"end": 3195,
"loc": {
"start": {
"line": 99,
"column": 28
},
"end": {
"line": 101,
"column": 7
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 3163,
"end": 3187,
"loc": {
"start": {
"line": 100,
"column": 8
},
"end": {
"line": 100,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 3163,
"end": 3187,
"loc": {
"start": {
"line": 100,
"column": 8
},
"end": {
"line": 100,
"column": 32
}
},
"operator": "+=",
"left": {
"type": "Identifier",
"start": 3163,
"end": 3169,
"loc": {
"start": {
"line": 100,
"column": 8
},
"end": {
"line": 100,
"column": 14
},
"identifierName": "offset"
},
"name": "offset"
},
"right": {
"type": "MemberExpression",
"start": 3173,
"end": 3187,
"loc": {
"start": {
"line": 100,
"column": 18
},
"end": {
"line": 100,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 3173,
"end": 3179,
"loc": {
"start": {
"line": 100,
"column": 18
},
"end": {
"line": 100,
"column": 24
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3180,
"end": 3187,
"loc": {
"start": {
"line": 100,
"column": 25
},
"end": {
"line": 100,
"column": 32
},
"identifierName": "_length"
},
"name": "_length"
},
"computed": false
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 3202,
"end": 3223,
"loc": {
"start": {
"line": 102,
"column": 6
},
"end": {
"line": 102,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 3202,
"end": 3223,
"loc": {
"start": {
"line": 102,
"column": 6
},
"end": {
"line": 102,
"column": 27
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 3202,
"end": 3208,
"loc": {
"start": {
"line": 102,
"column": 6
},
"end": {
"line": 102,
"column": 12
},
"identifierName": "struct"
},
"name": "struct"
},
"right": {
"type": "MemberExpression",
"start": 3211,
"end": 3223,
"loc": {
"start": {
"line": 102,
"column": 15
},
"end": {
"line": 102,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 3211,
"end": 3217,
"loc": {
"start": {
"line": 102,
"column": 15
},
"end": {
"line": 102,
"column": 21
},
"identifierName": "struct"
},
"name": "struct"
},
"property": {
"type": "Identifier",
"start": 3218,
"end": 3223,
"loc": {
"start": {
"line": 102,
"column": 22
},
"end": {
"line": 102,
"column": 27
},
"identifierName": "_left"
},
"name": "_left"
},
"computed": false
}
}
}
],
"directives": []
}
},
{
"type": "ReturnStatement",
"start": 3234,
"end": 3289,
"loc": {
"start": {
"line": 104,
"column": 4
},
"end": {
"line": 107,
"column": 5
}
},
"argument": {
"type": "ObjectExpression",
"start": 3241,
"end": 3289,
"loc": {
"start": {
"line": 104,
"column": 11
},
"end": {
"line": 107,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 3249,
"end": 3261,
"loc": {
"start": {
"line": 105,
"column": 6
},
"end": {
"line": 105,
"column": 18
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 3249,
"end": 3253,
"loc": {
"start": {
"line": 105,
"column": 6
},
"end": {
"line": 105,
"column": 10
},
"identifierName": "type"
},
"name": "type"
},
"value": {
"type": "Identifier",
"start": 3255,
"end": 3261,
"loc": {
"start": {
"line": 105,
"column": 12
},
"end": {
"line": 105,
"column": 18
},
"identifierName": "parent"
},
"name": "parent"
}
},
{
"type": "ObjectProperty",
"start": 3269,
"end": 3283,
"loc": {
"start": {
"line": 106,
"column": 6
},
"end": {
"line": 106,
"column": 20
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 3269,
"end": 3275,
"loc": {
"start": {
"line": 106,
"column": 6
},
"end": {
"line": 106,
"column": 12
},
"identifierName": "offset"
},
"name": "offset"
},
"value": {
"type": "Identifier",
"start": 3277,
"end": 3283,
"loc": {
"start": {
"line": 106,
"column": 14
},
"end": {
"line": 106,
"column": 20
},
"identifierName": "offset"
},
"name": "offset"
}
}
]
}
}
],
"directives": []
}
}
],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentLine",
"value": " TODO: Implement function to describe ranges",
"start": 98,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A relative position that is based on the Yjs model. In contrast to an\n * absolute position (position by index), the relative position can be\n * recomputed when remote changes are received. For example:\n *\n * ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the cursor position.\n *\n * A relative cursor position can be obtained with the function\n * {@link getRelativePosition} and it can be transformed to an absolute position\n * with {@link fromRelativePosition}.\n *\n * Pro tip: Use this to implement shared cursor locations in YText or YXml!\n * The relative position is {@link encodable}, so you can send it to other\n * clients.\n *\n * @example\n * // Current cursor position is at position 10\n * let relativePosition = getRelativePosition(yText, 10)\n * // modify yText\n * yText.insert(0, 'abc')\n * yText.delete(3, 10)\n * // Compute the cursor position\n * let absolutePosition = fromRelativePosition(y, relativePosition)\n * absolutePosition.type // => yText\n * console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3\n *\n * @typedef {encodable} RelativePosition\n ",
"start": 146,
"end": 1249,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 34,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Create a relativePosition based on a absolute position.\n *\n * @param {YType} type The base type (e.g. YText or YArray).\n * @param {Integer} offset The absolute position.\n ",
"start": 1251,
"end": 1431,
"loc": {
"start": {
"line": 36,
"column": 0
},
"end": {
"line": 41,
"column": 3
}
}
},
{
"type": "CommentLine",
"value": " TODO: rename to createRelativePosition",
"start": 1487,
"end": 1528,
"loc": {
"start": {
"line": 43,
"column": 2
},
"end": {
"line": 43,
"column": 43
}
}
},
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
}
],
"tokens": [
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "ID",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./ID/ID.js",
"start": 15,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 27
}
}
},
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 28,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 6
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "RootID",
"start": 35,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 42,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 18
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./ID/RootID.js",
"start": 47,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
}
},
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 64,
"end": 70,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 6
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "GC",
"start": 71,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 74,
"end": 78,
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 14
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "../Struct/GC.js",
"start": 79,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 32
}
}
},
{
"type": "CommentLine",
"value": " TODO: Implement function to describe ranges",
"start": 98,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A relative position that is based on the Yjs model. In contrast to an\n * absolute position (position by index), the relative position can be\n * recomputed when remote changes are received. For example:\n *\n * ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the cursor position.\n *\n * A relative cursor position can be obtained with the function\n * {@link getRelativePosition} and it can be transformed to an absolute position\n * with {@link fromRelativePosition}.\n *\n * Pro tip: Use this to implement shared cursor locations in YText or YXml!\n * The relative position is {@link encodable}, so you can send it to other\n * clients.\n *\n * @example\n * // Current cursor position is at position 10\n * let relativePosition = getRelativePosition(yText, 10)\n * // modify yText\n * yText.insert(0, 'abc')\n * yText.delete(3, 10)\n * // Compute the cursor position\n * let absolutePosition = fromRelativePosition(y, relativePosition)\n * absolutePosition.type // => yText\n * console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3\n *\n * @typedef {encodable} RelativePosition\n ",
"start": 146,
"end": 1249,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 34,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Create a relativePosition based on a absolute position.\n *\n * @param {YType} type The base type (e.g. YText or YArray).\n * @param {Integer} offset The absolute position.\n ",
"start": 1251,
"end": 1431,
"loc": {
"start": {
"line": 36,
"column": 0
},
"end": {
"line": 41,
"column": 3
}
}
},
{
"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": 1432,
"end": 1438,
"loc": {
"start": {
"line": 42,
"column": 0
},
"end": {
"line": 42,
"column": 6
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 1439,
"end": 1447,
"loc": {
"start": {
"line": 42,
"column": 7
},
"end": {
"line": 42,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getRelativePosition",
"start": 1448,
"end": 1467,
"loc": {
"start": {
"line": 42,
"column": 16
},
"end": {
"line": 42,
"column": 35
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1468,
"end": 1469,
"loc": {
"start": {
"line": 42,
"column": 36
},
"end": {
"line": 42,
"column": 37
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1469,
"end": 1473,
"loc": {
"start": {
"line": 42,
"column": 37
},
"end": {
"line": 42,
"column": 41
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1473,
"end": 1474,
"loc": {
"start": {
"line": 42,
"column": 41
},
"end": {
"line": 42,
"column": 42
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 1475,
"end": 1481,
"loc": {
"start": {
"line": 42,
"column": 43
},
"end": {
"line": 42,
"column": 49
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1481,
"end": 1482,
"loc": {
"start": {
"line": 42,
"column": 49
},
"end": {
"line": 42,
"column": 50
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1483,
"end": 1484,
"loc": {
"start": {
"line": 42,
"column": 51
},
"end": {
"line": 42,
"column": 52
}
}
},
{
"type": "CommentLine",
"value": " TODO: rename to createRelativePosition",
"start": 1487,
"end": 1528,
"loc": {
"start": {
"line": 43,
"column": 2
},
"end": {
"line": 43,
"column": 43
}
}
},
{
"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": 1531,
"end": 1534,
"loc": {
"start": {
"line": 44,
"column": 2
},
"end": {
"line": 44,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1535,
"end": 1536,
"loc": {
"start": {
"line": 44,
"column": 6
},
"end": {
"line": 44,
"column": 7
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1537,
"end": 1538,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1539,
"end": 1543,
"loc": {
"start": {
"line": 44,
"column": 10
},
"end": {
"line": 44,
"column": 14
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1543,
"end": 1544,
"loc": {
"start": {
"line": 44,
"column": 14
},
"end": {
"line": 44,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_start",
"start": 1544,
"end": 1550,
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 21
}
}
},
{
"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": 1553,
"end": 1558,
"loc": {
"start": {
"line": 45,
"column": 2
},
"end": {
"line": 45,
"column": 7
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1559,
"end": 1560,
"loc": {
"start": {
"line": 45,
"column": 8
},
"end": {
"line": 45,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1560,
"end": 1561,
"loc": {
"start": {
"line": 45,
"column": 9
},
"end": {
"line": 45,
"column": 10
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "!==",
"start": 1562,
"end": 1565,
"loc": {
"start": {
"line": 45,
"column": 11
},
"end": {
"line": 45,
"column": 14
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 1566,
"end": 1570,
"loc": {
"start": {
"line": 45,
"column": 15
},
"end": {
"line": 45,
"column": 19
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1570,
"end": 1571,
"loc": {
"start": {
"line": 45,
"column": 19
},
"end": {
"line": 45,
"column": 20
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1572,
"end": 1573,
"loc": {
"start": {
"line": 45,
"column": 21
},
"end": {
"line": 45,
"column": 22
}
}
},
{
"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": 1578,
"end": 1580,
"loc": {
"start": {
"line": 46,
"column": 4
},
"end": {
"line": 46,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1581,
"end": 1582,
"loc": {
"start": {
"line": 46,
"column": 7
},
"end": {
"line": 46,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1582,
"end": 1583,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 9
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1583,
"end": 1584,
"loc": {
"start": {
"line": 46,
"column": 9
},
"end": {
"line": 46,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_deleted",
"start": 1584,
"end": 1592,
"loc": {
"start": {
"line": 46,
"column": 10
},
"end": {
"line": 46,
"column": 18
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 1593,
"end": 1596,
"loc": {
"start": {
"line": 46,
"column": 19
},
"end": {
"line": 46,
"column": 22
}
}
},
{
"type": {
"label": "false",
"keyword": "false",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "false",
"start": 1597,
"end": 1602,
"loc": {
"start": {
"line": 46,
"column": 23
},
"end": {
"line": 46,
"column": 28
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1602,
"end": 1603,
"loc": {
"start": {
"line": 46,
"column": 28
},
"end": {
"line": 46,
"column": 29
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1604,
"end": 1605,
"loc": {
"start": {
"line": 46,
"column": 30
},
"end": {
"line": 46,
"column": 31
}
}
},
{
"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": 1612,
"end": 1614,
"loc": {
"start": {
"line": 47,
"column": 6
},
"end": {
"line": 47,
"column": 8
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1615,
"end": 1616,
"loc": {
"start": {
"line": 47,
"column": 9
},
"end": {
"line": 47,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1616,
"end": 1617,
"loc": {
"start": {
"line": 47,
"column": 10
},
"end": {
"line": 47,
"column": 11
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1617,
"end": 1618,
"loc": {
"start": {
"line": 47,
"column": 11
},
"end": {
"line": 47,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_length",
"start": 1618,
"end": 1625,
"loc": {
"start": {
"line": 47,
"column": 12
},
"end": {
"line": 47,
"column": 19
}
}
},
{
"type": {
"label": "</>",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 7,
"updateContext": null
},
"value": ">",
"start": 1626,
"end": 1627,
"loc": {
"start": {
"line": 47,
"column": 20
},
"end": {
"line": 47,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 1628,
"end": 1634,
"loc": {
"start": {
"line": 47,
"column": 22
},
"end": {
"line": 47,
"column": 28
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1634,
"end": 1635,
"loc": {
"start": {
"line": 47,
"column": 28
},
"end": {
"line": 47,
"column": 29
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1636,
"end": 1637,
"loc": {
"start": {
"line": 47,
"column": 30
},
"end": {
"line": 47,
"column": 31
}
}
},
{
"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": 1646,
"end": 1652,
"loc": {
"start": {
"line": 48,
"column": 8
},
"end": {
"line": 48,
"column": 14
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1653,
"end": 1654,
"loc": {
"start": {
"line": 48,
"column": 15
},
"end": {
"line": 48,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1654,
"end": 1655,
"loc": {
"start": {
"line": 48,
"column": 16
},
"end": {
"line": 48,
"column": 17
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1655,
"end": 1656,
"loc": {
"start": {
"line": 48,
"column": 17
},
"end": {
"line": 48,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1656,
"end": 1659,
"loc": {
"start": {
"line": 48,
"column": 18
},
"end": {
"line": 48,
"column": 21
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1659,
"end": 1660,
"loc": {
"start": {
"line": 48,
"column": 21
},
"end": {
"line": 48,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "user",
"start": 1660,
"end": 1664,
"loc": {
"start": {
"line": 48,
"column": 22
},
"end": {
"line": 48,
"column": 26
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1664,
"end": 1665,
"loc": {
"start": {
"line": 48,
"column": 26
},
"end": {
"line": 48,
"column": 27
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1666,
"end": 1667,
"loc": {
"start": {
"line": 48,
"column": 28
},
"end": {
"line": 48,
"column": 29
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1667,
"end": 1668,
"loc": {
"start": {
"line": 48,
"column": 29
},
"end": {
"line": 48,
"column": 30
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1668,
"end": 1671,
"loc": {
"start": {
"line": 48,
"column": 30
},
"end": {
"line": 48,
"column": 33
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1671,
"end": 1672,
"loc": {
"start": {
"line": 48,
"column": 33
},
"end": {
"line": 48,
"column": 34
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "clock",
"start": 1672,
"end": 1677,
"loc": {
"start": {
"line": 48,
"column": 34
},
"end": {
"line": 48,
"column": 39
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1678,
"end": 1679,
"loc": {
"start": {
"line": 48,
"column": 40
},
"end": {
"line": 48,
"column": 41
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 1680,
"end": 1686,
"loc": {
"start": {
"line": 48,
"column": 42
},
"end": {
"line": 48,
"column": 48
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1686,
"end": 1687,
"loc": {
"start": {
"line": 48,
"column": 48
},
"end": {
"line": 48,
"column": 49
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1694,
"end": 1695,
"loc": {
"start": {
"line": 49,
"column": 6
},
"end": {
"line": 49,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 1702,
"end": 1708,
"loc": {
"start": {
"line": 50,
"column": 6
},
"end": {
"line": 50,
"column": 12
}
}
},
{
"type": {
"label": "_=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "-=",
"start": 1709,
"end": 1711,
"loc": {
"start": {
"line": 50,
"column": 13
},
"end": {
"line": 50,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1712,
"end": 1713,
"loc": {
"start": {
"line": 50,
"column": 16
},
"end": {
"line": 50,
"column": 17
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1713,
"end": 1714,
"loc": {
"start": {
"line": 50,
"column": 17
},
"end": {
"line": 50,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_length",
"start": 1714,
"end": 1721,
"loc": {
"start": {
"line": 50,
"column": 18
},
"end": {
"line": 50,
"column": 25
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1726,
"end": 1727,
"loc": {
"start": {
"line": 51,
"column": 4
},
"end": {
"line": 51,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1732,
"end": 1733,
"loc": {
"start": {
"line": 52,
"column": 4
},
"end": {
"line": 52,
"column": 5
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1734,
"end": 1735,
"loc": {
"start": {
"line": 52,
"column": 6
},
"end": {
"line": 52,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "t",
"start": 1736,
"end": 1737,
"loc": {
"start": {
"line": 52,
"column": 8
},
"end": {
"line": 52,
"column": 9
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1737,
"end": 1738,
"loc": {
"start": {
"line": 52,
"column": 9
},
"end": {
"line": 52,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_right",
"start": 1738,
"end": 1744,
"loc": {
"start": {
"line": 52,
"column": 10
},
"end": {
"line": 52,
"column": 16
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1747,
"end": 1748,
"loc": {
"start": {
"line": 53,
"column": 2
},
"end": {
"line": 53,
"column": 3
}
}
},
{
"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": 1751,
"end": 1757,
"loc": {
"start": {
"line": 54,
"column": 2
},
"end": {
"line": 54,
"column": 8
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1758,
"end": 1759,
"loc": {
"start": {
"line": 54,
"column": 9
},
"end": {
"line": 54,
"column": 10
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "endof",
"start": 1759,
"end": 1766,
"loc": {
"start": {
"line": 54,
"column": 10
},
"end": {
"line": 54,
"column": 17
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1766,
"end": 1767,
"loc": {
"start": {
"line": 54,
"column": 17
},
"end": {
"line": 54,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1768,
"end": 1772,
"loc": {
"start": {
"line": 54,
"column": 19
},
"end": {
"line": 54,
"column": 23
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1772,
"end": 1773,
"loc": {
"start": {
"line": 54,
"column": 23
},
"end": {
"line": 54,
"column": 24
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1773,
"end": 1776,
"loc": {
"start": {
"line": 54,
"column": 24
},
"end": {
"line": 54,
"column": 27
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1776,
"end": 1777,
"loc": {
"start": {
"line": 54,
"column": 27
},
"end": {
"line": 54,
"column": 28
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "user",
"start": 1777,
"end": 1781,
"loc": {
"start": {
"line": 54,
"column": 28
},
"end": {
"line": 54,
"column": 32
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1781,
"end": 1782,
"loc": {
"start": {
"line": 54,
"column": 32
},
"end": {
"line": 54,
"column": 33
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1783,
"end": 1787,
"loc": {
"start": {
"line": 54,
"column": 34
},
"end": {
"line": 54,
"column": 38
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1787,
"end": 1788,
"loc": {
"start": {
"line": 54,
"column": 38
},
"end": {
"line": 54,
"column": 39
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1788,
"end": 1791,
"loc": {
"start": {
"line": 54,
"column": 39
},
"end": {
"line": 54,
"column": 42
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1791,
"end": 1792,
"loc": {
"start": {
"line": 54,
"column": 42
},
"end": {
"line": 54,
"column": 43
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "clock",
"start": 1792,
"end": 1797,
"loc": {
"start": {
"line": 54,
"column": 43
},
"end": {
"line": 54,
"column": 48
}
}
},
{
"type": {
"label": "||",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 1,
"updateContext": null
},
"value": "||",
"start": 1798,
"end": 1800,
"loc": {
"start": {
"line": 54,
"column": 49
},
"end": {
"line": 54,
"column": 51
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 1801,
"end": 1805,
"loc": {
"start": {
"line": 54,
"column": 52
},
"end": {
"line": 54,
"column": 56
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1805,
"end": 1806,
"loc": {
"start": {
"line": 54,
"column": 56
},
"end": {
"line": 54,
"column": 57
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1807,
"end": 1811,
"loc": {
"start": {
"line": 54,
"column": 58
},
"end": {
"line": 54,
"column": 62
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1811,
"end": 1812,
"loc": {
"start": {
"line": 54,
"column": 62
},
"end": {
"line": 54,
"column": 63
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1812,
"end": 1815,
"loc": {
"start": {
"line": 54,
"column": 63
},
"end": {
"line": 54,
"column": 66
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1815,
"end": 1816,
"loc": {
"start": {
"line": 54,
"column": 66
},
"end": {
"line": 54,
"column": 67
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "name",
"start": 1816,
"end": 1820,
"loc": {
"start": {
"line": 54,
"column": 67
},
"end": {
"line": 54,
"column": 71
}
}
},
{
"type": {
"label": "||",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 1,
"updateContext": null
},
"value": "||",
"start": 1821,
"end": 1823,
"loc": {
"start": {
"line": 54,
"column": 72
},
"end": {
"line": 54,
"column": 74
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 1824,
"end": 1828,
"loc": {
"start": {
"line": 54,
"column": 75
},
"end": {
"line": 54,
"column": 79
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1828,
"end": 1829,
"loc": {
"start": {
"line": 54,
"column": 79
},
"end": {
"line": 54,
"column": 80
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1830,
"end": 1834,
"loc": {
"start": {
"line": 54,
"column": 81
},
"end": {
"line": 54,
"column": 85
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1834,
"end": 1835,
"loc": {
"start": {
"line": 54,
"column": 85
},
"end": {
"line": 54,
"column": 86
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 1835,
"end": 1838,
"loc": {
"start": {
"line": 54,
"column": 86
},
"end": {
"line": 54,
"column": 89
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1838,
"end": 1839,
"loc": {
"start": {
"line": 54,
"column": 89
},
"end": {
"line": 54,
"column": 90
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 1839,
"end": 1843,
"loc": {
"start": {
"line": 54,
"column": 90
},
"end": {
"line": 54,
"column": 94
}
}
},
{
"type": {
"label": "||",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 1,
"updateContext": null
},
"value": "||",
"start": 1844,
"end": 1846,
"loc": {
"start": {
"line": 54,
"column": 95
},
"end": {
"line": 54,
"column": 97
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 1847,
"end": 1851,
"loc": {
"start": {
"line": 54,
"column": 98
},
"end": {
"line": 54,
"column": 102
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1851,
"end": 1852,
"loc": {
"start": {
"line": 54,
"column": 102
},
"end": {
"line": 54,
"column": 103
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1853,
"end": 1854,
"loc": {
"start": {
"line": 55,
"column": 0
},
"end": {
"line": 55,
"column": 1
}
}
},
{
"type": "CommentBlock",
"value": "*\n * @typedef {Object} AbsolutePosition The result of {@link fromRelativePosition}\n * @property {YType} type The type on which to apply the absolute position.\n * @property {Integer} offset The absolute offset.r\n ",
"start": 1856,
"end": 2072,
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 61,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Transforms a relative position back to a relative position.\n *\n * @param {Y} y The Yjs instance in which to query for the absolute position.\n * @param {RelativePosition} rpos The relative position.\n * @return {AbsolutePosition} The absolute position in the Yjs model\n * (type + offset).\n ",
"start": 2074,
"end": 2398,
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 70,
"column": 3
}
}
},
{
"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": 2399,
"end": 2405,
"loc": {
"start": {
"line": 71,
"column": 0
},
"end": {
"line": 71,
"column": 6
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 2406,
"end": 2414,
"loc": {
"start": {
"line": 71,
"column": 7
},
"end": {
"line": 71,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "fromRelativePosition",
"start": 2415,
"end": 2435,
"loc": {
"start": {
"line": 71,
"column": 16
},
"end": {
"line": 71,
"column": 36
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2436,
"end": 2437,
"loc": {
"start": {
"line": 71,
"column": 37
},
"end": {
"line": 71,
"column": 38
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "y",
"start": 2437,
"end": 2438,
"loc": {
"start": {
"line": 71,
"column": 38
},
"end": {
"line": 71,
"column": 39
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2438,
"end": 2439,
"loc": {
"start": {
"line": 71,
"column": 39
},
"end": {
"line": 71,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2440,
"end": 2444,
"loc": {
"start": {
"line": 71,
"column": 41
},
"end": {
"line": 71,
"column": 45
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2444,
"end": 2445,
"loc": {
"start": {
"line": 71,
"column": 45
},
"end": {
"line": 71,
"column": 46
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2446,
"end": 2447,
"loc": {
"start": {
"line": 71,
"column": 47
},
"end": {
"line": 71,
"column": 48
}
}
},
{
"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": 2450,
"end": 2452,
"loc": {
"start": {
"line": 72,
"column": 2
},
"end": {
"line": 72,
"column": 4
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2453,
"end": 2454,
"loc": {
"start": {
"line": 72,
"column": 5
},
"end": {
"line": 72,
"column": 6
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2454,
"end": 2458,
"loc": {
"start": {
"line": 72,
"column": 6
},
"end": {
"line": 72,
"column": 10
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2458,
"end": 2459,
"loc": {
"start": {
"line": 72,
"column": 10
},
"end": {
"line": 72,
"column": 11
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 2459,
"end": 2460,
"loc": {
"start": {
"line": 72,
"column": 11
},
"end": {
"line": 72,
"column": 12
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2460,
"end": 2461,
"loc": {
"start": {
"line": 72,
"column": 12
},
"end": {
"line": 72,
"column": 13
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 2462,
"end": 2465,
"loc": {
"start": {
"line": 72,
"column": 14
},
"end": {
"line": 72,
"column": 17
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "endof",
"start": 2466,
"end": 2473,
"loc": {
"start": {
"line": 72,
"column": 18
},
"end": {
"line": 72,
"column": 25
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2473,
"end": 2474,
"loc": {
"start": {
"line": 72,
"column": 25
},
"end": {
"line": 72,
"column": 26
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2475,
"end": 2476,
"loc": {
"start": {
"line": 72,
"column": 27
},
"end": {
"line": 72,
"column": 28
}
}
},
{
"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": 2481,
"end": 2484,
"loc": {
"start": {
"line": 73,
"column": 4
},
"end": {
"line": 73,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "id",
"start": 2485,
"end": 2487,
"loc": {
"start": {
"line": 73,
"column": 8
},
"end": {
"line": 73,
"column": 10
}
}
},
{
"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": 2492,
"end": 2494,
"loc": {
"start": {
"line": 74,
"column": 4
},
"end": {
"line": 74,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2495,
"end": 2496,
"loc": {
"start": {
"line": 74,
"column": 7
},
"end": {
"line": 74,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2496,
"end": 2500,
"loc": {
"start": {
"line": 74,
"column": 8
},
"end": {
"line": 74,
"column": 12
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2500,
"end": 2501,
"loc": {
"start": {
"line": 74,
"column": 12
},
"end": {
"line": 74,
"column": 13
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 3,
"start": 2501,
"end": 2502,
"loc": {
"start": {
"line": 74,
"column": 13
},
"end": {
"line": 74,
"column": 14
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2502,
"end": 2503,
"loc": {
"start": {
"line": 74,
"column": 14
},
"end": {
"line": 74,
"column": 15
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 2504,
"end": 2507,
"loc": {
"start": {
"line": 74,
"column": 16
},
"end": {
"line": 74,
"column": 19
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 2508,
"end": 2512,
"loc": {
"start": {
"line": 74,
"column": 20
},
"end": {
"line": 74,
"column": 24
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2512,
"end": 2513,
"loc": {
"start": {
"line": 74,
"column": 24
},
"end": {
"line": 74,
"column": 25
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2514,
"end": 2515,
"loc": {
"start": {
"line": 74,
"column": 26
},
"end": {
"line": 74,
"column": 27
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "id",
"start": 2522,
"end": 2524,
"loc": {
"start": {
"line": 75,
"column": 6
},
"end": {
"line": 75,
"column": 8
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2525,
"end": 2526,
"loc": {
"start": {
"line": 75,
"column": 9
},
"end": {
"line": 75,
"column": 10
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 2527,
"end": 2530,
"loc": {
"start": {
"line": 75,
"column": 11
},
"end": {
"line": 75,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "ID",
"start": 2531,
"end": 2533,
"loc": {
"start": {
"line": 75,
"column": 15
},
"end": {
"line": 75,
"column": 17
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2533,
"end": 2534,
"loc": {
"start": {
"line": 75,
"column": 17
},
"end": {
"line": 75,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2534,
"end": 2538,
"loc": {
"start": {
"line": 75,
"column": 18
},
"end": {
"line": 75,
"column": 22
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2538,
"end": 2539,
"loc": {
"start": {
"line": 75,
"column": 22
},
"end": {
"line": 75,
"column": 23
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 1,
"start": 2539,
"end": 2540,
"loc": {
"start": {
"line": 75,
"column": 23
},
"end": {
"line": 75,
"column": 24
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2540,
"end": 2541,
"loc": {
"start": {
"line": 75,
"column": 24
},
"end": {
"line": 75,
"column": 25
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2541,
"end": 2542,
"loc": {
"start": {
"line": 75,
"column": 25
},
"end": {
"line": 75,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2543,
"end": 2547,
"loc": {
"start": {
"line": 75,
"column": 27
},
"end": {
"line": 75,
"column": 31
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2547,
"end": 2548,
"loc": {
"start": {
"line": 75,
"column": 31
},
"end": {
"line": 75,
"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": 2548,
"end": 2549,
"loc": {
"start": {
"line": 75,
"column": 32
},
"end": {
"line": 75,
"column": 33
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2549,
"end": 2550,
"loc": {
"start": {
"line": 75,
"column": 33
},
"end": {
"line": 75,
"column": 34
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2550,
"end": 2551,
"loc": {
"start": {
"line": 75,
"column": 34
},
"end": {
"line": 75,
"column": 35
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2556,
"end": 2557,
"loc": {
"start": {
"line": 76,
"column": 4
},
"end": {
"line": 76,
"column": 5
}
}
},
{
"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": 2558,
"end": 2562,
"loc": {
"start": {
"line": 76,
"column": 6
},
"end": {
"line": 76,
"column": 10
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2563,
"end": 2564,
"loc": {
"start": {
"line": 76,
"column": 11
},
"end": {
"line": 76,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "id",
"start": 2571,
"end": 2573,
"loc": {
"start": {
"line": 77,
"column": 6
},
"end": {
"line": 77,
"column": 8
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2574,
"end": 2575,
"loc": {
"start": {
"line": 77,
"column": 9
},
"end": {
"line": 77,
"column": 10
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 2576,
"end": 2579,
"loc": {
"start": {
"line": 77,
"column": 11
},
"end": {
"line": 77,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "RootID",
"start": 2580,
"end": 2586,
"loc": {
"start": {
"line": 77,
"column": 15
},
"end": {
"line": 77,
"column": 21
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2586,
"end": 2587,
"loc": {
"start": {
"line": 77,
"column": 21
},
"end": {
"line": 77,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2587,
"end": 2591,
"loc": {
"start": {
"line": 77,
"column": 22
},
"end": {
"line": 77,
"column": 26
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2591,
"end": 2592,
"loc": {
"start": {
"line": 77,
"column": 26
},
"end": {
"line": 77,
"column": 27
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 3,
"start": 2592,
"end": 2593,
"loc": {
"start": {
"line": 77,
"column": 27
},
"end": {
"line": 77,
"column": 28
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2593,
"end": 2594,
"loc": {
"start": {
"line": 77,
"column": 28
},
"end": {
"line": 77,
"column": 29
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2594,
"end": 2595,
"loc": {
"start": {
"line": 77,
"column": 29
},
"end": {
"line": 77,
"column": 30
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2596,
"end": 2600,
"loc": {
"start": {
"line": 77,
"column": 31
},
"end": {
"line": 77,
"column": 35
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2600,
"end": 2601,
"loc": {
"start": {
"line": 77,
"column": 35
},
"end": {
"line": 77,
"column": 36
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 4,
"start": 2601,
"end": 2602,
"loc": {
"start": {
"line": 77,
"column": 36
},
"end": {
"line": 77,
"column": 37
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2602,
"end": 2603,
"loc": {
"start": {
"line": 77,
"column": 37
},
"end": {
"line": 77,
"column": 38
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2603,
"end": 2604,
"loc": {
"start": {
"line": 77,
"column": 38
},
"end": {
"line": 77,
"column": 39
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2609,
"end": 2610,
"loc": {
"start": {
"line": 78,
"column": 4
},
"end": {
"line": 78,
"column": 5
}
}
},
{
"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": 2615,
"end": 2620,
"loc": {
"start": {
"line": 79,
"column": 4
},
"end": {
"line": 79,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 2621,
"end": 2625,
"loc": {
"start": {
"line": 79,
"column": 10
},
"end": {
"line": 79,
"column": 14
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2626,
"end": 2627,
"loc": {
"start": {
"line": 79,
"column": 15
},
"end": {
"line": 79,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "y",
"start": 2628,
"end": 2629,
"loc": {
"start": {
"line": 79,
"column": 17
},
"end": {
"line": 79,
"column": 18
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2629,
"end": 2630,
"loc": {
"start": {
"line": 79,
"column": 18
},
"end": {
"line": 79,
"column": 19
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "os",
"start": 2630,
"end": 2632,
"loc": {
"start": {
"line": 79,
"column": 19
},
"end": {
"line": 79,
"column": 21
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2632,
"end": 2633,
"loc": {
"start": {
"line": 79,
"column": 21
},
"end": {
"line": 79,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "get",
"start": 2633,
"end": 2636,
"loc": {
"start": {
"line": 79,
"column": 22
},
"end": {
"line": 79,
"column": 25
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2636,
"end": 2637,
"loc": {
"start": {
"line": 79,
"column": 25
},
"end": {
"line": 79,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "id",
"start": 2637,
"end": 2639,
"loc": {
"start": {
"line": 79,
"column": 26
},
"end": {
"line": 79,
"column": 28
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2639,
"end": 2640,
"loc": {
"start": {
"line": 79,
"column": 28
},
"end": {
"line": 79,
"column": 29
}
}
},
{
"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": 2645,
"end": 2647,
"loc": {
"start": {
"line": 80,
"column": 4
},
"end": {
"line": 80,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2648,
"end": 2649,
"loc": {
"start": {
"line": 80,
"column": 7
},
"end": {
"line": 80,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 2649,
"end": 2653,
"loc": {
"start": {
"line": 80,
"column": 8
},
"end": {
"line": 80,
"column": 12
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 2654,
"end": 2657,
"loc": {
"start": {
"line": 80,
"column": 13
},
"end": {
"line": 80,
"column": 16
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 2658,
"end": 2662,
"loc": {
"start": {
"line": 80,
"column": 17
},
"end": {
"line": 80,
"column": 21
}
}
},
{
"type": {
"label": "||",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 1,
"updateContext": null
},
"value": "||",
"start": 2663,
"end": 2665,
"loc": {
"start": {
"line": 80,
"column": 22
},
"end": {
"line": 80,
"column": 24
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 2666,
"end": 2670,
"loc": {
"start": {
"line": 80,
"column": 25
},
"end": {
"line": 80,
"column": 29
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2670,
"end": 2671,
"loc": {
"start": {
"line": 80,
"column": 29
},
"end": {
"line": 80,
"column": 30
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 2671,
"end": 2682,
"loc": {
"start": {
"line": 80,
"column": 30
},
"end": {
"line": 80,
"column": 41
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 2683,
"end": 2686,
"loc": {
"start": {
"line": 80,
"column": 42
},
"end": {
"line": 80,
"column": 45
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "GC",
"start": 2687,
"end": 2689,
"loc": {
"start": {
"line": 80,
"column": 46
},
"end": {
"line": 80,
"column": 48
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2689,
"end": 2690,
"loc": {
"start": {
"line": 80,
"column": 48
},
"end": {
"line": 80,
"column": 49
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2691,
"end": 2692,
"loc": {
"start": {
"line": 80,
"column": 50
},
"end": {
"line": 80,
"column": 51
}
}
},
{
"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": 2699,
"end": 2705,
"loc": {
"start": {
"line": 81,
"column": 6
},
"end": {
"line": 81,
"column": 12
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 2706,
"end": 2710,
"loc": {
"start": {
"line": 81,
"column": 13
},
"end": {
"line": 81,
"column": 17
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2715,
"end": 2716,
"loc": {
"start": {
"line": 82,
"column": 4
},
"end": {
"line": 82,
"column": 5
}
}
},
{
"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": 2721,
"end": 2727,
"loc": {
"start": {
"line": 83,
"column": 4
},
"end": {
"line": 83,
"column": 10
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2728,
"end": 2729,
"loc": {
"start": {
"line": 83,
"column": 11
},
"end": {
"line": 83,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 2736,
"end": 2740,
"loc": {
"start": {
"line": 84,
"column": 6
},
"end": {
"line": 84,
"column": 10
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2740,
"end": 2741,
"loc": {
"start": {
"line": 84,
"column": 10
},
"end": {
"line": 84,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 2748,
"end": 2754,
"loc": {
"start": {
"line": 85,
"column": 6
},
"end": {
"line": 85,
"column": 12
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2754,
"end": 2755,
"loc": {
"start": {
"line": 85,
"column": 12
},
"end": {
"line": 85,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 2756,
"end": 2760,
"loc": {
"start": {
"line": 85,
"column": 14
},
"end": {
"line": 85,
"column": 18
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2760,
"end": 2761,
"loc": {
"start": {
"line": 85,
"column": 18
},
"end": {
"line": 85,
"column": 19
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "length",
"start": 2761,
"end": 2767,
"loc": {
"start": {
"line": 85,
"column": 19
},
"end": {
"line": 85,
"column": 25
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2772,
"end": 2773,
"loc": {
"start": {
"line": 86,
"column": 4
},
"end": {
"line": 86,
"column": 5
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2776,
"end": 2777,
"loc": {
"start": {
"line": 87,
"column": 2
},
"end": {
"line": 87,
"column": 3
}
}
},
{
"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": 2778,
"end": 2782,
"loc": {
"start": {
"line": 87,
"column": 4
},
"end": {
"line": 87,
"column": 8
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2783,
"end": 2784,
"loc": {
"start": {
"line": 87,
"column": 9
},
"end": {
"line": 87,
"column": 10
}
}
},
{
"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": 2789,
"end": 2792,
"loc": {
"start": {
"line": 88,
"column": 4
},
"end": {
"line": 88,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 2793,
"end": 2799,
"loc": {
"start": {
"line": 88,
"column": 8
},
"end": {
"line": 88,
"column": 14
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2800,
"end": 2801,
"loc": {
"start": {
"line": 88,
"column": 15
},
"end": {
"line": 88,
"column": 16
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 2802,
"end": 2803,
"loc": {
"start": {
"line": 88,
"column": 17
},
"end": {
"line": 88,
"column": 18
}
}
},
{
"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": 2808,
"end": 2811,
"loc": {
"start": {
"line": 89,
"column": 4
},
"end": {
"line": 89,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 2812,
"end": 2818,
"loc": {
"start": {
"line": 89,
"column": 8
},
"end": {
"line": 89,
"column": 14
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2819,
"end": 2820,
"loc": {
"start": {
"line": 89,
"column": 15
},
"end": {
"line": 89,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "y",
"start": 2821,
"end": 2822,
"loc": {
"start": {
"line": 89,
"column": 17
},
"end": {
"line": 89,
"column": 18
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2822,
"end": 2823,
"loc": {
"start": {
"line": 89,
"column": 18
},
"end": {
"line": 89,
"column": 19
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "os",
"start": 2823,
"end": 2825,
"loc": {
"start": {
"line": 89,
"column": 19
},
"end": {
"line": 89,
"column": 21
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2825,
"end": 2826,
"loc": {
"start": {
"line": 89,
"column": 21
},
"end": {
"line": 89,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "findNodeWithUpperBound",
"start": 2826,
"end": 2848,
"loc": {
"start": {
"line": 89,
"column": 22
},
"end": {
"line": 89,
"column": 44
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2848,
"end": 2849,
"loc": {
"start": {
"line": 89,
"column": 44
},
"end": {
"line": 89,
"column": 45
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 2849,
"end": 2852,
"loc": {
"start": {
"line": 89,
"column": 45
},
"end": {
"line": 89,
"column": 48
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "ID",
"start": 2853,
"end": 2855,
"loc": {
"start": {
"line": 89,
"column": 49
},
"end": {
"line": 89,
"column": 51
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2855,
"end": 2856,
"loc": {
"start": {
"line": 89,
"column": 51
},
"end": {
"line": 89,
"column": 52
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2856,
"end": 2860,
"loc": {
"start": {
"line": 89,
"column": 52
},
"end": {
"line": 89,
"column": 56
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2860,
"end": 2861,
"loc": {
"start": {
"line": 89,
"column": 56
},
"end": {
"line": 89,
"column": 57
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 2861,
"end": 2862,
"loc": {
"start": {
"line": 89,
"column": 57
},
"end": {
"line": 89,
"column": 58
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2862,
"end": 2863,
"loc": {
"start": {
"line": 89,
"column": 58
},
"end": {
"line": 89,
"column": 59
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2863,
"end": 2864,
"loc": {
"start": {
"line": 89,
"column": 59
},
"end": {
"line": 89,
"column": 60
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 2865,
"end": 2869,
"loc": {
"start": {
"line": 89,
"column": 61
},
"end": {
"line": 89,
"column": 65
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2869,
"end": 2870,
"loc": {
"start": {
"line": 89,
"column": 65
},
"end": {
"line": 89,
"column": 66
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 1,
"start": 2870,
"end": 2871,
"loc": {
"start": {
"line": 89,
"column": 66
},
"end": {
"line": 89,
"column": 67
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2871,
"end": 2872,
"loc": {
"start": {
"line": 89,
"column": 67
},
"end": {
"line": 89,
"column": 68
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2872,
"end": 2873,
"loc": {
"start": {
"line": 89,
"column": 68
},
"end": {
"line": 89,
"column": 69
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2873,
"end": 2874,
"loc": {
"start": {
"line": 89,
"column": 69
},
"end": {
"line": 89,
"column": 70
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2874,
"end": 2875,
"loc": {
"start": {
"line": 89,
"column": 70
},
"end": {
"line": 89,
"column": 71
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "val",
"start": 2875,
"end": 2878,
"loc": {
"start": {
"line": 89,
"column": 71
},
"end": {
"line": 89,
"column": 74
}
}
},
{
"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": 2883,
"end": 2888,
"loc": {
"start": {
"line": 90,
"column": 4
},
"end": {
"line": 90,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "parent",
"start": 2889,
"end": 2895,
"loc": {
"start": {
"line": 90,
"column": 10
},
"end": {
"line": 90,
"column": 16
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 2896,
"end": 2897,
"loc": {
"start": {
"line": 90,
"column": 17
},
"end": {
"line": 90,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 2898,
"end": 2904,
"loc": {
"start": {
"line": 90,
"column": 19
},
"end": {
"line": 90,
"column": 25
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2904,
"end": 2905,
"loc": {
"start": {
"line": 90,
"column": 25
},
"end": {
"line": 90,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_parent",
"start": 2905,
"end": 2912,
"loc": {
"start": {
"line": 90,
"column": 26
},
"end": {
"line": 90,
"column": 33
}
}
},
{
"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": 2917,
"end": 2919,
"loc": {
"start": {
"line": 91,
"column": 4
},
"end": {
"line": 91,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2920,
"end": 2921,
"loc": {
"start": {
"line": 91,
"column": 7
},
"end": {
"line": 91,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 2921,
"end": 2927,
"loc": {
"start": {
"line": 91,
"column": 8
},
"end": {
"line": 91,
"column": 14
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2927,
"end": 2928,
"loc": {
"start": {
"line": 91,
"column": 14
},
"end": {
"line": 91,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 2928,
"end": 2939,
"loc": {
"start": {
"line": 91,
"column": 15
},
"end": {
"line": 91,
"column": 26
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 2940,
"end": 2943,
"loc": {
"start": {
"line": 91,
"column": 27
},
"end": {
"line": 91,
"column": 30
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "GC",
"start": 2944,
"end": 2946,
"loc": {
"start": {
"line": 91,
"column": 31
},
"end": {
"line": 91,
"column": 33
}
}
},
{
"type": {
"label": "||",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 1,
"updateContext": null
},
"value": "||",
"start": 2947,
"end": 2949,
"loc": {
"start": {
"line": 91,
"column": 34
},
"end": {
"line": 91,
"column": 36
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "parent",
"start": 2950,
"end": 2956,
"loc": {
"start": {
"line": 91,
"column": 37
},
"end": {
"line": 91,
"column": 43
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 2956,
"end": 2957,
"loc": {
"start": {
"line": 91,
"column": 43
},
"end": {
"line": 91,
"column": 44
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_deleted",
"start": 2957,
"end": 2965,
"loc": {
"start": {
"line": 91,
"column": 44
},
"end": {
"line": 91,
"column": 52
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2965,
"end": 2966,
"loc": {
"start": {
"line": 91,
"column": 52
},
"end": {
"line": 91,
"column": 53
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2967,
"end": 2968,
"loc": {
"start": {
"line": 91,
"column": 54
},
"end": {
"line": 91,
"column": 55
}
}
},
{
"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": 2975,
"end": 2981,
"loc": {
"start": {
"line": 92,
"column": 6
},
"end": {
"line": 92,
"column": 12
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 2982,
"end": 2986,
"loc": {
"start": {
"line": 92,
"column": 13
},
"end": {
"line": 92,
"column": 17
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 2991,
"end": 2992,
"loc": {
"start": {
"line": 93,
"column": 4
},
"end": {
"line": 93,
"column": 5
}
}
},
{
"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": 2997,
"end": 2999,
"loc": {
"start": {
"line": 94,
"column": 4
},
"end": {
"line": 94,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3000,
"end": 3001,
"loc": {
"start": {
"line": 94,
"column": 7
},
"end": {
"line": 94,
"column": 8
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 3001,
"end": 3002,
"loc": {
"start": {
"line": 94,
"column": 8
},
"end": {
"line": 94,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3002,
"end": 3008,
"loc": {
"start": {
"line": 94,
"column": 9
},
"end": {
"line": 94,
"column": 15
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3008,
"end": 3009,
"loc": {
"start": {
"line": 94,
"column": 15
},
"end": {
"line": 94,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_deleted",
"start": 3009,
"end": 3017,
"loc": {
"start": {
"line": 94,
"column": 16
},
"end": {
"line": 94,
"column": 24
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3017,
"end": 3018,
"loc": {
"start": {
"line": 94,
"column": 24
},
"end": {
"line": 94,
"column": 25
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3019,
"end": 3020,
"loc": {
"start": {
"line": 94,
"column": 26
},
"end": {
"line": 94,
"column": 27
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 3027,
"end": 3033,
"loc": {
"start": {
"line": 95,
"column": 6
},
"end": {
"line": 95,
"column": 12
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 3034,
"end": 3035,
"loc": {
"start": {
"line": 95,
"column": 13
},
"end": {
"line": 95,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rpos",
"start": 3036,
"end": 3040,
"loc": {
"start": {
"line": 95,
"column": 15
},
"end": {
"line": 95,
"column": 19
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3040,
"end": 3041,
"loc": {
"start": {
"line": 95,
"column": 19
},
"end": {
"line": 95,
"column": 20
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 1,
"start": 3041,
"end": 3042,
"loc": {
"start": {
"line": 95,
"column": 20
},
"end": {
"line": 95,
"column": 21
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3042,
"end": 3043,
"loc": {
"start": {
"line": 95,
"column": 21
},
"end": {
"line": 95,
"column": 22
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "-",
"start": 3044,
"end": 3045,
"loc": {
"start": {
"line": 95,
"column": 23
},
"end": {
"line": 95,
"column": 24
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3046,
"end": 3052,
"loc": {
"start": {
"line": 95,
"column": 25
},
"end": {
"line": 95,
"column": 31
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3052,
"end": 3053,
"loc": {
"start": {
"line": 95,
"column": 31
},
"end": {
"line": 95,
"column": 32
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_id",
"start": 3053,
"end": 3056,
"loc": {
"start": {
"line": 95,
"column": 32
},
"end": {
"line": 95,
"column": 35
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3056,
"end": 3057,
"loc": {
"start": {
"line": 95,
"column": 35
},
"end": {
"line": 95,
"column": 36
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "clock",
"start": 3057,
"end": 3062,
"loc": {
"start": {
"line": 95,
"column": 36
},
"end": {
"line": 95,
"column": 41
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3067,
"end": 3068,
"loc": {
"start": {
"line": 96,
"column": 4
},
"end": {
"line": 96,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3073,
"end": 3079,
"loc": {
"start": {
"line": 97,
"column": 4
},
"end": {
"line": 97,
"column": 10
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 3080,
"end": 3081,
"loc": {
"start": {
"line": 97,
"column": 11
},
"end": {
"line": 97,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3082,
"end": 3088,
"loc": {
"start": {
"line": 97,
"column": 13
},
"end": {
"line": 97,
"column": 19
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3088,
"end": 3089,
"loc": {
"start": {
"line": 97,
"column": 19
},
"end": {
"line": 97,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_left",
"start": 3089,
"end": 3094,
"loc": {
"start": {
"line": 97,
"column": 20
},
"end": {
"line": 97,
"column": 25
}
}
},
{
"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": 3099,
"end": 3104,
"loc": {
"start": {
"line": 98,
"column": 4
},
"end": {
"line": 98,
"column": 9
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3105,
"end": 3106,
"loc": {
"start": {
"line": 98,
"column": 10
},
"end": {
"line": 98,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3106,
"end": 3112,
"loc": {
"start": {
"line": 98,
"column": 11
},
"end": {
"line": 98,
"column": 17
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "!==",
"start": 3113,
"end": 3116,
"loc": {
"start": {
"line": 98,
"column": 18
},
"end": {
"line": 98,
"column": 21
}
}
},
{
"type": {
"label": "null",
"keyword": "null",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "null",
"start": 3117,
"end": 3121,
"loc": {
"start": {
"line": 98,
"column": 22
},
"end": {
"line": 98,
"column": 26
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3121,
"end": 3122,
"loc": {
"start": {
"line": 98,
"column": 26
},
"end": {
"line": 98,
"column": 27
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3123,
"end": 3124,
"loc": {
"start": {
"line": 98,
"column": 28
},
"end": {
"line": 98,
"column": 29
}
}
},
{
"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": 3131,
"end": 3133,
"loc": {
"start": {
"line": 99,
"column": 6
},
"end": {
"line": 99,
"column": 8
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3134,
"end": 3135,
"loc": {
"start": {
"line": 99,
"column": 9
},
"end": {
"line": 99,
"column": 10
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 3135,
"end": 3136,
"loc": {
"start": {
"line": 99,
"column": 10
},
"end": {
"line": 99,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3136,
"end": 3142,
"loc": {
"start": {
"line": 99,
"column": 11
},
"end": {
"line": 99,
"column": 17
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3142,
"end": 3143,
"loc": {
"start": {
"line": 99,
"column": 17
},
"end": {
"line": 99,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_deleted",
"start": 3143,
"end": 3151,
"loc": {
"start": {
"line": 99,
"column": 18
},
"end": {
"line": 99,
"column": 26
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3151,
"end": 3152,
"loc": {
"start": {
"line": 99,
"column": 26
},
"end": {
"line": 99,
"column": 27
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3153,
"end": 3154,
"loc": {
"start": {
"line": 99,
"column": 28
},
"end": {
"line": 99,
"column": 29
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 3163,
"end": 3169,
"loc": {
"start": {
"line": 100,
"column": 8
},
"end": {
"line": 100,
"column": 14
}
}
},
{
"type": {
"label": "_=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "+=",
"start": 3170,
"end": 3172,
"loc": {
"start": {
"line": 100,
"column": 15
},
"end": {
"line": 100,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3173,
"end": 3179,
"loc": {
"start": {
"line": 100,
"column": 18
},
"end": {
"line": 100,
"column": 24
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3179,
"end": 3180,
"loc": {
"start": {
"line": 100,
"column": 24
},
"end": {
"line": 100,
"column": 25
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_length",
"start": 3180,
"end": 3187,
"loc": {
"start": {
"line": 100,
"column": 25
},
"end": {
"line": 100,
"column": 32
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3194,
"end": 3195,
"loc": {
"start": {
"line": 101,
"column": 6
},
"end": {
"line": 101,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3202,
"end": 3208,
"loc": {
"start": {
"line": 102,
"column": 6
},
"end": {
"line": 102,
"column": 12
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 3209,
"end": 3210,
"loc": {
"start": {
"line": 102,
"column": 13
},
"end": {
"line": 102,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "struct",
"start": 3211,
"end": 3217,
"loc": {
"start": {
"line": 102,
"column": 15
},
"end": {
"line": 102,
"column": 21
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3217,
"end": 3218,
"loc": {
"start": {
"line": 102,
"column": 21
},
"end": {
"line": 102,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "_left",
"start": 3218,
"end": 3223,
"loc": {
"start": {
"line": 102,
"column": 22
},
"end": {
"line": 102,
"column": 27
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3228,
"end": 3229,
"loc": {
"start": {
"line": 103,
"column": 4
},
"end": {
"line": 103,
"column": 5
}
}
},
{
"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": 3234,
"end": 3240,
"loc": {
"start": {
"line": 104,
"column": 4
},
"end": {
"line": 104,
"column": 10
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3241,
"end": 3242,
"loc": {
"start": {
"line": 104,
"column": 11
},
"end": {
"line": 104,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 3249,
"end": 3253,
"loc": {
"start": {
"line": 105,
"column": 6
},
"end": {
"line": 105,
"column": 10
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3253,
"end": 3254,
"loc": {
"start": {
"line": 105,
"column": 10
},
"end": {
"line": 105,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "parent",
"start": 3255,
"end": 3261,
"loc": {
"start": {
"line": 105,
"column": 12
},
"end": {
"line": 105,
"column": 18
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3261,
"end": 3262,
"loc": {
"start": {
"line": 105,
"column": 18
},
"end": {
"line": 105,
"column": 19
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 3269,
"end": 3275,
"loc": {
"start": {
"line": 106,
"column": 6
},
"end": {
"line": 106,
"column": 12
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3275,
"end": 3276,
"loc": {
"start": {
"line": 106,
"column": 12
},
"end": {
"line": 106,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "offset",
"start": 3277,
"end": 3283,
"loc": {
"start": {
"line": 106,
"column": 14
},
"end": {
"line": 106,
"column": 20
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3288,
"end": 3289,
"loc": {
"start": {
"line": 107,
"column": 4
},
"end": {
"line": 107,
"column": 5
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3292,
"end": 3293,
"loc": {
"start": {
"line": 108,
"column": 2
},
"end": {
"line": 108,
"column": 3
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 3294,
"end": 3295,
"loc": {
"start": {
"line": 109,
"column": 0
},
"end": {
"line": 109,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 3296,
"end": 3296,
"loc": {
"start": {
"line": 110,
"column": 0
},
"end": {
"line": 110,
"column": 0
}
}
}
]
}