Remove the tok default constructor in lex.hpp

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-03-01 20:16:15 +01:00
parent 6955c5cb4d
commit 33e29ccb8e
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ struct tok {
type toktype;
std::string toktext;
unsigned long line;
tok(): toktype(UNEXPECTED), toktext(), line(0) {};
tok() = delete;
tok(const type& Type, std::string_view Text, const decltype(line)& line = 0): toktype(Type), toktext(Text), line(line) {}
explicit tok(const type& Type, const decltype(line)& line = 0): tok(Type, std::string(1, Type), line) {};
friend std::ostream& operator<<(std::ostream& output, const tok& it) { return output << it.toktext; }