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.

1192 lines
30 KiB

{
"kind" : "Program",
"location" : [ 2, 1, 83, 25 ],
"declarations" : [ {
"kind" : "ClassDef",
"location" : [ 2, 1, 10, 14 ],
"name" : {
"kind" : "Identifier",
"location" : [ 2, 7, 2, 9 ],
"name" : "Foo"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 2, 11, 2, 16 ],
"name" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 3, 5, 3, 13 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 3, 5, 3, 9 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 3, 5, 3, 5 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 3, 7, 3, 9 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 13, 3, 13 ],
"value" : 0
}
}, {
"kind" : "FuncDef",
"location" : [ 5, 5, 6, 18 ],
"name" : {
"kind" : "Identifier",
"location" : [ 5, 9, 5, 16 ],
"name" : "__init__"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 5, 18, 5, 27 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 5, 18, 5, 21 ],
"name" : "self"
},
"type" : {
"kind" : "ClassType",
"location" : [ 5, 23, 5, 27 ],
"className" : "Foo"
}
}, {
"kind" : "TypedVar",
"location" : [ 5, 30, 5, 34 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 5, 30, 5, 30 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 5, 32, 5, 34 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 5, 36, 5, 36 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 6, 9, 6, 18 ],
"targets" : [ {
"kind" : "MemberExpr",
"location" : [ 6, 9, 6, 14 ],
"object" : {
"kind" : "Identifier",
"location" : [ 6, 9, 6, 12 ],
"name" : "self"
},
"member" : {
"kind" : "Identifier",
"location" : [ 6, 14, 6, 14 ],
"name" : "x"
}
} ],
"value" : {
"kind" : "Identifier",
"location" : [ 6, 18, 6, 18 ],
"name" : "x"
}
} ]
}, {
"kind" : "FuncDef",
"location" : [ 8, 5, 10, 14 ],
"name" : {
"kind" : "Identifier",
"location" : [ 8, 9, 8, 11 ],
"name" : "bar"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 8, 13, 8, 17 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 8, 13, 8, 13 ],
"name" : "y"
},
"type" : {
"kind" : "ClassType",
"location" : [ 8, 15, 8, 17 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 8, 19, 8, 19 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 9, 9, 9, 38 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 9, 9, 9, 38 ],
"function" : {
"kind" : "Identifier",
"location" : [ 9, 9, 9, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 9, 15, 9, 28 ],
"value" : "Hello World!"
}, {
"kind" : "BinaryExpr",
"location" : [ 9, 30, 9, 37 ],
"left" : {
"kind" : "MemberExpr",
"location" : [ 9, 30, 9, 35 ],
"object" : {
"kind" : "Identifier",
"location" : [ 9, 30, 9, 33 ],
"name" : "self"
},
"member" : {
"kind" : "Identifier",
"location" : [ 9, 35, 9, 35 ],
"name" : "x"
}
},
"operator" : "+",
"right" : {
"kind" : "Identifier",
"location" : [ 9, 37, 9, 37 ],
"name" : "y"
}
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 10, 9, 10, 14 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 10, 9, 10, 9 ],
"name" : "y"
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 10, 13, 10, 14 ],
"value" : 10
}
} ]
} ]
}, {
"kind" : "FuncDef",
"location" : [ 12, 1, 17, 25 ],
"name" : {
"kind" : "Identifier",
"location" : [ 12, 5, 12, 14 ],
"name" : "get_stones"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 12, 16, 12, 23 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 12, 16, 12, 19 ],
"name" : "name"
},
"type" : {
"kind" : "ClassType",
"location" : [ 12, 21, 12, 23 ],
"className" : "str"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 12, 27, 12, 29 ],
"className" : "str"
},
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 13, 5, 14, 38 ],
"name" : {
"kind" : "Identifier",
"location" : [ 13, 9, 13, 16 ],
"name" : "map_name"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 13, 18, 13, 23 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 13, 18, 13, 19 ],
"name" : "nm"
},
"type" : {
"kind" : "ClassType",
"location" : [ 13, 21, 13, 23 ],
"className" : "str"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 13, 27, 13, 29 ],
"className" : "str"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "ReturnStmt",
"location" : [ 14, 9, 14, 38 ],
"value" : {
"kind" : "IndexExpr",
"location" : [ 14, 16, 14, 38 ],
"list" : {
"kind" : "Identifier",
"location" : [ 14, 16, 14, 21 ],
"name" : "stones"
},
"index" : {
"kind" : "MethodCallExpr",
"location" : [ 14, 23, 14, 37 ],
"method" : {
"kind" : "MemberExpr",
"location" : [ 14, 23, 14, 33 ],
"object" : {
"kind" : "Identifier",
"location" : [ 14, 23, 14, 27 ],
"name" : "color"
},
"member" : {
"kind" : "Identifier",
"location" : [ 14, 29, 14, 33 ],
"name" : "index"
}
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 14, 35, 14, 36 ],
"name" : "nm"
} ]
}
}
} ]
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 15, 5, 15, 24 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 15, 5, 15, 9 ],
"name" : "color"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 15, 11, 15, 24 ],
"elements" : [ {
"kind" : "StringLiteral",
"location" : [ 15, 12, 15, 16 ],
"value" : "Red"
}, {
"kind" : "StringLiteral",
"location" : [ 15, 18, 15, 23 ],
"value" : "Blue"
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 16, 5, 16, 26 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 16, 5, 16, 10 ],
"name" : "stones"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 16, 12, 16, 26 ],
"elements" : [ {
"kind" : "StringLiteral",
"location" : [ 16, 13, 16, 18 ],
"value" : "Mind"
}, {
"kind" : "StringLiteral",
"location" : [ 16, 20, 16, 25 ],
"value" : "Soul"
} ]
}
}, {
"kind" : "ReturnStmt",
"location" : [ 17, 5, 17, 25 ],
"value" : {
"kind" : "CallExpr",
"location" : [ 17, 12, 17, 25 ],
"function" : {
"kind" : "Identifier",
"location" : [ 17, 12, 17, 19 ],
"name" : "map_name"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 17, 21, 17, 24 ],
"name" : "name"
} ]
}
} ]
}, {
"kind" : "FuncDef",
"location" : [ 19, 1, 22, 10 ],
"name" : {
"kind" : "Identifier",
"location" : [ 19, 5, 19, 8 ],
"name" : "funa"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 19, 11, 19, 11 ],
"className" : "<None>"
},
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 20, 5, 21, 22 ],
"name" : {
"kind" : "Identifier",
"location" : [ 20, 9, 20, 12 ],
"name" : "funb"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 20, 15, 20, 15 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 21, 9, 21, 22 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 21, 9, 21, 22 ],
"function" : {
"kind" : "Identifier",
"location" : [ 21, 9, 21, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 21, 15, 21, 21 ],
"value" : "Hello"
} ]
}
} ]
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 22, 5, 22, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 22, 5, 22, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 22, 5, 22, 8 ],
"name" : "funb"
},
"args" : [ ]
}
} ]
}, {
"kind" : "FuncDef",
"location" : [ 24, 1, 27, 13 ],
"name" : {
"kind" : "Identifier",
"location" : [ 24, 5, 24, 8 ],
"name" : "fund"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 24, 11, 24, 11 ],
"className" : "<None>"
},
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 25, 5, 26, 22 ],
"name" : {
"kind" : "Identifier",
"location" : [ 25, 9, 25, 12 ],
"name" : "fune"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 25, 15, 25, 15 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 26, 9, 26, 22 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 26, 9, 26, 22 ],
"function" : {
"kind" : "Identifier",
"location" : [ 26, 9, 26, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 26, 15, 26, 21 ],
"value" : "Hello"
} ]
}
} ]
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 27, 5, 27, 13 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 27, 5, 27, 5 ],
"name" : "c"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 27, 9, 27, 13 ],
"left" : {
"kind" : "IntegerLiteral",
"location" : [ 27, 9, 27, 9 ],
"value" : 4
},
"operator" : "+",
"right" : {
"kind" : "IntegerLiteral",
"location" : [ 27, 13, 27, 13 ],
"value" : 5
}
}
} ]
}, {
"kind" : "FuncDef",
"location" : [ 29, 1, 33, 13 ],
"name" : {
"kind" : "Identifier",
"location" : [ 29, 5, 29, 8 ],
"name" : "funf"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 29, 11, 29, 11 ],
"className" : "<None>"
},
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 30, 5, 31, 22 ],
"name" : {
"kind" : "Identifier",
"location" : [ 30, 9, 30, 12 ],
"name" : "fung"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 30, 15, 30, 15 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 31, 9, 31, 22 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 31, 9, 31, 22 ],
"function" : {
"kind" : "Identifier",
"location" : [ 31, 9, 31, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 31, 15, 31, 21 ],
"value" : "Hello"
} ]
}
} ]
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 32, 5, 32, 9 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 32, 5, 32, 5 ],
"name" : "c"
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 32, 9, 32, 9 ],
"value" : 6
}
}, {
"kind" : "AssignStmt",
"location" : [ 33, 5, 33, 13 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 33, 5, 33, 5 ],
"name" : "c"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 33, 9, 33, 13 ],
"left" : {
"kind" : "IntegerLiteral",
"location" : [ 33, 9, 33, 9 ],
"value" : 4
},
"operator" : "+",
"right" : {
"kind" : "IntegerLiteral",
"location" : [ 33, 13, 33, 13 ],
"value" : 5
}
}
} ]
} ],
"statements" : [ {
"kind" : "IfStmt",
"location" : [ 36, 1, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 36, 4, 36, 7 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 37, 5, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 37, 8, 37, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 38, 9, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 38, 12, 38, 15 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ExprStmt",
"location" : [ 39, 13, 39, 26 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 39, 13, 39, 26 ],
"function" : {
"kind" : "Identifier",
"location" : [ 39, 13, 39, 17 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 39, 19, 39, 25 ],
"value" : "Hello"
} ]
}
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ ]
}, {
"kind" : "ExprStmt",
"location" : [ 40, 1, 40, 14 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 40, 1, 40, 14 ],
"function" : {
"kind" : "Identifier",
"location" : [ 40, 1, 40, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 40, 7, 40, 13 ],
"value" : "World"
} ]
}
}, {
"kind" : "IfStmt",
"location" : [ 42, 1, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 42, 4, 42, 7 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 43, 5, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 43, 8, 43, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 44, 9, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 44, 12, 44, 15 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ExprStmt",
"location" : [ 45, 13, 45, 26 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 45, 13, 45, 26 ],
"function" : {
"kind" : "Identifier",
"location" : [ 45, 13, 45, 17 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 45, 19, 45, 25 ],
"value" : "Hello"
} ]
}
} ],
"elseBody" : [ ]
}, {
"kind" : "ExprStmt",
"location" : [ 46, 9, 46, 22 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 46, 9, 46, 22 ],
"function" : {
"kind" : "Identifier",
"location" : [ 46, 9, 46, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 46, 15, 46, 21 ],
"value" : "World"
} ]
}
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ ]
}, {
"kind" : "IfStmt",
"location" : [ 48, 1, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 48, 4, 48, 7 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 49, 5, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 49, 8, 49, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 50, 9, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 50, 12, 50, 15 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ExprStmt",
"location" : [ 51, 13, 51, 26 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 51, 13, 51, 26 ],
"function" : {
"kind" : "Identifier",
"location" : [ 51, 13, 51, 17 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 51, 19, 51, 25 ],
"value" : "Hello"
} ]
}
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ ]
}, {
"kind" : "ExprStmt",
"location" : [ 52, 5, 52, 18 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 52, 5, 52, 18 ],
"function" : {
"kind" : "Identifier",
"location" : [ 52, 5, 52, 9 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 52, 11, 52, 17 ],
"value" : "World"
} ]
}
} ],
"elseBody" : [ ]
}, {
"kind" : "IfStmt",
"location" : [ 54, 1, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 54, 4, 54, 7 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 55, 5, 59, 22 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 55, 8, 55, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 56, 9, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 56, 12, 56, 15 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ExprStmt",
"location" : [ 57, 13, 57, 26 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 57, 13, 57, 26 ],
"function" : {
"kind" : "Identifier",
"location" : [ 57, 13, 57, 17 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 57, 19, 57, 25 ],
"value" : "Hello"
} ]
}
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ {
"kind" : "ExprStmt",
"location" : [ 59, 9, 59, 22 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 59, 9, 59, 22 ],
"function" : {
"kind" : "Identifier",
"location" : [ 59, 9, 59, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 59, 15, 59, 21 ],
"value" : "World"
} ]
}
} ]
} ],
"elseBody" : [ ]
}, {
"kind" : "IfStmt",
"location" : [ 61, 1, 66, 18 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 61, 4, 61, 7 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 62, 5, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 62, 8, 62, 11 ],
"value" : true
},
"thenBody" : [ {
"kind" : "IfStmt",
"location" : [ 63, 9, 0, 0 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 63, 12, 63, 15 ],
"value" : true
},
"thenBody" : [ {
"kind" : "ExprStmt",
"location" : [ 64, 13, 64, 26 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 64, 13, 64, 26 ],
"function" : {
"kind" : "Identifier",
"location" : [ 64, 13, 64, 17 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 64, 19, 64, 25 ],
"value" : "Hello"
} ]
}
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ ]
} ],
"elseBody" : [ {
"kind" : "ExprStmt",
"location" : [ 66, 5, 66, 18 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 66, 5, 66, 18 ],
"function" : {
"kind" : "Identifier",
"location" : [ 66, 5, 66, 9 ],
"name" : "print"
},
"args" : [ {
"kind" : "StringLiteral",
"location" : [ 66, 11, 66, 17 ],
"value" : "World"
} ]
}
} ]
}, {
"kind" : "AssignStmt",
"location" : [ 70, 1, 70, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 70, 1, 70, 1 ],
"name" : "f"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 70, 5, 70, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 70, 5, 70, 7 ],
"name" : "Foo"
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 70, 9, 70, 9 ],
"value" : 1
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 71, 1, 71, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 71, 1, 71, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 71, 1, 71, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "MemberExpr",
"location" : [ 71, 7, 71, 9 ],
"object" : {
"kind" : "Identifier",
"location" : [ 71, 7, 71, 7 ],
"name" : "f"
},
"member" : {
"kind" : "Identifier",
"location" : [ 71, 9, 71, 9 ],
"name" : "x"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 72, 1, 72, 8 ],
"expr" : {
"kind" : "MethodCallExpr",
"location" : [ 72, 1, 72, 8 ],
"method" : {
"kind" : "MemberExpr",
"location" : [ 72, 1, 72, 5 ],
"object" : {
"kind" : "Identifier",
"location" : [ 72, 1, 72, 1 ],
"name" : "f"
},
"member" : {
"kind" : "Identifier",
"location" : [ 72, 3, 72, 5 ],
"name" : "bar"
}
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 72, 7, 72, 7 ],
"value" : 4
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 74, 1, 74, 23 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 74, 1, 74, 1 ],
"name" : "a"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 74, 3, 74, 23 ],
"elements" : [ {
"kind" : "ListExpr",
"location" : [ 74, 4, 74, 12 ],
"elements" : [ {
"kind" : "ListExpr",
"location" : [ 74, 5, 74, 7 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 74, 6, 74, 6 ],
"value" : 1
} ]
}, {
"kind" : "ListExpr",
"location" : [ 74, 9, 74, 11 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 74, 10, 74, 10 ],
"value" : 2
} ]
} ]
}, {
"kind" : "ListExpr",
"location" : [ 74, 14, 74, 22 ],
"elements" : [ {
"kind" : "ListExpr",
"location" : [ 74, 15, 74, 17 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 74, 16, 74, 16 ],
"value" : 3
} ]
}, {
"kind" : "ListExpr",
"location" : [ 74, 19, 74, 21 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 74, 20, 74, 20 ],
"value" : 4
} ]
} ]
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 75, 1, 75, 28 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 75, 1, 75, 28 ],
"function" : {
"kind" : "Identifier",
"location" : [ 75, 1, 75, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 75, 7, 75, 27 ],
"left" : {
"kind" : "IndexExpr",
"location" : [ 75, 7, 75, 16 ],
"list" : {
"kind" : "IndexExpr",
"location" : [ 75, 7, 75, 13 ],
"list" : {
"kind" : "IndexExpr",
"location" : [ 75, 7, 75, 10 ],
"list" : {
"kind" : "Identifier",
"location" : [ 75, 7, 75, 7 ],
"name" : "a"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 9, 75, 9 ],
"value" : 0
}
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 12, 75, 12 ],
"value" : 0
}
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 15, 75, 15 ],
"value" : 1
}
},
"operator" : "*",
"right" : {
"kind" : "IndexExpr",
"location" : [ 75, 18, 75, 27 ],
"list" : {
"kind" : "IndexExpr",
"location" : [ 75, 18, 75, 24 ],
"list" : {
"kind" : "IndexExpr",
"location" : [ 75, 18, 75, 21 ],
"list" : {
"kind" : "Identifier",
"location" : [ 75, 18, 75, 18 ],
"name" : "a"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 20, 75, 20 ],
"value" : 1
}
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 23, 75, 23 ],
"value" : 1
}
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 75, 26, 75, 26 ],
"value" : 0
}
}
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 77, 1, 78, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 77, 1, 77, 16 ],
"name" : "multiline_string"
} ],
"value" : {
"kind" : "StringLiteral",
"location" : [ 77, 18, 78, 10 ],
"value" : "Hi World,\nHere I am"
}
}, {
"kind" : "AssignStmt",
"location" : [ 80, 1, 80, 34 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 80, 1, 80, 15 ],
"name" : "expr_precedence"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 80, 19, 80, 34 ],
"left" : {
"kind" : "UnaryExpr",
"location" : [ 80, 19, 80, 20 ],
"operator" : "-",
"operand" : {
"kind" : "Identifier",
"location" : [ 80, 20, 80, 20 ],
"name" : "a"
}
},
"operator" : "+",
"right" : {
"kind" : "BinaryExpr",
"location" : [ 80, 24, 80, 34 ],
"left" : {
"kind" : "Identifier",
"location" : [ 80, 24, 80, 24 ],
"name" : "b"
},
"operator" : "*",
"right" : {
"kind" : "BinaryExpr",
"location" : [ 80, 29, 80, 33 ],
"left" : {
"kind" : "Identifier",
"location" : [ 80, 29, 80, 29 ],
"name" : "c"
},
"operator" : "+",
"right" : {
"kind" : "Identifier",
"location" : [ 80, 33, 80, 33 ],
"name" : "d"
}
}
}
}
}, {
"kind" : "AssignStmt",
"location" : [ 82, 1, 82, 12 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 82, 1, 82, 5 ],
"name" : "stone"
} ],
"value" : {
"kind" : "StringLiteral",
"location" : [ 82, 7, 82, 12 ],
"value" : "Blue"
}
}, {
"kind" : "ExprStmt",
"location" : [ 83, 1, 83, 24 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 83, 1, 83, 24 ],
"function" : {
"kind" : "Identifier",
"location" : [ 83, 1, 83, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "CallExpr",
"location" : [ 83, 7, 83, 23 ],
"function" : {
"kind" : "Identifier",
"location" : [ 83, 7, 83, 16 ],
"name" : "get_stones"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 83, 18, 83, 22 ],
"name" : "stone"
} ]
} ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}