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

129 lines
2.8 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 18, 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
}
}, {
"kind" : "FuncDef",
"location" : [ 3, 1, 4, 9 ],
"name" : {
"kind" : "Identifier",
"location" : [ 3, 5, 3, 7 ],
"name" : "foo"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 3, 14, 3, 19 ],
"className" : "object"
},
"declarations" : [ ],
"statements" : [ ]
}, {
"kind" : "FuncDef",
"location" : [ 7, 1, 8, 9 ],
"name" : {
"kind" : "Identifier",
"location" : [ 7, 5, 7, 7 ],
"name" : "foo"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 7, 14, 7, 19 ],
"className" : "object"
},
"declarations" : [ ],
"statements" : [ ]
}, {
"kind" : "FuncDef",
"location" : [ 11, 1, 12, 9 ],
"name" : {
"kind" : "Identifier",
"location" : [ 11, 5, 11, 9 ],
"name" : "print"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 11, 11, 11, 20 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 11, 11, 11, 13 ],
"name" : "val"
},
"type" : {
"kind" : "ClassType",
"location" : [ 11, 15, 11, 20 ],
"className" : "object"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 11, 26, 11, 31 ],
"className" : "object"
},
"declarations" : [ ],
"statements" : [ ]
}, {
"kind" : "VarDef",
"location" : [ 15, 1, 15, 9 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 15, 1, 15, 5 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 15, 1, 15, 1 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 15, 3, 15, 5 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 15, 9, 15, 9 ],
"value" : 2
}
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 18, 1, 18, 5 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 18, 1, 18, 5 ],
"function" : {
"kind" : "Identifier",
"location" : [ 18, 1, 18, 3 ],
"name" : "foo"
},
"args" : [ ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}