• Matthew Dempsky's avatar
    cmd/compile: fix contrived line number errors · af558acc
    Matthew Dempsky authored
    If a general comment contains multiple newline characters, we can't
    simply unread one and then re-lex it via the general whitespace lexing
    phase, because then we'll reset lineno to the line before the "*/"
    marker, rather than keeping it where we found the "/*" marker.
    
    Also, for processing imports, call importfile before advancing the
    lexer with p.next(), so that lineno reflects the line where we found
    the import path, and not the token afterwards.
    
    Fixes #14520.
    
    Change-Id: I785a2d83d632280113d4b757de0d57c88ba2caf4
    Reviewed-on: https://go-review.googlesource.com/19934Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    af558acc
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...