E1010: lexical
E1010 lexical — a character, string or number the lexer cannot read.
A compile-time error of soma check, the checker of the Soma programming language (soma explain E1010).
The rule
E1010 is a lexer error: a character, string or number that Soma cannot read at all, such as a ;, a single-quoted string or a backtick. Soma has no semicolons; statements are separated by newlines, and soma check adds that hint for ;. Delete the semicolon.
A program that triggers it
wrong.cell
cell Invoice {
on total(amount: Int, tax: Int) {
let sum = amount + tax;
return sum
}
}What soma check prints:
$ soma check wrong.cell
error: unexpected character ';'
--> wrong.cell:3:31
|
3 | let sum = amount + tax;
| ^
hint: Soma has no semicolons — one statement per line
= code: E1010The fix
On line 3, let sum = amount + tax; becomes let sum = amount + tax.
wrong.cell → right.cell
--- wrong.cell
+++ right.cell
@@ -1,5 +1,5 @@
cell Invoice {
on total(amount: Int, tax: Int) {
- let sum = amount + tax;
+ let sum = amount + tax
return sum
}With the fix, soma check accepts the program:
$ soma check right.cell
✓ All checks passed.