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
- Host: GitHub
- URL: https://github.com/filipporanza/extract_line_error
- Owner: FilippoRanza
- License: mit
- Created: 2021-02-12T16:24:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-12T16:55:01.000Z (over 4 years ago)
- Last Synced: 2025-04-14T22:56:30.601Z (about 1 month ago)
- Topics: rust, rust-library, rustlang, string-library, string-manipulation
- Language: Rust
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# extract_line_error
convert char indexes to line indexesSuppose 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.