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

cli: remove not needed template params from file statement

parent 19b8828b
No related branches found
No related tags found
1 merge request!221New normalization
......@@ -9,7 +9,7 @@
 
namespace cli {
 
FileStatement::FileStatement ( std::unique_ptr < Arg > file, std::unique_ptr < Arg > fileType, std::unique_ptr < TypeOption > type, ext::vector < std::unique_ptr < cli::Arg > > templateParams ) : m_file ( std::move ( file ) ), m_fileType ( std::move ( fileType ) ), m_type ( std::move ( type ) ), m_templateParams ( std::move ( templateParams ) ) { //FIXME remove templateParams from the parser
FileStatement::FileStatement ( std::unique_ptr < Arg > file, std::unique_ptr < Arg > fileType, std::unique_ptr < TypeOption > type ) : m_file ( std::move ( file ) ), m_fileType ( std::move ( fileType ) ), m_type ( std::move ( type ) ) {
}
 
std::shared_ptr < abstraction::Value > FileStatement::translateAndEval ( const std::shared_ptr < abstraction::Value > &, Environment & environment ) const {
......
......@@ -9,10 +9,9 @@ class FileStatement final : public Statement {
std::unique_ptr < cli::Arg > m_file;
std::unique_ptr < Arg > m_fileType;
std::unique_ptr < TypeOption > m_type;
ext::vector < std::unique_ptr < cli::Arg > > m_templateParams;
 
public:
FileStatement ( std::unique_ptr < Arg > file, std::unique_ptr < Arg > fileType, std::unique_ptr < TypeOption > type, ext::vector < std::unique_ptr < cli::Arg > > templateParams );
FileStatement ( std::unique_ptr < Arg > file, std::unique_ptr < Arg > fileType, std::unique_ptr < TypeOption > type );
 
std::shared_ptr < abstraction::Value > translateAndEval ( const std::shared_ptr < abstraction::Value > &, Environment & environment ) const override;
 
......
......@@ -158,11 +158,7 @@ std::shared_ptr < Statement > Parser::in_redirect ( ) {
}
 
std::unique_ptr < TypeOption > type = optional_type_option ( );
ext::vector < std::unique_ptr < cli::Arg > > templateArgs;
while ( check ( cli::Lexer::TokenType::AT_SIGN ) )
templateArgs.emplace_back ( template_arg ( ) );
return std::make_shared < FileStatement > ( file ( ), std::move ( fileType ), std::move ( type ), std::move ( templateArgs ) );
return std::make_shared < FileStatement > ( file ( ), std::move ( fileType ), std::move ( type ) );
}
}
 
......
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