179 lines
2.9 KiB
JSON
179 lines
2.9 KiB
JSON
{
|
|
"diagnostics": [
|
|
{
|
|
"type": "Error",
|
|
"location": {
|
|
"start": [
|
|
6,
|
|
0
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
},
|
|
"message": "Cannot assign BaseType(name='str') to c of type BaseType(name='int')"
|
|
}
|
|
],
|
|
"judgments": [
|
|
{
|
|
"location": {
|
|
"from": "L1:9",
|
|
"to": "L1:10"
|
|
},
|
|
"expr": {
|
|
"_type": "LiteralExpr",
|
|
"value": 3
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L2:9",
|
|
"to": "L2:10"
|
|
},
|
|
"expr": {
|
|
"_type": "LiteralExpr",
|
|
"value": 4
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L4:4",
|
|
"to": "L4:5"
|
|
},
|
|
"expr": {
|
|
"_type": "VariableExpr",
|
|
"name": "a"
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L4:8",
|
|
"to": "L4:9"
|
|
},
|
|
"expr": {
|
|
"_type": "VariableExpr",
|
|
"name": "b"
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L4:4",
|
|
"to": "L4:9"
|
|
},
|
|
"expr": {
|
|
"_type": "BinaryExpr",
|
|
"left": {
|
|
"_type": "VariableExpr",
|
|
"name": "a"
|
|
},
|
|
"operator": "+",
|
|
"right": {
|
|
"_type": "VariableExpr",
|
|
"name": "b"
|
|
}
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L6:4",
|
|
"to": "L6:13"
|
|
},
|
|
"expr": {
|
|
"_type": "LiteralExpr",
|
|
"value": "invalid"
|
|
},
|
|
"type": {
|
|
"name": "str"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L8:4",
|
|
"to": "L8:8"
|
|
},
|
|
"expr": {
|
|
"_type": "LiteralExpr",
|
|
"value": true
|
|
},
|
|
"type": {
|
|
"name": "bool"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L9:4",
|
|
"to": "L9:5"
|
|
},
|
|
"expr": {
|
|
"_type": "VariableExpr",
|
|
"name": "d"
|
|
},
|
|
"type": {
|
|
"name": "bool"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L9:8",
|
|
"to": "L9:9"
|
|
},
|
|
"expr": {
|
|
"_type": "VariableExpr",
|
|
"name": "d"
|
|
},
|
|
"type": {
|
|
"name": "bool"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L9:4",
|
|
"to": "L9:9"
|
|
},
|
|
"expr": {
|
|
"_type": "BinaryExpr",
|
|
"left": {
|
|
"_type": "VariableExpr",
|
|
"name": "d"
|
|
},
|
|
"operator": "+",
|
|
"right": {
|
|
"_type": "VariableExpr",
|
|
"name": "d"
|
|
}
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
},
|
|
{
|
|
"location": {
|
|
"from": "L11:11",
|
|
"to": "L11:12"
|
|
},
|
|
"expr": {
|
|
"_type": "VariableExpr",
|
|
"name": "a"
|
|
},
|
|
"type": {
|
|
"name": "int"
|
|
}
|
|
}
|
|
]
|
|
} |