saulpw / aipl

Array-Inspired Pipeline Language
MIT License
119 stars 7 forks source link

AIPL line counts are off by one #64

Closed akamgm closed 1 year ago

akamgm commented 1 year ago

Easiest report case: create an aipl file with a single line and command, !abort. Running it will yield:

<Table [0 no cols] > -> python (line 1)
<Table [1 _0] <LazyRow row={'_': '...(35 bytes)> -> abort (line 2)
aborted 

I'm fairly certain that this is because !!python\n is prepended to the script input in the interpreter. There's the hacky fix of subtracting 1 from the line count, but it would be a lot nicer to update the parser to obviate the need for manually inserting the !!python.

saulpw commented 1 year ago

Thanks for reporting this, @akamgm ! I've made the hacky fix for now.