mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Add a symbol __curPos that expands to the current source location
I.e. an attribute set { file = <string>; line = <int>; column = <int>; }.
This commit is contained in:
parent
90b5e69284
commit
fc33fd86b7
7 changed files with 43 additions and 2 deletions
|
|
@ -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. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue