1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00
tobspr_shapez.io/docs/ast/source/core/cachebust.js.json
2021-02-26 15:20:37 +01:00

1391 lines
32 KiB
JSON

{
"type": "File",
"start": 0,
"end": 301,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 301,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ExportNamedDeclaration",
"start": 122,
"end": 299,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 129,
"end": 299,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 10,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 138,
"end": 147,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 25
},
"identifierName": "cachebust"
},
"name": "cachebust",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 148,
"end": 152,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 30
},
"identifierName": "path"
},
"name": "path"
}
],
"body": {
"type": "BlockStatement",
"start": 154,
"end": 299,
"loc": {
"start": {
"line": 5,
"column": 32
},
"end": {
"line": 10,
"column": 1
}
},
"body": [
{
"type": "IfStatement",
"start": 161,
"end": 278,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 8,
"column": 5
}
},
"test": {
"type": "LogicalExpression",
"start": 165,
"end": 210,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 53
}
},
"left": {
"type": "LogicalExpression",
"start": 165,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 40
}
},
"left": {
"type": "Identifier",
"start": 165,
"end": 177,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 20
},
"identifierName": "G_IS_BROWSER"
},
"name": "G_IS_BROWSER"
},
"operator": "&&",
"right": {
"type": "UnaryExpression",
"start": 181,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 40
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 182,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 6,
"column": 40
},
"identifierName": "G_IS_STANDALONE"
},
"name": "G_IS_STANDALONE"
},
"extra": {
"parenthesizedArgument": false
}
}
},
"operator": "&&",
"right": {
"type": "UnaryExpression",
"start": 201,
"end": 210,
"loc": {
"start": {
"line": 6,
"column": 44
},
"end": {
"line": 6,
"column": 53
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 202,
"end": 210,
"loc": {
"start": {
"line": 6,
"column": 45
},
"end": {
"line": 6,
"column": 53
},
"identifierName": "G_IS_DEV"
},
"name": "G_IS_DEV"
},
"extra": {
"parenthesizedArgument": false
}
}
},
"consequent": {
"type": "BlockStatement",
"start": 212,
"end": 278,
"loc": {
"start": {
"line": 6,
"column": 55
},
"end": {
"line": 8,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 223,
"end": 271,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 56
}
},
"argument": {
"type": "BinaryExpression",
"start": 230,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 55
}
},
"left": {
"type": "BinaryExpression",
"start": 230,
"end": 263,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 48
}
},
"left": {
"type": "BinaryExpression",
"start": 230,
"end": 257,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 42
}
},
"left": {
"type": "StringLiteral",
"start": 230,
"end": 235,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 20
}
},
"extra": {
"rawValue": "/v/",
"raw": "\"/v/\""
},
"value": "/v/"
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 238,
"end": 257,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 42
},
"identifierName": "G_BUILD_COMMIT_HASH"
},
"name": "G_BUILD_COMMIT_HASH"
}
},
"operator": "+",
"right": {
"type": "StringLiteral",
"start": 260,
"end": 263,
"loc": {
"start": {
"line": 7,
"column": 45
},
"end": {
"line": 7,
"column": 48
}
},
"extra": {
"rawValue": "/",
"raw": "\"/\""
},
"value": "/"
}
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 266,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 51
},
"end": {
"line": 7,
"column": 55
},
"identifierName": "path"
},
"name": "path"
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ReturnStatement",
"start": 284,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 16
}
},
"argument": {
"type": "Identifier",
"start": 291,
"end": 295,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 15
},
"identifierName": "path"
},
"name": "path"
}
}
],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Generates a cachebuster string. This only modifies the path in the browser version\r\n * @param {string} path\r\n ",
"start": 0,
"end": 120,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Generates a cachebuster string. This only modifies the path in the browser version\r\n * @param {string} path\r\n ",
"start": 0,
"end": 120,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\r\n * Generates a cachebuster string. This only modifies the path in the browser version\r\n * @param {string} path\r\n ",
"start": 0,
"end": 120,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 3
}
}
}
],
"tokens": [
{
"type": "CommentBlock",
"value": "*\r\n * Generates a cachebuster string. This only modifies the path in the browser version\r\n * @param {string} path\r\n ",
"start": 0,
"end": 120,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"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": 122,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"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": 129,
"end": 137,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "cachebust",
"start": 138,
"end": 147,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 25
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 147,
"end": 148,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "path",
"start": 148,
"end": 152,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 30
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 152,
"end": 153,
"loc": {
"start": {
"line": 5,
"column": 30
},
"end": {
"line": 5,
"column": 31
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 154,
"end": 155,
"loc": {
"start": {
"line": 5,
"column": 32
},
"end": {
"line": 5,
"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": 161,
"end": 163,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 164,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "G_IS_BROWSER",
"start": 165,
"end": 177,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 20
}
}
},
{
"type": {
"label": "&&",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 2,
"updateContext": null
},
"value": "&&",
"start": 178,
"end": 180,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 23
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 181,
"end": 182,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 25
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "G_IS_STANDALONE",
"start": 182,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 6,
"column": 40
}
}
},
{
"type": {
"label": "&&",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 2,
"updateContext": null
},
"value": "&&",
"start": 198,
"end": 200,
"loc": {
"start": {
"line": 6,
"column": 41
},
"end": {
"line": 6,
"column": 43
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 201,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 44
},
"end": {
"line": 6,
"column": 45
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "G_IS_DEV",
"start": 202,
"end": 210,
"loc": {
"start": {
"line": 6,
"column": 45
},
"end": {
"line": 6,
"column": 53
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 210,
"end": 211,
"loc": {
"start": {
"line": 6,
"column": 53
},
"end": {
"line": 6,
"column": 54
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 212,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 55
},
"end": {
"line": 6,
"column": 56
}
}
},
{
"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": 223,
"end": 229,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 14
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "/v/",
"start": 230,
"end": 235,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 20
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 236,
"end": 237,
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "G_BUILD_COMMIT_HASH",
"start": 238,
"end": 257,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 42
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 258,
"end": 259,
"loc": {
"start": {
"line": 7,
"column": 43
},
"end": {
"line": 7,
"column": 44
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "/",
"start": 260,
"end": 263,
"loc": {
"start": {
"line": 7,
"column": 45
},
"end": {
"line": 7,
"column": 48
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 264,
"end": 265,
"loc": {
"start": {
"line": 7,
"column": 49
},
"end": {
"line": 7,
"column": 50
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "path",
"start": 266,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 51
},
"end": {
"line": 7,
"column": 55
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 270,
"end": 271,
"loc": {
"start": {
"line": 7,
"column": 55
},
"end": {
"line": 7,
"column": 56
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 277,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"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": 284,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "path",
"start": 291,
"end": 295,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 15
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 295,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 16
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 298,
"end": 299,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 301,
"end": 301,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
}
}
]
}