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_var_assign.py.ast

71 lines
1.5 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 4, 11 ],
"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
}
}, {
"kind" : "VarDef",
"location" : [ 2, 1, 2, 15 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 1, 2, 8 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 1, 2, 1 ],
"name" : "o"
},
"type" : {
"kind" : "ClassType",
"location" : [ 2, 3, 2, 8 ],
"className" : "object"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 2, 12, 2, 15 ]
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 4, 1, 4, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 4, 5, 4, 5 ],
"name" : "o"
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 4, 9, 4, 10 ],
"value" : 42
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}