docs: update type terminology from Int/Float/String/Bool to Number/Decimal/Text/Boolean

This commit is contained in:
2026-02-14 15:35:41 +00:00
parent ea83433e93
commit 45fd3b52cb
8 changed files with 46 additions and 32 deletions

View File

@@ -25,7 +25,7 @@ Expressions are logical statements that evaluate to `true` or `false`. They comb
| <quantifier>
| "(" <expression> ")"
<literal> ::= <int> | <float> | <string> | <bool>
<literal> ::= <number> | <decimal> | <text> | <boolean>
<identifier> ::= <simple-name>
| <qualified-path>
@@ -117,7 +117,7 @@ status == active
**Type compatibility:**
- Both operands must be the same type
- Works with: int, float, string, bool, enum values
- Works with: number, decimal, text, boolean, enum values
### Inequality: `!=`
@@ -139,7 +139,7 @@ age < 18
distance < 10.0
```
**Valid types:** int, float
**Valid types:** number, decimal
### Less Than or Equal: `<=`
@@ -459,15 +459,15 @@ Comparisons require compatible types:
| Operator | Left Type | Right Type | Valid? |
|----------|-----------|------------|--------|
| `==`, `!=` | int | int | ✓ |
| `==`, `!=` | float | float | ✓ |
| `==`, `!=` | string | string | ✓ |
| `==`, `!=` | bool | bool | ✓ |
| `==`, `!=` | number | number | ✓ |
| `==`, `!=` | decimal | decimal | ✓ |
| `==`, `!=` | text | text | ✓ |
| `==`, `!=` | boolean | boolean | ✓ |
| `==`, `!=` | enum | same enum | ✓ |
| `==`, `!=` | int | float | ✗ |
| `<`, `<=`, `>`, `>=` | int | int | ✓ |
| `<`, `<=`, `>`, `>=` | float | float | ✓ |
| `<`, `<=`, `>`, `>=` | string | string | ✗ |
| `==`, `!=` | number | decimal | ✗ |
| `<`, `<=`, `>`, `>=` | number | number | ✓ |
| `<`, `<=`, `>`, `>=` | decimal | decimal | ✓ |
| `<`, `<=`, `>`, `>=` | text | text | ✗ |
### Implicit Coercion
@@ -475,8 +475,8 @@ Comparisons require compatible types:
**Error:**
```storybook
count == "5" // Error: int vs string
health < true // Error: int vs bool
count == "5" // Error: number vs text
health < true // Error: number vs boolean
```
**Correct:**