about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/nixexpr.hh')
-rw-r--r--third_party/nix/src/libexpr/nixexpr.hh43
1 files changed, 25 insertions, 18 deletions
diff --git a/third_party/nix/src/libexpr/nixexpr.hh b/third_party/nix/src/libexpr/nixexpr.hh
index 3ac651c94548..8817fbc9ddb8 100644
--- a/third_party/nix/src/libexpr/nixexpr.hh
+++ b/third_party/nix/src/libexpr/nixexpr.hh
@@ -8,15 +8,18 @@
 
 namespace nix {
 
-MakeError(EvalError, Error) MakeError(ParseError, Error)
-    MakeError(AssertionError, EvalError) MakeError(ThrownError, AssertionError)
-        MakeError(Abort, EvalError) MakeError(TypeError, EvalError)
-            MakeError(UndefinedVarError, Error)
-                MakeError(RestrictedPathError, Error)
-
-    /* Position objects. */
-
-    struct Pos {
+MakeError(EvalError, Error);
+MakeError(ParseError, Error);
+MakeError(AssertionError, EvalError);
+MakeError(ThrownError, AssertionError);
+MakeError(Abort, EvalError);
+MakeError(TypeError, EvalError);
+MakeError(UndefinedVarError, Error);
+MakeError(RestrictedPathError, Error);
+
+/* Position objects. */
+
+struct Pos {
   Symbol file;
   unsigned int line, column;
   Pos() : line(0), column(0){};
@@ -30,7 +33,7 @@ MakeError(EvalError, Error) MakeError(ParseError, Error)
     if (!p2.line) {
       return false;
     }
-    int d = ((string)file).compare((string)p2.file);
+    int d = ((std::string)file).compare((std::string)p2.file);
     if (d < 0) {
       return true;
     }
@@ -66,7 +69,7 @@ struct AttrName {
 
 typedef std::vector<AttrName> AttrPath;
 
-string showAttrPath(const AttrPath& attrPath);
+std::string showAttrPath(const AttrPath& attrPath);
 
 /* Abstract syntax of Nix expressions. */
 
@@ -297,16 +300,20 @@ struct ExprOpNot : Expr {
     void eval(EvalState& state, Env& env, Value& v);                       \
   };
 
-MakeBinOp(ExprApp, "") MakeBinOp(ExprOpEq, "==") MakeBinOp(ExprOpNEq, "!=")
-    MakeBinOp(ExprOpAnd, "&&") MakeBinOp(ExprOpOr, "||")
-        MakeBinOp(ExprOpImpl, "->") MakeBinOp(ExprOpUpdate, "//")
-            MakeBinOp(ExprOpConcatLists, "++")
+MakeBinOp(ExprApp, "");
+MakeBinOp(ExprOpEq, "==");
+MakeBinOp(ExprOpNEq, "!=");
+MakeBinOp(ExprOpAnd, "&&");
+MakeBinOp(ExprOpOr, "||");
+MakeBinOp(ExprOpImpl, "->");
+MakeBinOp(ExprOpUpdate, "//");
+MakeBinOp(ExprOpConcatLists, "++");
 
-                struct ExprConcatStrings : Expr {
+struct ExprConcatStrings : Expr {
   Pos pos;
   bool forceString;
-  vector<Expr*>* es;
-  ExprConcatStrings(const Pos& pos, bool forceString, vector<Expr*>* es)
+  std::vector<Expr*>* es;
+  ExprConcatStrings(const Pos& pos, bool forceString, std::vector<Expr*>* es)
       : pos(pos), forceString(forceString), es(es){};
   COMMON_METHODS
 };