Euphoria
default_parse.cc
Go to the documentation of this file.
1 #include "base/default_parse.h"
2 
3 #include "base/stringmerger.h"
4 #include "base/functional.h"
5 
6 
7 namespace eu
8 {
9  std::string
10  add_quotes_and_combine_with_english_or(const std::vector<std::string>& matches)
11  {
12  const auto quoted_names =
13  map<std::string>(matches, [](const std::string& s)
14  {
15  // todo(Gustav): improve quote function
16  return fmt::format("'{}'", s);
17  });
18 
19  return string_mergers::english_or.merge(quoted_names);
20  }
21 }
22 
constexpr StringMerger english_or
Definition: stringmerger.h:90
Definition: assert.h:90
std::string add_quotes_and_combine_with_english_or(const std::vector< std::string > &matches)
std::string merge(const std::vector< std::string > &strings) const
Definition: stringmerger.cc:11