This commit is contained in:
SinusFox
2023-05-15 15:08:14 +02:00
parent f3bdab2b5d
commit ab399b12fa
+5 -3
View File
@@ -1,10 +1,12 @@
#include "Lexer.h" #include "Lexer.h"
int start(char* src) { int start(char* src) {
if (src != 0 && src != '\0') { // checking if the string is empty or invalid if (src != 0) { // checking if the string is invalid
return _GET_NEXT_CHARACTER_; if (*src != '\0') { // checking if the string is empty
return _GET_NEXT_CHARACTER_; // if src is valid: continueing the state machine
}
} }
return _STOP_; return _STOP_; // stopping the state machine in any other case
} }
int getNextCharacter(char* src) { int getNextCharacter(char* src) {