[Issue 977] Expressions inside a struct or array initializer get wrong line number

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 1 19:02:39 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=977


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com
           Platform|x86                         |All
            Version|1.006                       |D1 & D2
            Summary|Wrong line number reported  |Expressions inside a struct
                   |for a missing comma in an   |or array initializer get
                   |array initializer within a  |wrong line number
                   |struct initializer          |
         OS/Version|Windows                     |All
           Severity|minor                       |major


--- Comment #2 from yebblies <yebblies at gmail.com> 2012-02-02 14:02:38 EST ---
This happens because the parser scans across the whole initializer to determine
if it's an expression or an initializer.  Because it's already lexed the whole
initializer, the lexer's loc points to the end, and this is what is assigned to
each expression.  Not sure how to solve this without re-lexing the initializer.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list