dfintha / exprparser

Very basic expression parser written in C++.
0 stars 0 forks source link

Correctly track and propagate source location #4

Closed dfintha closed 4 months ago

dfintha commented 4 months ago

Right now, most errors are said to be at index 0 (except for tokenizer errors).

  1. Tokens shall track the start and the end of their corresponding lexemes.
  2. Nodes shall also track these "source locations".
  3. Built-in function shall receive the source location as a parameter. This should be simple, the function arguments are passed in a std::vector

The code currently has TODO comments to mark locations where source locations should be propagated, but we can't do so with the current architecture.