{ "Script": { "statements": [ { "ClassDeclaration": { "modifiers": 10, "name": "Foobar", "inherits": [], "statements": [ { "Var": { "modifier": 0, "var_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "identifier": "_a", "assignment": null } }, { "Var": { "modifier": 0, "var_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "identifier": "_b", "assignment": null } }, { "FuncDeclaration": { "modifiers": 0, "field_mod": null, "is_destructor": false, "is_constructor": true, "returns_reference": false, "return_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypeIdentifier": { "identifier": "Foobar" } }, "modifiers": [] } }, "name": "Foobar", "param_list": { "ParamList": { "parameters": [ { "parameter_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "type_mod": null, "identifier": "a", "default": null }, { "parameter_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "type_mod": null, "identifier": "b", "default": null } ] } }, "is_const": false, "func_attr": 0, "block": { "StatBlock": { "statements": [ { "Assignment": { "left": { "VarAccess": { "scope": null, "identifier": "_a" } }, "operator": "Assignment", "right": { "VarAccess": { "scope": null, "identifier": "a" } } } }, { "Assignment": { "left": { "VarAccess": { "scope": null, "identifier": "_b" } }, "operator": "Assignment", "right": { "VarAccess": { "scope": null, "identifier": "b" } } } } ] } } } }, { "FuncDeclaration": { "modifiers": 0, "field_mod": null, "is_destructor": false, "is_constructor": false, "returns_reference": false, "return_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "name": "GetA", "param_list": { "ParamList": { "parameters": [] } }, "is_const": false, "func_attr": 0, "block": { "StatBlock": { "statements": [ { "ReturnStatement": { "expression": { "VarAccess": { "scope": null, "identifier": "_a" } } } } ] } } } }, { "FuncDeclaration": { "modifiers": 0, "field_mod": null, "is_destructor": false, "is_constructor": false, "returns_reference": false, "return_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "name": "Add", "param_list": { "ParamList": { "parameters": [] } }, "is_const": false, "func_attr": 0, "block": { "StatBlock": { "statements": [ { "ReturnStatement": { "expression": { "BinaryExpr": { "left": { "VarAccess": { "scope": null, "identifier": "_a" } }, "operator": "Addition", "right": { "VarAccess": { "scope": null, "identifier": "_b" } } } } } } ] } } } }, { "ClassDeclaration": { "modifiers": 0, "name": "Inner", "inherits": [], "statements": [ { "Var": { "modifier": 0, "var_type": { "Type": { "is_const": false, "scope": null, "datatype": { "DataTypePrimType": { "prim_type": "Int32" } }, "modifiers": [] } }, "identifier": "a", "assignment": null } } ] } } ] } } ] } }