2 small fix

This commit is contained in:
Adrien Bouvais 2025-01-31 18:49:44 +01:00
parent b757e01b64
commit adf39be133
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ pub fn populate(self: *RelationMap, input: []const u8) ZipponError!void {
const member_end = if (input[pattern_start - 4] == '[') pattern_start - 6 else pattern_start - 5; // This should be ": {<|"
var member_start = member_end - 1;
while (input[member_start] != ' ') : (member_start -= 1) {}
while (input[member_start] != ' ' and input[member_start] != '[' and input[member_start] != '{') : (member_start -= 1) {}
member_start += 1;
if (!std.mem.eql(u8, input[member_start..member_end], self.member_name)) continue;

View File

@ -82,7 +82,7 @@ pub fn parseConditionValue(
token.loc.end,
);
} else {
return ConditionValue.initStr(self.toker.buffer[start_index..token.loc.end]);
return ConditionValue.initStr(self.toker.buffer[start_index + 1 .. token.loc.end - 1]); // Removing ''
},
.bool => if (token.tag != .bool_literal_true and token.tag != .bool_literal_false) {