goawk icon indicating copy to clipboard operation
goawk copied to clipboard

Draft version of FileReader

Open benhoyt opened this issue 2 years ago • 0 comments

This implements a simple FileReader type that tracks files added to it with AddFile() and their number of source lines, and then lets you look up which file and file-line number a particular overall line number belongs to with FileLine().

It allows us to do away with errorFileLine and look up lines simply, without altering the parser or being invasive in that code.

Just a draft for comparing approaches. Needs comments and tests.

benhoyt avatar Sep 21 '22 08:09 benhoyt