pub const E0008_EXPECTED_EXPRESSION: ErrorCode;
Expand description
§E0008: An expression was expected but none was found
In Compose, many constructs require a valid expression — such as operands in arithmetic, the right-hand side of a let
binding, or the body of a block. This error occurs when the parser expects the start of an expression but finds an invalid token instead (such as a closing delimiter or a misplaced keyword).
§Example
let value = let
Error:
// autogenerated
✅ Fix:
let value = 1 + 2
This error is typically caused by:
- A missing operand (e.g., after a binary operator),
- An incomplete function call,
- A misplaced or unmatched delimiter,
- Or accidentally leaving an expression blank.
Make sure the syntax is complete and begins with a valid expression construct like a literal, identifier, operator, function call, or block.