An open API service indexing awesome lists of open source software.

https://github.com/filipporanza/extract_line_error

convert char indexes to line indexes
https://github.com/filipporanza/extract_line_error

rust rust-library rustlang string-library string-manipulation

Last synced: about 1 month ago
JSON representation

convert char indexes to line indexes

Awesome Lists containing this project

README

        

# extract_line_error
convert char indexes to line indexes

Suppose that you are writing a compiler and that where you parser generator finds a syntax error returns a couple of indexes (namely where the error begins
and where the error ends) pointing to the *n*-th and *m*-th character in the code.
This library converts those indexes in a couple of line indexs (namely the line where the error begins and the line where the error ends) in a human readable
format.