2003-10-29 16:05:03 +00:00
|
|
|
#ifndef __PARSER_H
|
|
|
|
#define __PARSER_H
|
|
|
|
|
2004-02-04 16:03:29 +00:00
|
|
|
#include "eval.hh"
|
2003-10-29 16:05:03 +00:00
|
|
|
|
|
|
|
|
2006-09-04 21:06:23 +00:00
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
|
2003-11-22 18:45:56 +00:00
|
|
|
/* Parse a Nix expression from the specified file. If `path' refers
|
2010-03-23 17:30:50 +00:00
|
|
|
to a directory, then "/default.nix" is appended. */
|
2010-04-12 18:30:11 +00:00
|
|
|
Expr * parseExprFromFile(Path path);
|
2003-10-29 16:05:03 +00:00
|
|
|
|
2003-11-22 18:45:56 +00:00
|
|
|
/* Parse a Nix expression from the specified string. */
|
2010-04-12 18:30:11 +00:00
|
|
|
Expr * parseExprFromString(const string & s, const Path & basePath);
|
2003-11-22 18:45:56 +00:00
|
|
|
|
2003-10-29 16:05:03 +00:00
|
|
|
|
2006-09-04 21:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-10-29 16:05:03 +00:00
|
|
|
#endif /* !__PARSER_H */
|