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