kjosib / booze-tools

Booze Tools will become the complete programming-language development workbench, all written in Python 3.9 (for now).
MIT License
14 stars 1 forks source link

Take a position on positions (and spans, and highlights, etc) #42

Closed kjosib closed 1 year ago

kjosib commented 2 years ago

Rather than making every application worry about every aspect of position tracking, the library should handle more of the job.

The next step is to define a standard Span type, a few supporting operations (including integration with failureprone::class SourceText), and some standard practices which go into a doc page. Longer term, perhaps a next generation of the system could do more automatically.

Implementation note: Things are probably simpler, faster, and more robust if spans are half-open ranges of positions rather than anchor-width pairs.

kjosib commented 1 year ago

The position on spans is the "slice" type.