EvalCommandsLineByLine

This commit is contained in:
Krzosa Karol
2025-12-31 12:45:28 +01:00
parent b40873d54c
commit edafe05b5b
2 changed files with 47 additions and 9 deletions

View File

@@ -474,6 +474,16 @@ String16 SkipIdent(String16 *string) {
return begin;
}
bool MatchIdent(String16 *string, String16 expect) {
String16 copy = *string;
String16 ident = SkipIdent(&copy);
if (ident == expect) {
*string = copy;
return true;
}
return false;
}
API bool Chop(String16 *string, String16 ending) {
if (EndsWith(*string, ending)) {
*string = Chop(*string, ending.len);