SetWorkDirAt, OpenCodeAt, fix bug there, fill more doc strings

This commit is contained in:
Krzosa Karol
2026-01-02 19:57:53 +01:00
parent 215dd4a03f
commit 1767b2767e
5 changed files with 83 additions and 37 deletions

View File

@@ -479,6 +479,22 @@ String16 SkipIdent(String16 *string) {
return begin;
}
String16 SkipString(String16 *string) {
String16 saved_string = *string;
char16_t c = At(*string, 0);
String16 q = {&c, 1};
if (c == u'"' || c == u'\'') {
*string = Skip(*string, 1);
String16 quote = SkipUntil(string, q);
if (At(*string, 0) != c) {
*string = saved_string;
return {};
}
return quote;
}
return {};
}
bool MatchIdent(String16 *string, String16 expect) {
String16 copy = *string;
String16 ident = SkipIdent(&copy);