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

rename ImmediateParam to ImmediateValueParam

parent cb0ebffc
No related branches found
No related tags found
No related merge requests found
#ifndef _IMMEDIATE_PARAM_H_
#define _IMMEDIATE_PARAM_H_
#ifndef _IMMEDIATE_VALUE_PARAM_H_
#define _IMMEDIATE_VALUE_PARAM_H_
 
#include <ast/Param.h>
#include <abstraction/ImmediateValueAbstraction.hpp>
......@@ -7,11 +7,11 @@
namespace cli {
 
template < class Type >
class ImmediateParam : public Param {
class ImmediateValueParam : public Param {
Type m_data;
 
public:
ImmediateParam ( Type value ) : m_data ( value ) {
ImmediateValueParam ( Type value ) : m_data ( value ) {
}
 
virtual std::shared_ptr < abstraction::OperationAbstraction > translateAndEval ( const std::shared_ptr < abstraction::OperationAbstraction > &, Environment & ) const override {
......@@ -22,4 +22,4 @@ public:
 
} /* namespace cli */
 
#endif /* _IMMEDIATE_PARAM_H_ */
#endif /* _IMMEDIATE_VALUE_PARAM_H_ */
......@@ -12,7 +12,7 @@
#include <ast/params/ImmediateFileParam.h>
#include <ast/params/BindedFileParam.h>
#include <ast/params/PreviousResultParam.h>
#include <ast/params/ImmediateParam.h>
#include <ast/params/ImmediateValueParam.h>
#include <ast/params/BindedValueParam.h>
#include <ast/params/BindedVariableParam.h>
#include <ast/params/CastParam.h>
......@@ -52,10 +52,10 @@ std::unique_ptr < Param > Parser::param ( ) {
return in_redirect_param ( );
} else if ( check ( cli::Lexer::TokenType::IDENTIFIER ) ) {
std::string value = matchIdentifier ( );
return std::make_unique < ImmediateParam < std::string > > ( value );
return std::make_unique < ImmediateValueParam < std::string > > ( value );
} else if ( check ( cli::Lexer::TokenType::INTEGER ) ) {
int value = matchInteger ( );
return std::make_unique < ImmediateParam < int > > ( value );
return std::make_unique < ImmediateValueParam < int > > ( value );
} else if ( check ( cli::Lexer::TokenType::LEFT_PAREN ) ) {
match ( cli::Lexer::TokenType::LEFT_PAREN );
std::string type = matchIdentifier ( );
......
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