git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: handle two string literals bin ops
a7a7763Andy Arvanitis
src/Language/PureScript/Pretty/Cpp.hs+2
@@ -435,6 +435,8 @@ binary op str = AssocL match (\v1 v2 -> v1 ++ str ++ v2)
435 match :: Pattern PrinterState Cpp (Cpp, Cpp)
435 match :: Pattern PrinterState Cpp (Cpp, Cpp)
436 match = mkPattern match'
436 match = mkPattern match'
437 where
437 where
438+ match' (CppBinary op' v1@(CppStringLiteral _) v2@(CppStringLiteral _))
439+ | op' == op = Just (CppApp (CppVar "std::string") [v1], v2)
438 match' (CppBinary op' v1 v2) | op' == op = Just (v1, v2)
440 match' (CppBinary op' v1 v2) | op' == op = Just (v1, v2)
439 match' _ = Nothing
441 match' _ = Nothing
440
442