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/bad_assign_expr.py.ast

177 lines
3.8 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 10, 13 ],
"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
}
}, {
"kind" : "VarDef",
"location" : [ 2, 1, 2, 9 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 1, 2, 5 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 1, 2, 1 ],
"name" : "y"
},
"type" : {
"kind" : "ClassType",
"location" : [ 2, 3, 2, 5 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 2, 9, 2, 9 ],
"value" : 0
}
}, {
"kind" : "VarDef",
"location" : [ 3, 1, 3, 14 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 3, 1, 3, 6 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 3, 1, 3, 1 ],
"name" : "z"
},
"type" : {
"kind" : "ClassType",
"location" : [ 3, 3, 3, 6 ],
"className" : "bool"
}
},
"value" : {
"kind" : "BooleanLiteral",
"location" : [ 3, 10, 3, 14 ],
"value" : false
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 5, 1, 5, 9 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 5, 1, 5, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 5, 5, 5, 5 ],
"name" : "z"
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 5, 9, 5, 9 ],
"value" : 1
}
}, {
"kind" : "AssignStmt",
"location" : [ 6, 1, 6, 12 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 6, 5, 6, 5 ],
"name" : "y"
} ],
"value" : {
"kind" : "NoneLiteral",
"location" : [ 6, 9, 6, 12 ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 7, 1, 7, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 7, 1, 7, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 7, 5, 7, 5 ],
"name" : "y"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 7, 9, 7, 10 ],
"elements" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 8, 1, 8, 12 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 8, 1, 8, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 8, 5, 8, 5 ],
"name" : "a"
} ],
"value" : {
"kind" : "NoneLiteral",
"location" : [ 8, 9, 8, 12 ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 9, 1, 9, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 9, 1, 9, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 9, 5, 9, 5 ],
"name" : "a"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 9, 9, 9, 10 ],
"elements" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 10, 1, 10, 12 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 10, 1, 10, 1 ],
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 10, 5, 10, 5 ],
"name" : "y"
} ],
"value" : {
"kind" : "BooleanLiteral",
"location" : [ 10, 9, 10, 12 ],
"value" : true
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}