38 case token::tokenType::UNDEFINED:
41 <<
"Undefined token" <<
endl;
44 case token::tokenType::FLAG:
48 case token::tokenType::PUNCTUATION:
52 case token::tokenType::BOOL:
53 case token::tokenType::INT64:
57 case token::tokenType::FLOAT:
61 case token::tokenType::DOUBLE:
66 case token::tokenType::DIRECTIVE:
67 case token::tokenType::VARIABLE:
72 case token::tokenType::WORD:
76 case token::tokenType::STRING:
80 case token::tokenType::ERROR:
83 <<
"Error token" <<
endl;
89 <<
"Unknown token" <<
endl;
114 case token::tokenType::UNDEFINED:
return "undefined";
115 case token::tokenType::BOOL:
return "bool";
116 case token::tokenType::FLAG:
return "flag";
117 case token::tokenType::PUNCTUATION:
return "punctuation";
118 case token::tokenType::INT64:
return "int64/int32";
119 case token::tokenType::FLOAT:
return "float";
120 case token::tokenType::DOUBLE:
return "double";
121 case token::tokenType::WORD:
return "word";
122 case token::tokenType::DIRECTIVE:
return "directive";
123 case token::tokenType::STRING:
return "string";
125 case token::tokenType::VARIABLE:
return "variable";
127 case token::tokenType::ERROR:
return "error";
133 return "unknown(" + std::to_string(
int(type_)) +
")";
150 case token::tokenType::UNDEFINED:
153 <<
"Undefined token" <<
endl;
156 case token::tokenType::FLAG:
160 case token::tokenType::PUNCTUATION:
164 case token::tokenType::BOOL:
165 case token::tokenType::INT64:
169 case token::tokenType::FLOAT:
173 case token::tokenType::DOUBLE:
178 case token::tokenType::DIRECTIVE:
179 case token::tokenType::VARIABLE:
184 case token::tokenType::WORD:
188 case token::tokenType::STRING:
192 case token::tokenType::ERROR:
195 <<
"Error token" <<
endl;
201 <<
"Unknown token" <<
endl;
210 return os << char(pt);
215 return os << char(pt);