From fc33fd86b7727365caab44c05a90d5b52209131b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Nov 2013 20:14:54 +0100 Subject: Add a symbol __curPos that expands to the current source location I.e. an attribute set { file = ; line = ; column = ; }. --- src/libexpr/nixexpr.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libexpr/nixexpr.hh') diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index 8336a48f42fc..61eb81fab138 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 -- cgit 1.4.1