mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
12 lines
449 B
Nim
12 lines
449 B
Nim
## helpers used system.nim and other modules, avoids code duplication while
|
|
## also minimizing symbols exposed in system.nim
|
|
#
|
|
# TODO: move other things here that should not be exposed in system.nim
|
|
|
|
proc lineInfoToString(file: string, line, column: int): string =
|
|
file & "(" & $line & ", " & $column & ")"
|
|
|
|
proc `$`(info: type(instantiationInfo(0))): string =
|
|
# The +1 is needed here
|
|
lineInfoToString(info.fileName, info.line, info.column+1)
|