Do GScanner symbols have to be identifiers?



Hello,

I'm trying to parse code using GLib's GScanner. I added a symbol ":=", but it is not reported as a G_TOKEN_SYMBOL but instead as G_TOKEN_CHARs.
From looking at GLib's source code, it seems to me that only identifiers
can be symbols, and since ":=" contains characters that may not appear in identifiers as I defined them, ":=" is not reported as a symbol when parsing.

Am I correct in that symbols have to be well-formed identifiers to be reported as a G_TOKEN_SYMBOL? This does not become clear from the GLib documentation. Should I open a bug report for this? Is parsing the G_TOKEN_CHARs ":" and "=" the proper way to recognize a := operator?

Florian Pelz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]