about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.cc
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 /src/libexpr/nixexpr.cc
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 'src/libexpr/nixexpr.cc')
-rw-r--r--src/libexpr/nixexpr.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index d52f7eadbb..f4b4295e29 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -130,6 +130,11 @@ void ExprConcatStrings::show(std::ostream & str)
     }
 }
 
+void ExprPos::show(std::ostream & str)
+{
+    str << "__curPos";
+}
+
 
 std::ostream & operator << (std::ostream & str, const Pos & pos)
 {
@@ -315,6 +320,10 @@ void ExprConcatStrings::bindVars(const StaticEnv & env)
         (*i)->bindVars(env);
 }
 
+void ExprPos::bindVars(const StaticEnv & env)
+{
+}
+
 
 /* Storing function names. */