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

195 lines
4.4 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 7, 10 ],
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 1, 1, 1, 15 ],
"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" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 1, 9, 1, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"value" : "Hello"
}
}, {
"kind" : "VarDef",
"location" : [ 2, 1, 2, 15 ],
"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" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 2, 9, 2, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"value" : "World"
}
}, {
"kind" : "VarDef",
"location" : [ 3, 1, 3, 10 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 3, 1, 3, 5 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 3, 1, 3, 1 ],
"name" : "z"
},
"type" : {
"kind" : "ClassType",
"location" : [ 3, 3, 3, 5 ],
"className" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 3, 9, 3, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"value" : ""
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 5, 1, 5, 9 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 5, 1, 5, 1 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "z"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 5, 5, 5, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"left" : {
"kind" : "Identifier",
"location" : [ 5, 5, 5, 5 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "x"
},
"operator" : "+",
"right" : {
"kind" : "Identifier",
"location" : [ 5, 9, 5, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "y"
}
}
}, {
"kind" : "AssignStmt",
"location" : [ 6, 1, 6, 8 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 1 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "z"
} ],
"value" : {
"kind" : "IndexExpr",
"location" : [ 6, 5, 6, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"list" : {
"kind" : "Identifier",
"location" : [ 6, 5, 6, 5 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "x"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 6, 7, 6, 7 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 0
}
}
}, {
"kind" : "AssignStmt",
"location" : [ 7, 1, 7, 9 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 7, 1, 7, 1 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 7, 5, 7, 5 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "y"
} ],
"value" : {
"kind" : "Identifier",
"location" : [ 7, 9, 7, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "str"
},
"name" : "z"
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}