MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / EatWord

Method EatWord

LibLemon/src/lexer.cpp:22–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 }
21
22 bool BasicLexer::EatWord(const char* word){
23 size_t i = 0;
24 while(it < sv.end() && i < strlen(word)){
25 char c = *it++;
26
27 if(c == '\n'){
28 line++;
29 }
30
31 if(c != word[i]){
32 return false;
33 }
34
35 i++;
36 }
37
38 return true;
39 }
40
41 int BasicLexer::EatOne(char c){
42 assert(!End());

Callers

nothing calls this directly

Calls 2

strlenFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected