Replies: 3 comments
-
Yes. I haven't gotten to adding this yet, but will do so soon enough.
MLIR uses
I see your point about using a file-id rather than the filename string everywhere. That's more efficient, given that our attributes aren't uniqued.
I see your point about using an |
Beta Was this translation helpful? Give feedback.
-
Ok, I looked into |
Beta Was this translation helpful? Give feedback.
-
Implemented with 4b52e76. Closing. |
Beta Was this translation helpful? Give feedback.
-
Appending location information can help with error reporting.
I suggest using the form of file-id + start-offset
For reference, MILR uses string + row + column, but I don't like this format.
First of all, there are a large number of definitions in a file, just use id to index and share them.
The column format actually requires that the internal encoding and the external encoding are the same, otherwise they will be misaligned.
For example, many rust libraries use utf8 columns, but the lsp uses utf16 columns, which will cause inaccurate positioning.
I have been troubled by this problem for a long time.
The byte displacement is independent of encoding and can even act on unknown encodings.
Overall, better results can be achieved with a smaller size.
Beta Was this translation helpful? Give feedback.
All reactions