Error message: I was expecting...
The generic error message
ERROR: I was expecting an identifier by found "weights"
should be improved, e.g. to explain why
weightsis unsuitable (because it's a keyword).
#1 Updated by John Abbott about 3 years ago
- Estimated time set to 3.00 h
The relevant source code is
- starts with a letter --> keyword or identifier
- starts with a digit --> number
- starts with double quote --> string (literal)
- otherwise symbol/operator
#2 Updated by John Abbott over 2 years ago
The original report did not contain an example of input which produces the unhelpful error message. I think the following illustrates the problem:
record[for := 1];
Curiously, this input evidently confuses the parser because it produces two very similar error messages -- probably not worth fixing.