int CompilerMain::FindVariableIndexInTable(YYSTYPE idName) { SymbolTable * cScope; cScope = currentScope; int index; while(cScope!=NULL) { index = cScope->FindVariableIndexInTable(QString::fromStdString(idName)); if(index!=-1) return index; cScope = cScope->parent; } return -1; }