Commit 9b1a7e7
authored
grammar tables: emit good error when missing an operand type (KhronosGroup#6145)
If a grammar change introduces a new optional operand kind,
then currently the error message is very unfriendly. It's a Python
dictionary key error, with a call stack.
With this change, we get a single friendly error line like this,
but all on one line:
error: unknown operand type SPV_OPERAND_TYPE_TENSOR_OPERANDS,
from JSON grammar operand 'TensorOperands':
consider updating spv_operand_type_t in spirv-tools/libspirv.h1 parent eac930c commit 9b1a7e7
1 file changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
432 | | - | |
433 | | - | |
434 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
435 | 445 | | |
436 | 446 | | |
437 | 447 | | |
| |||
955 | 965 | | |
956 | 966 | | |
957 | 967 | | |
958 | | - | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
0 commit comments