aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 02:21:26 +0100
committereldritch horrors <pennae@lix.systems>2024-03-08 18:54:10 -0700
commit0e8f505f666d9b0714840e4fe878e6aece918908 (patch)
treeead9a264b610ac2bce5f5f1dd8c9515c6977028a
parent80b79d01379919e67b2801ad256f5ec8d6168df4 (diff)
Unindent `print.hh` declarations
(cherry picked from commit c9125603a535f82cc9a53f47533f0a3d174e7008) Change-Id: I137a272feee7eb42a017f373cbe4705b0e79b7c1
-rw-r--r--src/libexpr/print.hh84
1 files changed, 43 insertions, 41 deletions
diff --git a/src/libexpr/print.hh b/src/libexpr/print.hh
index 3b72ae201..abf830864 100644
--- a/src/libexpr/print.hh
+++ b/src/libexpr/print.hh
@@ -10,45 +10,47 @@
#include <iostream>
namespace nix {
- /**
- * Print a string as a Nix string literal.
- *
- * Quotes and fairly minimal escaping are added.
- *
- * @param s The logical string
- */
- std::ostream & printLiteralString(std::ostream & o, std::string_view s);
- inline std::ostream & printLiteralString(std::ostream & o, const char * s) {
- return printLiteralString(o, std::string_view(s));
- }
- inline std::ostream & printLiteralString(std::ostream & o, const std::string & s) {
- return printLiteralString(o, std::string_view(s));
- }
-
- /** Print `true` or `false`. */
- std::ostream & printLiteralBool(std::ostream & o, bool b);
-
- /**
- * Print a string as an attribute name in the Nix expression language syntax.
- *
- * Prints a quoted string if necessary.
- */
- std::ostream & printAttributeName(std::ostream & o, std::string_view s);
-
- /**
- * Returns `true' is a string is a reserved keyword which requires quotation
- * when printing attribute set field names.
- */
- bool isReservedKeyword(const std::string_view str);
-
- /**
- * Print a string as an identifier in the Nix expression language syntax.
- *
- * FIXME: "identifier" is ambiguous. Identifiers do not have a single
- * textual representation. They can be used in variable references,
- * let bindings, left-hand sides or attribute names in a select
- * expression, or something else entirely, like JSON. Use one of the
- * `print*` functions instead.
- */
- std::ostream & printIdentifier(std::ostream & o, std::string_view s);
+
+/**
+ * Print a string as a Nix string literal.
+ *
+ * Quotes and fairly minimal escaping are added.
+ *
+ * @param s The logical string
+ */
+std::ostream & printLiteralString(std::ostream & o, std::string_view s);
+inline std::ostream & printLiteralString(std::ostream & o, const char * s) {
+ return printLiteralString(o, std::string_view(s));
+}
+inline std::ostream & printLiteralString(std::ostream & o, const std::string & s) {
+ return printLiteralString(o, std::string_view(s));
+}
+
+/** Print `true` or `false`. */
+std::ostream & printLiteralBool(std::ostream & o, bool b);
+
+/**
+ * Print a string as an attribute name in the Nix expression language syntax.
+ *
+ * Prints a quoted string if necessary.
+ */
+std::ostream & printAttributeName(std::ostream & o, std::string_view s);
+
+/**
+ * Returns `true' is a string is a reserved keyword which requires quotation
+ * when printing attribute set field names.
+ */
+bool isReservedKeyword(const std::string_view str);
+
+/**
+ * Print a string as an identifier in the Nix expression language syntax.
+ *
+ * FIXME: "identifier" is ambiguous. Identifiers do not have a single
+ * textual representation. They can be used in variable references,
+ * let bindings, left-hand sides or attribute names in a select
+ * expression, or something else entirely, like JSON. Use one of the
+ * `print*` functions instead.
+ */
+std::ostream & printIdentifier(std::ostream & o, std::string_view s);
+
}