1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

Fix relative path handling in the parser

This commit is contained in:
Eelco Dolstra 2022-05-12 18:25:36 +02:00
parent cd893a22f5
commit 1ee5dd6d96
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
18 changed files with 72 additions and 46 deletions

View file

@ -190,8 +190,8 @@ public:
Expr * parseExprFromFile(const SourcePath & path, StaticEnv & staticEnv);
/* Parse a Nix expression from the specified string. */
Expr * parseExprFromString(std::string s, const Path & basePath, StaticEnv & staticEnv);
Expr * parseExprFromString(std::string s, const Path & basePath);
Expr * parseExprFromString(std::string s, const SourcePath & basePath, StaticEnv & staticEnv);
Expr * parseExprFromString(std::string s, const SourcePath & basePath);
Expr * parseStdin();
@ -356,8 +356,13 @@ private:
friend struct ExprAttrs;
friend struct ExprLet;
Expr * parse(char * text, size_t length, FileOrigin origin, const PathView path,
const PathView basePath, StaticEnv & staticEnv);
Expr * parse(
char * text,
size_t length,
FileOrigin origin,
const PathView path,
const SourcePath & basePath,
StaticEnv & staticEnv);
public: