Lex Strings

This commit is contained in:
2019-05-22 13:24:28 +02:00
parent 23991ab2ea
commit 6eb005ab3f
6 changed files with 125 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
#include <utility>
#ifndef PORYGONLANG_TOKEN_HPP
#define PORYGONLANG_TOKEN_HPP
@@ -73,6 +75,19 @@ public:
}
};
class StringToken : public IToken{
public:
string Value;
explicit StringToken(string value, unsigned int position, unsigned int length) : IToken(position, length){
Value = std::move(value);
}
TokenKind GetKind() override{
return TokenKind::String;
}
};
class IdentifierToken : public IToken{
public:
string Value;