mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Add a symbol __curPos that expands to the current source location
I.e. an attribute set { file = <string>; line = <int>; column = <int>; }.
This commit is contained in:
parent
90b5e69284
commit
fc33fd86b7
7 changed files with 43 additions and 2 deletions
1
tests/lang/eval-okay-curpos.exp
Normal file
1
tests/lang/eval-okay-curpos.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ 3 7 4 9 ]
|
5
tests/lang/eval-okay-curpos.nix
Normal file
5
tests/lang/eval-okay-curpos.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Bla
|
||||
let
|
||||
x = __curPos;
|
||||
y = __curPos;
|
||||
in [ x.line x.column y.line y.column ]
|
Loading…
Add table
Add a link
Reference in a new issue