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:
@@ -526,10 +526,10 @@ fn format_behavior_node_preview(node: &crate::syntax::ast::BehaviorNode, depth:
|
||||
fn format_value_as_type(value: &Value) -> String {
|
||||
match value {
|
||||
| Value::Identifier(path) => path.join("."),
|
||||
| Value::String(_) => "String".to_string(),
|
||||
| Value::Int(_) => "Int".to_string(),
|
||||
| Value::Float(_) => "Float".to_string(),
|
||||
| Value::Bool(_) => "Bool".to_string(),
|
||||
| Value::Text(_) => "Text".to_string(),
|
||||
| Value::Number(_) => "Number".to_string(),
|
||||
| Value::Decimal(_) => "Decimal".to_string(),
|
||||
| Value::Boolean(_) => "Boolean".to_string(),
|
||||
| Value::List(items) => {
|
||||
if items.is_empty() {
|
||||
"List".to_string()
|
||||
@@ -557,10 +557,10 @@ fn format_value_as_type(value: &Value) -> String {
|
||||
fn format_value_preview(value: &Value) -> String {
|
||||
match value {
|
||||
| Value::Identifier(path) => format!("`{}`", path.join(".")),
|
||||
| Value::String(s) => format!("\"{}\"", truncate(s, 50)),
|
||||
| Value::Int(n) => n.to_string(),
|
||||
| Value::Float(f) => f.to_string(),
|
||||
| Value::Bool(b) => b.to_string(),
|
||||
| Value::Text(s) => format!("\"{}\"", truncate(s, 50)),
|
||||
| Value::Number(n) => n.to_string(),
|
||||
| Value::Decimal(f) => f.to_string(),
|
||||
| Value::Boolean(b) => b.to_string(),
|
||||
| Value::List(items) => {
|
||||
if items.is_empty() {
|
||||
"[]".to_string()
|
||||
|
||||
Reference in New Issue
Block a user