MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / Parse

Method Parse

LuaParser/src/Lexer/LuaLexer.cpp:53–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool LuaLexer::Parse() {
54 _file->Reset();
55 while (true) {
56 auto type = Lex();
57 if (type == TK_EOF) {
58 break;
59 }
60
61 _tokens.emplace_back(type, _reader.GetTokenRange());
62 if (!_errors.empty()) {
63 _file->SetTotalLine(_linenumber);
64 _file->UpdateLineInfo(_linenumber);
65 return false;
66 }
67 }
68
69 _file->SetTotalLine(_linenumber);
70 return true;
71}
72
73std::vector<LuaTokenError> &LuaLexer::GetErrors() {
74 return _errors;

Callers

nothing calls this directly

Calls 5

SetTotalLineMethod · 0.80
UpdateLineInfoMethod · 0.80
ResetMethod · 0.45
GetTokenRangeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected