This commit is contained in:
gingerBill
2023-06-07 13:08:15 +01:00
parent 9941ec85d8
commit 349641e95f
2 changed files with 5 additions and 4 deletions

View File

@@ -666,7 +666,11 @@ gb_internal ExactValue exact_value_from_token(AstFile *f, Token const &token) {
}
break;
}
return exact_value_from_basic_literal(token.kind, s);
ExactValue value = exact_value_from_basic_literal(token.kind, s);
if (value.kind == ExactValue_Invalid) {
syntax_error(token, "Invalid token literal");
}
return value;
}
gb_internal String string_value_from_token(AstFile *f, Token const &token) {