refactor(ast): rename value types to Number/Decimal/Text/Boolean

Renamed AST value types for v0.3 naming convention:
- Value::Int -> Value::Number
- Value::Float -> Value::Decimal
- Value::String -> Value::Text
- Value::Bool -> Value::Boolean
- Expr::IntLit -> Expr::NumberLit
- Expr::FloatLit -> Expr::DecimalLit
- Expr::StringLit -> Expr::TextLit
- Expr::BoolLit -> Expr::BooleanLit

Updated all references across parser, resolver, validator, LSP,
query engine, tests, and editor.
This commit is contained in:
2026-02-14 14:03:21 +00:00
parent 8c3c380cfd
commit 8e4bdd3942
21 changed files with 188 additions and 188 deletions

View File

@@ -106,15 +106,15 @@ fn test_baker_family_field_values() {
let martha = project.find_character("Martha").unwrap();
// Martha sets age: 34 (overriding Person template range 0..100)
if let Some(storybook::syntax::ast::Value::Int(age)) = martha.fields.get("age") {
if let Some(storybook::syntax::ast::Value::Number(age)) = martha.fields.get("age") {
assert_eq!(*age, 34, "Martha's age should be 34");
} else {
panic!("age should be an Int");
panic!("age should be a Number");
}
// Martha sets specialty: "sourdough" (overriding Baker template default
// "bread")
if let Some(storybook::syntax::ast::Value::String(specialty)) = martha.fields.get("specialty") {
if let Some(storybook::syntax::ast::Value::Text(specialty)) = martha.fields.get("specialty") {
assert_eq!(
specialty, "sourdough",
"Martha's specialty should be sourdough"