Nicholas Nethercote
226edf64fa
Improve an error involving attribute values.
...
Attribute values must be literals. The error you get when that doesn't
hold is pretty bad, e.g.:
```
unexpected expression: 1 + 1
```
You also get the same error if the attribute value is a literal, but an
invalid literal, e.g.:
```
unexpected expression: "foo"suffix
```
This commit does two things.
- Changes the error message to "attribute value must be a literal",
which gives a better idea of what the problem is and how to fix it. It
also no longer prints the invalid expression, because the carets below
highlight it anyway.
- Separates the "not a literal" case from the "invalid literal" case.
Which means invalid literals now get the specific error at the literal
level, rather than at the attribute level.
2023-12-12 15:54:25 +11:00
..
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-03 21:21:02 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-08-01 23:30:40 +08:00
2023-11-24 19:15:52 +01:00
2023-08-01 23:30:40 +08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-03 12:25:46 +01:00
2023-12-03 12:25:46 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-12 21:50:18 +00:00
2023-10-12 21:50:18 +00:00
2023-11-24 19:15:52 +01:00
2023-05-02 22:36:24 +00:00
2023-05-02 22:36:24 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-05-01 16:15:13 +08:00
2023-05-01 16:15:13 +08:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-09-06 09:05:07 +05:30
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-05-01 16:15:13 +08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-28 23:11:03 -07:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-03 21:21:02 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-04-28 11:56:02 +00:00
2023-09-06 09:05:07 +05:30
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-16 16:58:41 +00:00
2023-03-12 13:19:46 +00:00
2023-11-24 19:15:52 +01:00
2023-05-02 22:36:24 +00:00
2023-05-02 22:36:24 +00:00
2023-05-02 22:36:24 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-29 18:47:32 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-08-15 01:03:09 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-05 01:04:41 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-03 21:21:02 +00:00
2023-10-03 21:21:02 +00:00
2023-10-03 21:21:02 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-05-01 16:15:13 +08:00
2023-05-01 16:15:13 +08:00
2023-11-24 19:15:52 +01:00
2023-09-21 23:20:47 +08:00
2023-11-24 19:15:52 +01:00
2023-09-21 23:20:47 +08:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-12-12 15:54:25 +11:00
2023-12-12 15:54:25 +11:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-11-01 14:48:20 +00:00
2023-11-01 14:48:20 +00:00
2023-11-01 14:48:20 +00:00
2023-11-01 15:33:46 +00:00
2023-11-01 15:33:46 +00:00
2023-11-24 19:15:52 +01:00
2023-03-05 14:23:43 +01:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-04-07 08:54:13 +12:00
2023-04-07 08:54:13 +12:00
2023-05-13 00:33:27 +08:00
2023-11-24 19:15:52 +01:00
2023-05-13 19:40:17 +08:00
2023-11-24 19:15:52 +01:00
2023-06-10 06:28:35 +08:00
2023-06-10 06:28:35 +08:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-10-24 21:27:05 +00:00
2023-06-11 14:36:20 +08:00
2023-06-11 14:36:20 +08:00
2023-09-06 09:05:07 +05:30
2023-11-24 19:15:52 +01:00
2023-08-07 22:40:09 +08:00
2023-11-24 19:15:52 +01:00
2023-10-24 21:27:05 +00:00
2023-11-24 19:15:52 +01:00
2023-07-31 11:04:28 +08:00
2023-11-24 19:15:52 +01:00
2023-09-12 16:38:59 +02:00
2023-12-02 23:47:39 +08:00
2023-12-02 23:47:39 +08:00
2023-12-02 23:47:39 +08:00
2023-12-02 23:47:39 +08:00
2023-11-14 00:46:37 +00:00
2023-11-14 00:46:37 +00:00
2023-11-14 00:46:37 +00:00