Fix: Parse boolean literals as identifiers

Boolean literals `true` and `false` are now parsed as identifiers,
matching the behavior of other constants like `NaN`. This change aligns
the AST representation of boolean literals with their runtime constants.
This commit is contained in:
Michael Schimmel
2026-02-19 13:56:49 +01:00
parent 07bf59eb47
commit 125cf039d5
3 changed files with 5 additions and 5 deletions
-2
View File
@@ -92,8 +92,6 @@ impl<'a> Parser<'a> {
TokenKind::Identifier(id) => {
match id.as_ref() {
"..." => UntypedKind::Nop,
"true" => UntypedKind::Constant(Value::Bool(true)),
"false" => UntypedKind::Constant(Value::Bool(false)),
"void" => UntypedKind::Constant(Value::Void),
_ => UntypedKind::Identifier(id.into()),
}