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
@@ -16,6 +16,8 @@ fn register_constants(env: &Environment) {
// We register NaN as a value, not a function.
env.register_constant("NaN", StaticType::Float, Value::Float(f64::NAN));
env.register_constant("true", StaticType::Bool, Value::Bool(true));
env.register_constant("false", StaticType::Bool, Value::Bool(false));
}
fn register_arithmetic(env: &Environment) {