3789983e89
Reviewed-by: darcy, ihse
752 lines
23 KiB
Plaintext
752 lines
23 KiB
Plaintext
[
|
|
{
|
|
"classElements": [
|
|
{
|
|
"getter": {
|
|
"endPosition": "96",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "143",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"expression": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "118",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "114"
|
|
},
|
|
"endPosition": "125",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "114"
|
|
},
|
|
"endPosition": "125",
|
|
"kind": "LOGICAL_COMPLEMENT",
|
|
"startPosition": "113"
|
|
},
|
|
"endPosition": "143",
|
|
"kind": "CONDITIONAL_EXPRESSION",
|
|
"trueExpression": {
|
|
"endPosition": "129",
|
|
"kind": "NUMBER_LITERAL",
|
|
"value": "0",
|
|
"startPosition": "128"
|
|
},
|
|
"falseExpression": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "136",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "132"
|
|
},
|
|
"endPosition": "143",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "132"
|
|
},
|
|
"startPosition": "126"
|
|
},
|
|
"endPosition": "143",
|
|
"kind": "RETURN",
|
|
"startPosition": "106"
|
|
}
|
|
],
|
|
"startPosition": "96"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "96",
|
|
"parameters": []
|
|
},
|
|
"static": "true",
|
|
"endPosition": "149",
|
|
"kind": "PROPERTY",
|
|
"setter": {
|
|
"endPosition": "181",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "209",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"endPosition": "209",
|
|
"kind": "IDENTIFIER",
|
|
"name": "val",
|
|
"startPosition": "206"
|
|
},
|
|
"endPosition": "209",
|
|
"kind": "ASSIGNMENT",
|
|
"variable": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "196",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "192"
|
|
},
|
|
"endPosition": "203",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "192"
|
|
},
|
|
"startPosition": "192"
|
|
},
|
|
"endPosition": "209",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "192"
|
|
}
|
|
],
|
|
"startPosition": "181"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "181",
|
|
"parameters": [
|
|
{
|
|
"endPosition": "179",
|
|
"kind": "IDENTIFIER",
|
|
"name": "val",
|
|
"startPosition": "176"
|
|
}
|
|
]
|
|
},
|
|
"value": "null",
|
|
"startPosition": "80",
|
|
"key": {
|
|
"endPosition": "93",
|
|
"kind": "IDENTIFIER",
|
|
"name": "numShapes",
|
|
"startPosition": "84"
|
|
}
|
|
}
|
|
],
|
|
"endPosition": "12",
|
|
"kind": "CLASS",
|
|
"classHeritage": "null",
|
|
"name": {
|
|
"endPosition": "12",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Shape",
|
|
"startPosition": "7"
|
|
},
|
|
"constructor": {
|
|
"getter": "null",
|
|
"endPosition": "67",
|
|
"kind": "PROPERTY",
|
|
"setter": "null",
|
|
"value": {
|
|
"endPosition": "33",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": {
|
|
"endPosition": "30",
|
|
"kind": "IDENTIFIER",
|
|
"name": "constructor",
|
|
"startPosition": "19"
|
|
},
|
|
"body": {
|
|
"endPosition": "61",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"identifier": "numShapes",
|
|
"expression": {
|
|
"endPosition": "48",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Shape",
|
|
"startPosition": "43"
|
|
},
|
|
"endPosition": "58",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "43"
|
|
},
|
|
"endPosition": "60",
|
|
"kind": "POSTFIX_INCREMENT",
|
|
"startPosition": "43"
|
|
},
|
|
"endPosition": "60",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "43"
|
|
}
|
|
],
|
|
"startPosition": "33"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "33",
|
|
"parameters": []
|
|
},
|
|
"startPosition": "19",
|
|
"key": {
|
|
"endPosition": "30",
|
|
"kind": "IDENTIFIER",
|
|
"name": "constructor",
|
|
"startPosition": "19"
|
|
}
|
|
},
|
|
"startPosition": "1"
|
|
},
|
|
{
|
|
"classElements": [
|
|
{
|
|
"getter": "null",
|
|
"static": "true",
|
|
"endPosition": "419",
|
|
"kind": "PROPERTY",
|
|
"setter": "null",
|
|
"value": {
|
|
"endPosition": "388",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": {
|
|
"endPosition": "371",
|
|
"kind": "IDENTIFIER",
|
|
"name": "draw",
|
|
"startPosition": "367"
|
|
},
|
|
"body": {
|
|
"endPosition": "389",
|
|
"kind": "BLOCK",
|
|
"statements": [],
|
|
"startPosition": "388"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "388",
|
|
"parameters": [
|
|
{
|
|
"endPosition": "378",
|
|
"kind": "IDENTIFIER",
|
|
"name": "circle",
|
|
"startPosition": "372"
|
|
},
|
|
{
|
|
"endPosition": "386",
|
|
"kind": "IDENTIFIER",
|
|
"name": "canvas",
|
|
"startPosition": "380"
|
|
}
|
|
]
|
|
},
|
|
"startPosition": "367",
|
|
"key": {
|
|
"endPosition": "371",
|
|
"kind": "IDENTIFIER",
|
|
"name": "draw",
|
|
"startPosition": "367"
|
|
}
|
|
},
|
|
{
|
|
"getter": {
|
|
"endPosition": "449",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "496",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"expression": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "471",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "467"
|
|
},
|
|
"endPosition": "478",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "467"
|
|
},
|
|
"endPosition": "478",
|
|
"kind": "LOGICAL_COMPLEMENT",
|
|
"startPosition": "466"
|
|
},
|
|
"endPosition": "496",
|
|
"kind": "CONDITIONAL_EXPRESSION",
|
|
"trueExpression": {
|
|
"endPosition": "482",
|
|
"kind": "NUMBER_LITERAL",
|
|
"value": "0",
|
|
"startPosition": "481"
|
|
},
|
|
"falseExpression": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "489",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "485"
|
|
},
|
|
"endPosition": "496",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "485"
|
|
},
|
|
"startPosition": "479"
|
|
},
|
|
"endPosition": "496",
|
|
"kind": "RETURN",
|
|
"startPosition": "459"
|
|
}
|
|
],
|
|
"startPosition": "449"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "449",
|
|
"parameters": []
|
|
},
|
|
"static": "true",
|
|
"endPosition": "502",
|
|
"kind": "PROPERTY",
|
|
"setter": {
|
|
"endPosition": "535",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "563",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"endPosition": "563",
|
|
"kind": "IDENTIFIER",
|
|
"name": "val",
|
|
"startPosition": "560"
|
|
},
|
|
"endPosition": "563",
|
|
"kind": "ASSIGNMENT",
|
|
"variable": {
|
|
"identifier": "count_",
|
|
"expression": {
|
|
"endPosition": "550",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "546"
|
|
},
|
|
"endPosition": "557",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "546"
|
|
},
|
|
"startPosition": "546"
|
|
},
|
|
"endPosition": "563",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "546"
|
|
}
|
|
],
|
|
"startPosition": "535"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "535",
|
|
"parameters": [
|
|
{
|
|
"endPosition": "533",
|
|
"kind": "IDENTIFIER",
|
|
"name": "val",
|
|
"startPosition": "530"
|
|
}
|
|
]
|
|
},
|
|
"value": "null",
|
|
"startPosition": "432",
|
|
"key": {
|
|
"endPosition": "446",
|
|
"kind": "IDENTIFIER",
|
|
"name": "numCircles",
|
|
"startPosition": "436"
|
|
}
|
|
},
|
|
{
|
|
"getter": "null",
|
|
"endPosition": "639",
|
|
"kind": "PROPERTY",
|
|
"setter": "null",
|
|
"value": {
|
|
"endPosition": "582",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": {
|
|
"endPosition": "579",
|
|
"kind": "IDENTIFIER",
|
|
"name": "area",
|
|
"startPosition": "575"
|
|
},
|
|
"body": {
|
|
"endPosition": "633",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"leftOperand": {
|
|
"endPosition": "623",
|
|
"kind": "FUNCTION_INVOCATION",
|
|
"functionSelect": {
|
|
"identifier": "pow",
|
|
"expression": {
|
|
"endPosition": "603",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Math",
|
|
"startPosition": "599"
|
|
},
|
|
"endPosition": "607",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "599"
|
|
},
|
|
"arguments": [
|
|
{
|
|
"identifier": "radius",
|
|
"expression": {
|
|
"endPosition": "612",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "608"
|
|
},
|
|
"endPosition": "619",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "608"
|
|
},
|
|
{
|
|
"endPosition": "622",
|
|
"kind": "NUMBER_LITERAL",
|
|
"value": "2",
|
|
"startPosition": "621"
|
|
}
|
|
],
|
|
"startPosition": "599"
|
|
},
|
|
"endPosition": "633",
|
|
"kind": "MULTIPLY",
|
|
"rightOperand": {
|
|
"identifier": "PI",
|
|
"expression": {
|
|
"endPosition": "630",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Math",
|
|
"startPosition": "626"
|
|
},
|
|
"endPosition": "633",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "626"
|
|
},
|
|
"startPosition": "599"
|
|
},
|
|
"endPosition": "633",
|
|
"kind": "RETURN",
|
|
"startPosition": "592"
|
|
}
|
|
],
|
|
"startPosition": "582"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "582",
|
|
"parameters": []
|
|
},
|
|
"startPosition": "575",
|
|
"key": {
|
|
"endPosition": "579",
|
|
"kind": "IDENTIFIER",
|
|
"name": "area",
|
|
"startPosition": "575"
|
|
}
|
|
},
|
|
{
|
|
"getter": {
|
|
"endPosition": "658",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "687",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"identifier": "radius_",
|
|
"expression": {
|
|
"endPosition": "679",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "675"
|
|
},
|
|
"endPosition": "687",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "675"
|
|
},
|
|
"endPosition": "687",
|
|
"kind": "RETURN",
|
|
"startPosition": "668"
|
|
}
|
|
],
|
|
"startPosition": "658"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "658",
|
|
"parameters": []
|
|
},
|
|
"endPosition": "693",
|
|
"kind": "PROPERTY",
|
|
"setter": {
|
|
"endPosition": "718",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": "null",
|
|
"body": {
|
|
"endPosition": "852",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"expression": {
|
|
"endPosition": "757",
|
|
"kind": "FUNCTION_INVOCATION",
|
|
"functionSelect": {
|
|
"identifier": "isInteger",
|
|
"expression": {
|
|
"endPosition": "739",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Number",
|
|
"startPosition": "733"
|
|
},
|
|
"endPosition": "749",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "733"
|
|
},
|
|
"arguments": [
|
|
{
|
|
"endPosition": "756",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "750"
|
|
}
|
|
],
|
|
"startPosition": "733"
|
|
},
|
|
"endPosition": "757",
|
|
"kind": "LOGICAL_COMPLEMENT",
|
|
"startPosition": "732"
|
|
},
|
|
"elseStatement": "null",
|
|
"endPosition": "822",
|
|
"kind": "IF",
|
|
"startPosition": "728",
|
|
"thenStatement": {
|
|
"expression": {
|
|
"constructorExpression": {
|
|
"endPosition": "821",
|
|
"kind": "FUNCTION_INVOCATION",
|
|
"functionSelect": {
|
|
"endPosition": "790",
|
|
"kind": "IDENTIFIER",
|
|
"name": "TypeError",
|
|
"startPosition": "781"
|
|
},
|
|
"arguments": [
|
|
{
|
|
"endPosition": "819",
|
|
"kind": "STRING_LITERAL",
|
|
"value": "Circle radius is not an int",
|
|
"startPosition": "792"
|
|
}
|
|
],
|
|
"startPosition": "781"
|
|
},
|
|
"endPosition": "821",
|
|
"kind": "NEW",
|
|
"startPosition": "777"
|
|
},
|
|
"endPosition": "822",
|
|
"kind": "THROW",
|
|
"startPosition": "771"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"endPosition": "852",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "846"
|
|
},
|
|
"endPosition": "852",
|
|
"kind": "ASSIGNMENT",
|
|
"variable": {
|
|
"identifier": "radius_",
|
|
"expression": {
|
|
"endPosition": "835",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "831"
|
|
},
|
|
"endPosition": "843",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "831"
|
|
},
|
|
"startPosition": "831"
|
|
},
|
|
"endPosition": "852",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "831"
|
|
}
|
|
],
|
|
"startPosition": "718"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "718",
|
|
"parameters": [
|
|
{
|
|
"endPosition": "716",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "710"
|
|
}
|
|
]
|
|
},
|
|
"value": "null",
|
|
"startPosition": "645",
|
|
"key": {
|
|
"endPosition": "655",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "649"
|
|
}
|
|
}
|
|
],
|
|
"endPosition": "231",
|
|
"kind": "CLASS",
|
|
"classHeritage": {
|
|
"endPosition": "245",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Shape",
|
|
"startPosition": "240"
|
|
},
|
|
"name": {
|
|
"endPosition": "231",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Circle",
|
|
"startPosition": "225"
|
|
},
|
|
"constructor": {
|
|
"getter": "null",
|
|
"endPosition": "354",
|
|
"kind": "PROPERTY",
|
|
"setter": "null",
|
|
"value": {
|
|
"endPosition": "272",
|
|
"kind": "FUNCTION_EXPRESSION",
|
|
"name": {
|
|
"endPosition": "263",
|
|
"kind": "IDENTIFIER",
|
|
"name": "constructor",
|
|
"startPosition": "252"
|
|
},
|
|
"body": {
|
|
"endPosition": "348",
|
|
"kind": "BLOCK",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"endPosition": "289",
|
|
"kind": "FUNCTION_INVOCATION",
|
|
"functionSelect": {
|
|
"super": "true",
|
|
"endPosition": "287",
|
|
"kind": "IDENTIFIER",
|
|
"name": "super",
|
|
"startPosition": "282"
|
|
},
|
|
"arguments": [],
|
|
"startPosition": "282"
|
|
},
|
|
"endPosition": "289",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "282"
|
|
},
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"endPosition": "320",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "314"
|
|
},
|
|
"endPosition": "320",
|
|
"kind": "ASSIGNMENT",
|
|
"variable": {
|
|
"identifier": "radius_",
|
|
"expression": {
|
|
"endPosition": "303",
|
|
"kind": "IDENTIFIER",
|
|
"this": "true",
|
|
"name": "this",
|
|
"startPosition": "299"
|
|
},
|
|
"endPosition": "311",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "299"
|
|
},
|
|
"startPosition": "299"
|
|
},
|
|
"endPosition": "320",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "299"
|
|
},
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"identifier": "numCircles",
|
|
"expression": {
|
|
"endPosition": "335",
|
|
"kind": "IDENTIFIER",
|
|
"name": "Circle",
|
|
"startPosition": "329"
|
|
},
|
|
"endPosition": "346",
|
|
"kind": "MEMBER_SELECT",
|
|
"startPosition": "329"
|
|
},
|
|
"endPosition": "348",
|
|
"kind": "POSTFIX_INCREMENT",
|
|
"startPosition": "329"
|
|
},
|
|
"endPosition": "348",
|
|
"kind": "EXPRESSION_STATEMENT",
|
|
"startPosition": "329"
|
|
}
|
|
],
|
|
"startPosition": "272"
|
|
},
|
|
"strict": "true",
|
|
"startPosition": "272",
|
|
"parameters": [
|
|
{
|
|
"endPosition": "270",
|
|
"kind": "IDENTIFIER",
|
|
"name": "radius",
|
|
"startPosition": "264"
|
|
}
|
|
]
|
|
},
|
|
"startPosition": "252",
|
|
"key": {
|
|
"endPosition": "263",
|
|
"kind": "IDENTIFIER",
|
|
"name": "constructor",
|
|
"startPosition": "252"
|
|
}
|
|
},
|
|
"startPosition": "219"
|
|
}
|
|
]
|