On 01/30/2014 02:24 PM, Carl Worth wrote: > Matt Turner <matts...@gmail.com> writes: >> + if (parser->version_resolved) { >> + glcpp_error(& @1, parser, "#version after >> version is resolved"); > > The phrasing "after version is resolved" makes a lot of sense from the > point-of-view of the implementation, but it's not ideal for guiding the > user to a solution. > > Perhaps better would be something like: > > #version must be on first line > > You might come up with better wording, still. I don't know if it's worth > trying to clarify that comment lines or blank lines can appear before > #version. > > It would also be possible to distinguish a separate "Duplicate #version" > error case, but that would require additional state in the parser so is > likely not worth it. And the "first line" wording should guide the user > appropriately even if there are duplicate #version directives. > > Regardless of the specific wording finally chosen: > > Reviewed-by: Carl Worth <cwo...@cworth.org> > > -Carl
I do agree with Carl - "#version after version is resolved" isn't very clear for the application author, and that's who these messages are for. "#version must be on first line" seems pretty clear. I suppose you could add "(ignoring comments)" or the like, but either way, it's a nicer message IMHO.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev