You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
1.7 KiB
75 lines
1.7 KiB
4 years ago
|
{
|
||
|
"kind" : "Program",
|
||
|
"location" : [ 1, 1, 4, 1 ],
|
||
|
"declarations" : [ {
|
||
|
"kind" : "VarDef",
|
||
|
"location" : [ 1, 1, 1, 9 ],
|
||
|
"var" : {
|
||
|
"kind" : "TypedVar",
|
||
|
"location" : [ 1, 1, 1, 5 ],
|
||
|
"identifier" : {
|
||
|
"kind" : "Identifier",
|
||
|
"location" : [ 1, 1, 1, 1 ],
|
||
|
"name" : "x"
|
||
|
},
|
||
|
"type" : {
|
||
|
"kind" : "ClassType",
|
||
|
"location" : [ 1, 3, 1, 5 ],
|
||
|
"className" : "int"
|
||
|
}
|
||
|
},
|
||
|
"value" : {
|
||
|
"kind" : "IntegerLiteral",
|
||
|
"location" : [ 1, 9, 1, 9 ],
|
||
|
"value" : 0
|
||
|
}
|
||
|
} ],
|
||
|
"statements" : [ {
|
||
|
"kind" : "WhileStmt",
|
||
|
"location" : [ 2, 1, 4, 1 ],
|
||
|
"condition" : {
|
||
|
"kind" : "BinaryExpr",
|
||
|
"location" : [ 2, 7, 2, 13 ],
|
||
|
"left" : {
|
||
|
"kind" : "Identifier",
|
||
|
"location" : [ 2, 7, 2, 7 ],
|
||
|
"name" : "x"
|
||
|
},
|
||
|
"operator" : "<",
|
||
|
"right" : {
|
||
|
"kind" : "IntegerLiteral",
|
||
|
"location" : [ 2, 11, 2, 13 ],
|
||
|
"value" : 100
|
||
|
}
|
||
|
},
|
||
|
"body" : [ {
|
||
|
"kind" : "AssignStmt",
|
||
|
"location" : [ 3, 5, 3, 13 ],
|
||
|
"targets" : [ {
|
||
|
"kind" : "Identifier",
|
||
|
"location" : [ 3, 5, 3, 5 ],
|
||
|
"name" : "x"
|
||
|
} ],
|
||
|
"value" : {
|
||
|
"kind" : "BinaryExpr",
|
||
|
"location" : [ 3, 9, 3, 13 ],
|
||
|
"left" : {
|
||
|
"kind" : "Identifier",
|
||
|
"location" : [ 3, 9, 3, 9 ],
|
||
|
"name" : "x"
|
||
|
},
|
||
|
"operator" : "+",
|
||
|
"right" : {
|
||
|
"kind" : "IntegerLiteral",
|
||
|
"location" : [ 3, 13, 3, 13 ],
|
||
|
"value" : 1
|
||
|
}
|
||
|
}
|
||
|
} ]
|
||
|
} ],
|
||
|
"errors" : {
|
||
|
"errors" : [ ],
|
||
|
"kind" : "Errors",
|
||
|
"location" : [ 0, 0, 0, 0 ]
|
||
|
}
|
||
|
}
|