summaryrefslogtreecommitdiff
path: root/include/lexer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/lexer.hpp')
-rw-r--r--include/lexer.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lexer.hpp b/include/lexer.hpp
index e674999..27779ea 100644
--- a/include/lexer.hpp
+++ b/include/lexer.hpp
@@ -33,7 +33,7 @@ enum token_type{
struct Token{
token_type type;
std::string value;
- Token(token_type type, std::string value) : type(type), value(value){}
+ Token(token_type type, const std::string &value) : type(type), value(value){}
};
class Lexer{
@@ -42,7 +42,7 @@ private:
std::string text;
size_t current_char;
Token current_token;
- bool matchFunction(std::string function_name);
+ bool matchFunction(const std::string &function_name);
std::string createNumber();
public:
Lexer(std::string text = {});