about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.hh
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.hh
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.hh')
-rw-r--r--src/libexpr/nixexpr.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index 8336a48f42..61eb81fab1 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -282,6 +282,13 @@ struct ExprConcatStrings : Expr
     COMMON_METHODS
 };
 
+struct ExprPos : Expr
+{
+    Pos pos;
+    ExprPos(const Pos & pos) : pos(pos) { };
+    COMMON_METHODS
+};
+
 
 /* Static environments are used to map variable names onto (level,
    displacement) pairs used to obtain the value of the variable at