diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-18T19·14+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-18T19·16+0100 |
commit | fc33fd86b7727365caab44c05a90d5b52209131b (patch) | |
tree | ba12d5e943e0e3b0d9aa5a9e25f1fa784dc369f0 /src/libexpr/nixexpr.cc | |
parent | 90b5e692846d9b7a951155c5ed4fc7cf72b08e31 (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.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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. */ |