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.
173 lines
4.2 KiB
173 lines
4.2 KiB
{
|
|
"kind" : "Program",
|
|
"location" : [ 1, 1, 11, 4 ],
|
|
"declarations" : [ {
|
|
"kind" : "ClassDef",
|
|
"location" : [ 1, 1, 2, 15 ],
|
|
"name" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 1, 7, 1, 7 ],
|
|
"name" : "A"
|
|
},
|
|
"superClass" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 1, 9, 1, 14 ],
|
|
"name" : "object"
|
|
},
|
|
"declarations" : [ {
|
|
"kind" : "VarDef",
|
|
"location" : [ 2, 5, 2, 14 ],
|
|
"var" : {
|
|
"kind" : "TypedVar",
|
|
"location" : [ 2, 5, 2, 9 ],
|
|
"identifier" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 2, 5, 2, 5 ],
|
|
"name" : "a"
|
|
},
|
|
"type" : {
|
|
"kind" : "ClassType",
|
|
"location" : [ 2, 7, 2, 9 ],
|
|
"className" : "int"
|
|
}
|
|
},
|
|
"value" : {
|
|
"kind" : "IntegerLiteral",
|
|
"location" : [ 2, 13, 2, 14 ],
|
|
"inferredType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "int"
|
|
},
|
|
"value" : 42
|
|
}
|
|
} ]
|
|
}, {
|
|
"kind" : "ClassDef",
|
|
"location" : [ 4, 1, 11, 0 ],
|
|
"name" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 4, 7, 4, 7 ],
|
|
"name" : "B"
|
|
},
|
|
"superClass" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 4, 9, 4, 9 ],
|
|
"name" : "A"
|
|
},
|
|
"declarations" : [ {
|
|
"kind" : "VarDef",
|
|
"location" : [ 5, 5, 5, 17 ],
|
|
"var" : {
|
|
"kind" : "TypedVar",
|
|
"location" : [ 5, 5, 5, 10 ],
|
|
"identifier" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 5, 5, 5, 5 ],
|
|
"name" : "b"
|
|
},
|
|
"type" : {
|
|
"kind" : "ClassType",
|
|
"location" : [ 5, 7, 5, 10 ],
|
|
"className" : "bool"
|
|
}
|
|
},
|
|
"value" : {
|
|
"kind" : "BooleanLiteral",
|
|
"location" : [ 5, 14, 5, 17 ],
|
|
"inferredType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "bool"
|
|
},
|
|
"value" : true
|
|
}
|
|
}, {
|
|
"kind" : "FuncDef",
|
|
"location" : [ 7, 5, 8, 19 ],
|
|
"name" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 7, 9, 7, 16 ],
|
|
"name" : "__init__"
|
|
},
|
|
"params" : [ {
|
|
"kind" : "TypedVar",
|
|
"location" : [ 7, 18, 7, 25 ],
|
|
"identifier" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 7, 18, 7, 21 ],
|
|
"name" : "self"
|
|
},
|
|
"type" : {
|
|
"kind" : "ClassType",
|
|
"location" : [ 7, 23, 7, 25 ],
|
|
"className" : "B"
|
|
}
|
|
} ],
|
|
"returnType" : {
|
|
"kind" : "ClassType",
|
|
"location" : [ 7, 27, 7, 27 ],
|
|
"className" : "<None>"
|
|
},
|
|
"declarations" : [ ],
|
|
"statements" : [ {
|
|
"kind" : "ExprStmt",
|
|
"location" : [ 8, 9, 8, 18 ],
|
|
"expr" : {
|
|
"kind" : "CallExpr",
|
|
"location" : [ 8, 9, 8, 18 ],
|
|
"inferredType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "<None>"
|
|
},
|
|
"function" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 8, 9, 8, 13 ],
|
|
"inferredType" : {
|
|
"kind" : "FuncType",
|
|
"parameters" : [ {
|
|
"kind" : "ClassValueType",
|
|
"className" : "object"
|
|
} ],
|
|
"returnType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "<None>"
|
|
}
|
|
},
|
|
"name" : "print"
|
|
},
|
|
"args" : [ {
|
|
"kind" : "StringLiteral",
|
|
"location" : [ 8, 15, 8, 17 ],
|
|
"inferredType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "str"
|
|
},
|
|
"value" : "B"
|
|
} ]
|
|
}
|
|
} ]
|
|
} ]
|
|
} ],
|
|
"statements" : [ {
|
|
"kind" : "ExprStmt",
|
|
"location" : [ 11, 1, 11, 3 ],
|
|
"expr" : {
|
|
"kind" : "CallExpr",
|
|
"location" : [ 11, 1, 11, 3 ],
|
|
"inferredType" : {
|
|
"kind" : "ClassValueType",
|
|
"className" : "B"
|
|
},
|
|
"function" : {
|
|
"kind" : "Identifier",
|
|
"location" : [ 11, 1, 11, 1 ],
|
|
"name" : "B"
|
|
},
|
|
"args" : [ ]
|
|
}
|
|
} ],
|
|
"errors" : {
|
|
"errors" : [ ],
|
|
"kind" : "Errors",
|
|
"location" : [ 0, 0, 0, 0 ]
|
|
}
|
|
} |