After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748468 - [Genie] Dedent should not be highlighted as a keyword in error messages
[Genie] Dedent should not be highlighted as a keyword in error messages
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Genie
0.28.x
Other All
: Normal enhancement
: ---
Assigned To: Jamie McCracken
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-25 20:36 UTC by Al Thomas
Modified: 2018-05-22 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to change error text for indent and dedent tokens (1.88 KB, patch)
2015-04-25 20:36 UTC, Al Thomas
none Details | Review
Make text quoted for tokens be two single quotes instead of back tick and single quote (9.78 KB, patch)
2015-04-25 20:38 UTC, Al Thomas
none Details | Review

Description Al Thomas 2015-04-25 20:36:33 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.
Comment 1 Al Thomas 2015-04-25 20:38:50 UTC
Created attachment 302350 [details] [review]
Make text quoted for tokens be two single quotes instead of back tick and single quote
Comment 2 GNOME Infrastructure Team 2018-05-22 15:23:18 UTC
-- 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.