示例#1
0
文件: Main.cpp 项目: longshadian/estl
void testAllToken(idLexer& lexer)
{
    idToken token{};
    while (!lexer.EndOfToken()) {
        token.Reset();
        if (lexer.GetToken(&token)) {
            LOG(debug) << "token: " << token.AsTypeStringView() << "\t\t" << token.AsStringView();
        } else {
            LOG(warning) << "get token error line: " << lexer.Line();
            break;
        }
    }

    /*
    for (auto c : lexer.GetBuffer()) {
        std::cout << c;
    }
    std::cout << "\n";
    */
}