about summary refs log tree commit diff
path: root/tests/lang/eval-okay-curpos.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-18T19·14+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-18T19·16+0100
commitfc33fd86b7727365caab44c05a90d5b52209131b (patch)
treeba12d5e943e0e3b0d9aa5a9e25f1fa784dc369f0 /tests/lang/eval-okay-curpos.nix
parent90b5e692846d9b7a951155c5ed4fc7cf72b08e31 (diff)
Add a symbol __curPos that expands to the current source location
I.e. an attribute set { file = <string>; line = <int>; column = <int>; }.
Diffstat (limited to 'tests/lang/eval-okay-curpos.nix')
-rw-r--r--tests/lang/eval-okay-curpos.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-curpos.nix b/tests/lang/eval-okay-curpos.nix
new file mode 100644
index 000000000000..b79553df0bd3
--- /dev/null
+++ b/tests/lang/eval-okay-curpos.nix
@@ -0,0 +1,5 @@
+# Bla
+let
+  x = __curPos;
+    y = __curPos;
+in [ x.line x.column y.line y.column ]