7 std::vector<Struct> structs,
\r
8 std::vector<Function> funcs,
\r
9 std::vector<Variable> vars)
\r
16 std::vector<Struct> structs,
\r
17 std::vector<Function> funcs,
\r
18 std::vector<Variable> vars)
\r
20 vars.insert(vars.end(), f.parameters.begin(), f.parameters.end());
\r
21 vars.insert(vars.end(), f.body.variables.begin(), f.body.variables.end());
\r
22 for (auto s : f.body.statements) {
\r
23 if (!checkStmt(s, structs, funcs, vars))
\r
29 bool checkProgram(const Program & p)
\r
31 for (auto f : p.functions) {
\r
32 if (!checkFunction(f, p.structs, p.functions, p.variables))
\r
35 for (auto s : p.structs) {
\r
36 std::vector<Variable> vars = p.variables;
\r
37 for (auto v : s.members)
\r
39 for (auto f : s.methods) {
\r
40 if (!checkFunction(f, p.structs, p.functions, vars))
\r