lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master bd7b696 5/6: Improve concinnity


From: Greg Chicares
Subject: [lmi-commits] [lmi] master bd7b696 5/6: Improve concinnity
Date: Sat, 28 Jan 2017 04:52:22 +0000 (UTC)

branch: master
commit bd7b696257664f56a68d659b3b384a516cad049c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve concinnity
    
    This
      '\''
    is valid C, but looks like an invalid shell escape, and it occurred
    nowhere else in lmi. This
      "'"
    is more obviously correct.
---
 input_seq_test.cpp |    4 ++--
 input_sequence.cpp |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/input_seq_test.cpp b/input_seq_test.cpp
index 3c3e018..f765625 100644
--- a/input_seq_test.cpp
+++ b/input_seq_test.cpp
@@ -47,7 +47,7 @@ void check
     if(!bv)
         {
         using osid = std::ostream_iterator<double>;
-        std::cout << "\nExpression: '" << e << '\'';
+        std::cout << "\nExpression: '" << e << "'";
         std::cout << "\n  expected: ";
         std::copy(d        , d + n  , osid(std::cout, " "));
         std::cout << "\n   but got: ";
@@ -65,7 +65,7 @@ void check
     if(!bs)
         {
         using osis = std::ostream_iterator<std::string>;
-        std::cout << "\nExpression: '" << e << '\'';
+        std::cout << "\nExpression: '" << e << "'";
         std::cout << "\n  expected: ";
         std::copy(t.begin(), t.end(), osis(std::cout, "|"));
         std::cout << "\n   but got: ";
diff --git a/input_sequence.cpp b/input_sequence.cpp
index 2870d04..d0e1c22 100644
--- a/input_sequence.cpp
+++ b/input_sequence.cpp
@@ -951,9 +951,9 @@ void InputSequence::match(InputSequence::token_type t)
     else
         {
         diagnostics
-            << "Expected "
-            << '\'' << token_type_name(t) << '\''
-            << " . "
+            << "Expected '"
+            << token_type_name(t)
+            << "' . "
             ;
         mark_diagnostic_context();
         }
@@ -962,9 +962,9 @@ void InputSequence::match(InputSequence::token_type t)
 void InputSequence::mark_diagnostic_context()
 {
     diagnostics
-        << "Current token "
-        << '\'' << token_type_name(current_token_type) << '\''
-        << " at position " << input_stream.tellg()
+        << "Current token '"
+        << token_type_name(current_token_type)
+        << "' at position " << input_stream.tellg()
         << ".\n"
         ;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]