mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
* Refactoring: move parseExprFromFile() and parseExprFromString() into
the EvalState class.
This commit is contained in:
parent
c8606664ab
commit
54945a2950
10 changed files with 37 additions and 52 deletions
|
@ -218,6 +218,13 @@ public:
|
|||
EvalState();
|
||||
~EvalState();
|
||||
|
||||
/* Parse a Nix expression from the specified file. If `path'
|
||||
refers to a directory, then "/default.nix" is appended. */
|
||||
Expr * parseExprFromFile(Path path);
|
||||
|
||||
/* Parse a Nix expression from the specified string. */
|
||||
Expr * parseExprFromString(const string & s, const Path & basePath);
|
||||
|
||||
/* Evaluate an expression read from the given file to normal
|
||||
form. */
|
||||
void evalFile(const Path & path, Value & v);
|
||||
|
@ -296,6 +303,9 @@ private:
|
|||
friend class ExprAttrs;
|
||||
friend class ExprLet;
|
||||
|
||||
Expr * parse(const char * text,
|
||||
const Path & path, const Path & basePath);
|
||||
|
||||
public:
|
||||
|
||||
/* Do a deep equality test between two values. That is, list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue