2003-10-29 17:05:03 +01:00
|
|
|
#ifndef __PARSER_H
|
|
|
|
#define __PARSER_H
|
|
|
|
|
2004-02-04 17:03:29 +01:00
|
|
|
#include "eval.hh"
|
2003-10-29 17:05:03 +01:00
|
|
|
|
|
|
|
|
2003-11-22 19:45:56 +01:00
|
|
|
/* Parse a Nix expression from the specified file. If `path' refers
|
|
|
|
to a directory, the "/default.nix" is appended. */
|
2004-02-04 17:03:29 +01:00
|
|
|
Expr parseExprFromFile(EvalState & state, Path path);
|
2003-10-29 17:05:03 +01:00
|
|
|
|
2003-11-22 19:45:56 +01:00
|
|
|
/* Parse a Nix expression from the specified string. */
|
2004-02-04 17:03:29 +01:00
|
|
|
Expr parseExprFromString(EvalState & state, const string & s,
|
2003-11-22 19:45:56 +01:00
|
|
|
const Path & basePath);
|
|
|
|
|
2003-10-29 17:05:03 +01:00
|
|
|
|
|
|
|
#endif /* !__PARSER_H */
|