void compileCallSt(void) { eat(KW_CALL); eat(TK_IDENT); // TODO: check if the identifier is a declared procedure checkDeclaredProcedure(currentToken->string); compileArguments(); }
void compileCallSt(void) { Object* proc; eat(KW_CALL); eat(TK_IDENT); proc = checkDeclaredProcedure(currentToken->string); compileArguments(proc->procAttrs->paramList); }
void compileCallSt(void) { eat(KW_CALL); eat(TK_IDENT); // check if the identifier is a declared procedure Object *obj = checkDeclaredProcedure(currentToken->string); if (obj == NULL) error(ERR_UNDECLARED_PROCEDURE, currentToken->lineNo, currentToken->colNo); compileArguments(); }
void compileCallSt(void) { // TODO: generate call-statement Object* proc; eat(KW_CALL); eat(TK_IDENT); proc = checkDeclaredProcedure(currentToken->string); if (isPredefinedProcedure(proc)) { compileArguments(proc->procAttrs->paramList); genPredefinedProcedureCall(proc); } else { compileArguments(proc->procAttrs->paramList); } }
void compileCallSt(void) { // Generate code for call-statement // TEMPORARY. halt Object* proc; eat(KW_CALL); eat(TK_IDENT); proc = checkDeclaredProcedure(currentToken->string); if (isPredefinedProcedure(proc)) { compileArguments(proc->procAttrs->paramList); genPredefinedProcedureCall(proc); } else { compileArguments(proc->procAttrs->paramList); genHL();//codegen } }