From b8f8ffa967cf9078b9d369ed6408d2466e9644eb Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 2 May 2021 23:07:03 +0300 Subject: [PATCH] mu-sexp: make lists printable And some typo fixes --- lib/utils/mu-sexp.hh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/utils/mu-sexp.hh b/lib/utils/mu-sexp.hh index adc2cf30..43cf1f47 100644 --- a/lib/utils/mu-sexp.hh +++ b/lib/utils/mu-sexp.hh @@ -1,5 +1,5 @@ /* -** Copyright (C) 2020 Dirk-Jan C. Binnema +** Copyright (C) 2021 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -207,7 +207,7 @@ struct Sexp { } /** - * Construct a properrty list sexp from a List + * Construct a property list sexp from a List * * @param name the property name; must start wtth ':' * @param sexp a Sexp @@ -352,6 +352,14 @@ operator<<(std::ostream& os, const Sexp& sexp) return os; } +static inline std::ostream& +operator<<(std::ostream& os, const Sexp::List& sexp) +{ + os << Sexp::make_list(Sexp::List(sexp)); + return os; +} + + } // Mu #endif /* MU_SEXP_HH__ */