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:
@@ -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()),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user