lucid-crystal / compiler

MIT License
4 stars 2 forks source link

Rework Locations #30

Open devnote-dev opened 4 days ago

devnote-dev commented 4 days ago

Currently, Location information is stored as a static array in the format start_line:end_line-start_column:end_column. I clearly wasn't in a right state of mind to be using this format; to make things worse, it doesn't even work properly.

I propose switching to start_line:start_column-end_line:end_column and integrating location specs into current specs where appropriate (no point in adding location coverage for most literals).

nobodywasishere commented 4 days ago

Thoughts on having Point (line - col) and then Location being two points? This is what VS Code and LSP use

devnote-dev commented 4 days ago

Are there any benefits to this over using a static array?

nobodywasishere commented 4 days ago

Don't think so, at least none off the top of my head