-
Notifications
You must be signed in to change notification settings - Fork 720
Open
Labels
Domain: Porting MetaMeta-level porting concernsMeta-level porting concerns
Description
Things are very weird with GetLineAndCharacterOfPosition
and its users.
GetLineAndCharacterOfPosition
returns col position in terms of rune count. This could be fine, but some callers assume that it's a byte offset and then break on non-ASCII code. Most callers don't notice this because they actually only want the line number.GetLineAndCharacterOfPosition
usesGetLineStarts
, but that uses line separators as defined by ECMAScript. This can be fine, but should really only be done for things like parsing and source maps. But, we have users of this in the language server, and the language server should be using the LSP definition of newlines (\n
,\r\n
,\r
).
We should redo these, likely renaming funcs or something to make it very obvious what each of them are actually doing.
See also:
weswigham
Metadata
Metadata
Assignees
Labels
Domain: Porting MetaMeta-level porting concernsMeta-level porting concerns