Skip to content
Snippets Groups Projects
Commit f825993a authored by Christopher Tam's avatar Christopher Tam Committed by CQ bot account: commit-bot@chromium.org
Browse files

[fidlc] Fix error reporting on line/file bounds

This change brings in fixes for how the fidlc front-end handles
spans and source context, especially on the boundaries of a line or
file. This is the underlying cause of FIDL-583.

In more detail, this change:
  * Enables proper pretty printing of start-of-file, start-of-line,
    end-of-line, and end-of-file spans.
  * Fixes a bug in the line-splitting logic of the internal compiler
    SourceFile representation.
  * Adds unit tests to cover empty file and unexpected EOF token cases.

FIDL-583 #done

Test: Add new unit tests to cover the cases being fixed. Run old tests
to make sure nothing is broken by this.

Change-Id: I4a23916a6264df9b0ebced6764e3f9a573793a19
parent a708b147
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment