chainlint: latch line numbers at which each token starts and ends
commitbf42f0a030da98dd02bb95109121c24ed3684ac8
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 11 Nov 2022 07:34:53 +0000 (11 07:34 +0000)
committerTaylor Blau <me@ttaylorr.com>
Fri, 11 Nov 2022 21:56:21 +0000 (11 16:56 -0500)
tree2c55c398450de62687bdd6d5fa58eaecc40da0c7
parent5451877f87f8c0c820dd8605e03cb00ea794ca89
chainlint: latch line numbers at which each token starts and ends

When chainlint detects problems in a test, it prints out the name of the
test script, the name of the problematic test, and a copy of the test
definition with "?!FOO?!" annotations inserted at the locations where
problems were detected. Taken together this information is sufficient
for the test author to identify the problematic code in the original
test definition. However, in a lengthy script or a lengthy test
definition, the author may still end up using the editor's search
feature to home in on the exact problem location.

To further assist the test author, an upcoming change will display line
numbers along with the annotated test definition, thus allowing the
author to jump directly to each problematic line. As preparation,
upgrade Lexer to latch the line numbers at which each token starts and
ends, and return that information with the token itself.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
t/chainlint.pl