diagnostics for / and % used in expressions
we are deliberately not adding division and modulo operators, but people more used to software development might expect it. we can add a hint to the diagnostic that has a short motivation and hints at shift/bit-and respectively.
current diagnostics:
fn n() -> int<8> {
128/4
}
error: Unexpected `/`, expected `}`
┌─ main.spade:2:8
│
2 │ 128/4
│ ^ expected `}`
Error: aborting due to previous error
(that one is not very good at all)
fn n() -> int<8> {
128%2
}
error: Lexer error, unexpected symbol
┌─ main.spade:2:8
│
2 │ 128%2
│ ^
Error: aborting due to previous error
Edited by Gustav Sörnäs