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.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libexpr/nixexpr.cc') diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index d52f7eadbbe3..f4b4295e290c 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. */ -- cgit 1.4.1