void parse(Tokens& tokens) { while (!tokens.done()) { auto token = tokens.next(); auto c = Commands.find(token); if (c != Commands.end()) c->second(tokens); else { std::cout << "Unable to find PBRT command: " << token << std::endl; } } }