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.
ChocoPy/pa2-tests/core/expr_id.py.ast

51 lines
1.1 KiB

4 years ago
{
"kind" : "Program",
"location" : [ 1, 1, 3, 6 ],
"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" : 1
}
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 3, 1, 3, 5 ],
"expr" : {
"kind" : "BinaryExpr",
"location" : [ 3, 1, 3, 5 ],
"left" : {
"kind" : "Identifier",
"location" : [ 3, 1, 3, 1 ],
"name" : "x"
},
"operator" : "-",
"right" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 5, 3, 5 ],
"value" : 1
}
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}