Eve
Eve copied to clipboard
Need better error message for bare values missing an attribute
commit
[#foo 101]
gets Expecting token of type --> Equality <-- but found --> ']' <--
However, you can do this
search
i = 101
commit
[#foo i]
The error message could probably be more insightful, but the error is genuine, and this is not a bug.
Your first code block does not define a valid Eve record. Records must consist of attributes, which are assigned one or more values. You cannot put a value like 101 directly into a record.
Why does the second block work then? It's because when you use "i" in the record, you are creating an "i" attribute, which will have the value 101. It's equivalent to writing:
commit
[#foo i: 101]
Ok, now I understand. Thanks for the clarification!
Even though your issue is solved, I'll leave it open to track the error message fix.