nirum
nirum copied to clipboard
Useful error message on using docs and @docs annotation at a time
Continued from #53 and #57.
If an IDL code uses docs syntax and @docs annotation for the same declaration at a time it currently doesn't provide any useful error message but simply <duplicated>. E.g.:
@docs ("a")
record x (
# b
text y
);
We should provide more useful error message so that uses can recognize they use both notations at a time and it's disallowed by grammar.
I think something like this might work, but currently cannot be sure if it's okay solution or not as I couldn't reproduce the error with provided example. Maybe we should open another issue for that?