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 643157 - parameter attributes failing
parameter attributes failing
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Genie
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Jamie McCracken
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-24 02:00 UTC by Arc Riley
Modified: 2011-02-27 23:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
param-attrib.bundle (722 bytes, patch)
2011-02-24 02:01 UTC, Arc Riley
none Details | Review
0001-Removed-requirement-for-EOL-after-a-parameter-attrib.patch (2.72 KB, patch)
2011-02-24 13:52 UTC, Arc Riley
none Details | Review

Description Arc Riley 2011-02-24 02:00:32 UTC
My guess is this bug was born when multiline parameters were introduced, but regardless to how long its gone unnoticed the following code does not work:

def new Write (stream : NP.Stream, offset : int32,
                           [CCode(array_length_pos=0.9)]
                           buffer :  array of char) : int32

Reports this error:
error: syntax error, expected end of line but got identifier with previous `]'

It appears that EOL's in parameter blocks are being eaten on a higher level, and thus the end of the parse_attributes function in never finds the requisite EOL.

Attached is a git bundle (1 changeset) that fixes this and expands Genie syntax to also allow attribute blocks inline with parameters as well as on separate lines as before.
Comment 1 Arc Riley 2011-02-24 02:01:04 UTC
Created attachment 181786 [details] [review]
param-attrib.bundle
Comment 2 Arc Riley 2011-02-24 13:52:00 UTC
Created attachment 181827 [details] [review]
0001-Removed-requirement-for-EOL-after-a-parameter-attrib.patch
Comment 3 Jamie McCracken 2011-02-27 23:52:46 UTC
thanks have now applied to master