Skip to content
Snippets Groups Projects
Commit bc91e284 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

str: tune the pair from string parsing

parent ad71552d
No related branches found
No related tags found
1 merge request!197documentation fixups; str fixups and improvements
Pipeline #160898 passed with warnings
......@@ -37,12 +37,12 @@ L0:
token.value += character;
token.raw += character;
return token;
} else if(character == '(') {
} else if(character == '<') {
token.type = TokenType::PAIR_BEGIN;
token.value += character;
token.raw += character;
return token;
} else if(character == ')') {
} else if(character == '>') {
token.type = TokenType::PAIR_END;
token.value += character;
token.raw += character;
......
......@@ -45,7 +45,7 @@ bool stringApi < std::pair < FirstType, SecondType > >::first ( ext::istream & i
 
template<class FirstType, class SecondType >
void stringApi < std::pair < FirstType, SecondType > >::compose ( ext::ostream & output, const std::pair < FirstType, SecondType > & container ) {
output << "(";
output << "<";
 
stringApi < FirstType >::compose ( output, container.first );
 
......@@ -53,7 +53,7 @@ void stringApi < std::pair < FirstType, SecondType > >::compose ( ext::ostream &
 
stringApi < SecondType >::compose ( output, container.second );
 
output << ")";
output << ">";
}
 
template<class FirstType, class SecondType >
......
......@@ -7,7 +7,7 @@
 
TEST_CASE ( "Object Test", "[unit][object][label]" ) {
SECTION ( "Composing" ) {
std::string input = "(1, 2)'";
std::string input = "<1, 2>'";
object::Object label = factory::StringDataFactory::fromString (input);
 
std::string output = factory::StringDataFactory::toString(label);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment