GNOME Bugzilla – Bug 748468
[Genie] Dedent should not be highlighted as a keyword in error messages
Last modified: 2018-05-22 15:23:18 UTC
Created attachment 302349 [details] [review] Patch to change error text for indent and dedent tokens These are two simple patches to clean up some small details of error messages given by the Genie parser. The aim is to make Genie give more meaningful error messages and appear more polished. With the following Genie code: [indent=2] init print "test" print "missing indent" the error message "syntax error, expected declaration but got `print' with previous `dedent'" is produced. It is the convention that keywords and operators are quoted. Dedent is not a keyword or operator so should not be quoted. Other whitespace tokens such as end of file and end of line are not surrounded by quote marks. The first patch changes "`dedent'" to read "end of block (dedent)". Also indent is changed from "`tab indent'" to "block (indent)". Indentation is strictly speaking not just tabs. The patch also re-words the syntax error to remove the word "previous". For the error above it reads "syntax error, expected a declaration after end of block (dedent), but got `print'" The second patch changes the back tick and single quote for keywords and operators to a single quote at the beginning and end. This is purely cosmetic, but see http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html for a rationale.
Created attachment 302350 [details] [review] Make text quoted for tokens be two single quotes instead of back tick and single quote
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/497.