tree * getStatement(token **tokenPtr,char *buffer) { assert((*tokenPtr)!=NULL); if ((*tokenPtr)->type==LCURLY) { (*tokenPtr)=nextToken((*tokenPtr),buffer,false); tree * exp = getExpList(tokenPtr,buffer); if (((*tokenPtr)==NULL) || (*tokenPtr)->type!=RCURLY) { printf("Syntax error... unbalanced curly braces... not enough right\n"); exit(1); } (*tokenPtr)=nextToken((*tokenPtr),buffer,false); return exp; } tree * asg=getAssignment(tokenPtr,buffer); if (asg!=NULL) return asg; asg = getWhile(tokenPtr,buffer); if (asg != NULL) return asg; tree * exp=getExpression(tokenPtr,buffer); if ((*tokenPtr)==NULL) return exp; if ((*tokenPtr)->type==EOS) return exp; printf("Syntax error... expected assignment or expression... found neither\n"); exit(1); }
const char * posix_error_exception::what() const noexcept { return ("Error occured - " + Logger::getPosixErrorDescription(getErrno()) + " - while " + getWhile()).c_str(); }
const char * info_exception::what() const noexcept { return ("Exception occured while " + getWhile()).c_str(); }