lexer can now read single character tokens
This commit is contained in:
@@ -8,5 +8,9 @@ namespace token {
|
||||
struct token {
|
||||
::token::type type;
|
||||
std::string literal;
|
||||
|
||||
token(::token::type t, std::string s): type(t), literal(s) {}
|
||||
|
||||
token(::token::type t, char c): type(t), literal(1, c) {}
|
||||
};
|
||||
} // namespace token
|
||||
|
Reference in New Issue
Block a user