src/fileparser/POVParser.cpp
/**
 * used to find the end of a POV block
 * @param iter the initial iter to search through
 * @param tokens tokens to scan
 * @return the index AFTER the closing bracket that ends the bloock
 */
used to find the end of a POV block
@param iter the initial iter to search through
@param tokens tokens to scan
@return the index AFTER the closing bracket that ends the bloock
used to find the end of a POV block @param iter the initial iter to search through @param tokens tokens to scan @return the index AFTER the closing bracket that ends the bloock
int exhaustBlock(int iter, const std::vector<std::string>& tokens, int initStack = 1)
{
    int bracketStack = initStack;
    while (iter < tokens.size() && bracketStack > 0)
    {
        if (tokens[iter] == "{")
            bracketStack++;
        else if (tokens[iter] == "}")
            bracketStack--;
        iter++;
    }
    if (iter > tokens.size() || bracketStack > 0)
        errorAndExit("Premature end in block");
    return iter;
}
int exhaustBlock ( int iter , const std :: vector < std :: string > & tokens , int initStack = 1 ) { int bracketStack = initStack ; while ( iter < tokens . size ( ) && bracketStack > 0 ) { if ( tokens [ iter ] == " " ) bracketStack ++ ; else if ( tokens [ iter ] == " " ) bracketStack -- ; iter ++ ; } if ( iter > tokens . size ( ) || bracketStack > 0 ) errorAndExit ( " " ) ; return iter ; }
used to find the end of a POV block
 @param iter the initial iter to search through
 @param tokens tokens to scan
 @return the index AFTER the closing bracket that ends the bloock
used to find the end of a POV block @param iter the initial iter to search through @param tokens tokens to scan @return the index AFTER the closing bracket that ends the bloock