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

tidy: remove duplicate lines in if statement

parent b7451e9a
No related branches found
No related tags found
1 merge request!200clang tidy fixes
......@@ -17,6 +17,7 @@
#include "common/converterCommon.hpp"
 
#include <factory/StringDataFactory.hpp>
#include <container/string/ObjectsVariant.h>
 
namespace convert {
 
......@@ -228,12 +229,9 @@ void LatexConverter::rules ( ext::ostream & out, const grammar::CFG < TerminalSy
if ( itRhs != kv.second.begin ( ) )
out << " \\mid ";
 
for ( const auto & symb : *itRhs ) {
if ( symb.template is < TerminalSymbolType > ( ) )
out << replace ( factory::StringDataFactory::toString ( symb.template get < TerminalSymbolType > ( ) ), "\"", "\\\"" ) << " ";
else if ( symb.template is < NonterminalSymbolType > ( ) )
out << replace ( factory::StringDataFactory::toString ( symb.template get < NonterminalSymbolType > ( ) ), "\"", "\\\"" ) << " ";
}
for ( const auto & symb : *itRhs )
out << replace ( factory::StringDataFactory::toString ( symb ), "\"", "\\\"" ) << " ";
if ( itRhs -> empty ( ) )
out << "\\varepsilon";
}
......
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