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

58 lines
1.3 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 6, 6 ],
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 1, 1, 6, 0 ],
"name" : {
"kind" : "Identifier",
"location" : [ 1, 5, 1, 7 ],
"name" : "foo"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 1, 14, 1, 16 ],
"className" : "int"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "IfStmt",
"location" : [ 2, 5, 6, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 2, 8, 2, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ReturnStmt",
"location" : [ 3, 9, 3, 16 ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 16, 3, 16 ],
"value" : 1
}
} ],
"elseBody" : [ ]
} ]
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 6, 1, 6, 5 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 6, 1, 6, 5 ],
"function" : {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 3 ],
"name" : "foo"
},
"args" : [ ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}