You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goal: type safety, self documenting, avoid off by 1 bugs (compiler uses multiple conventions interchangeably which has been source of off by 1 bugs when dealing with line numbers, columns etc)
plausible implementation
internally represent line numbers as starting from 0
timotheecour
changed the title
type OneBasedIndex = distinct int for line numbers etc that start at 1
introduce Location type for line/col (maybe also type OneBasedIndex = distinct int for line numbers etc that start at 1)
Mar 12, 2021
refs nim-lang#17257 (comment)
goal: type safety, self documenting, avoid off by 1 bugs (compiler uses multiple conventions interchangeably which has been source of off by 1 bugs when dealing with line numbers, columns etc)
plausible implementation
toLocation
, add +1, eg:The text was updated successfully, but these errors were encountered: