refactor: implemented labelAndExplain(), combining label and explain, and... #9

Merged
gc1523 merged 18 commits from error-messages into master 2025-02-06 20:30:26 +00:00
2 changed files with 114 additions and 25 deletions
Showing only changes of commit bd779931b6 - Show all commits

View File

@@ -30,7 +30,8 @@ object parser {
labelWithType(t).explain(
"a valid expression can start with: null, literals, identifiers, unary operators, or parentheses. " +
"Expressions can also contain array indexing and binary operators. " +
"Pair extraction is not allowed in expressions, only in assignments.")
"Pair extraction is not allowed in expressions, only in assignments."
)
case _ => labelWithType(t)
}
}