• Robert Griesemer's avatar
    go/scanner: report errors for incorrect line directives · 546bab8c
    Robert Griesemer authored
    Based on decision for #24183. This makes the go/scanner behavior
    match cmd/compile behavior. Adjusted a go/printer test that assumed
    silent behavior for invalid line directive, and added more scanner
    tests verifying the correct error position and message for invalid
    line directives.
    
    The filenames in line directives now remain untouched by the scanner;
    there is no cleanup or conversion of relative into absolute paths
    anymore, in sync with what the compiler's scanner/parser are doing.
    Any kind of filename transformation has to be done by a client. This
    makes the scanner code simpler and also more predictable.
    
    For #24183.
    
    Change-Id: Ia091548e1d3d89dfdf6e7d82dab50bea05742ce3
    Reviewed-on: https://go-review.googlesource.com/100235
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    546bab8c
Name
Last commit
Last update
..
errors.go Loading commit data...
example_test.go Loading commit data...
scanner.go Loading commit data...
scanner_test.go Loading commit data...