代码拉取完成,页面将自动刷新
#pragma once
namespace compiler
{
enum class token_type
{
type_name,
Operator,
variate,
assignment,
immediate_int,
immediate_float,
//Բ
l_parenthesis,
r_parenthesis,
//
l_square_brackets,
r_square_brackets,
//
l_brace,
r_brace,
For,
If,
Else,
While,
Return,
String,
stmt_end,
comma,
INVALID
};
std::ostream& operator<<(std::ostream& out, token_type& t)
{
switch (t)
{
case token_type:: type_name:
out << "type_name";break;
case token_type:: Operator:
out << "Operator";break;
case token_type:: variate:
out << "variate";break;
case token_type:: assignment:
out << "assignment";break;
case token_type:: immediate_int:
out << "immediate_int";break;
case token_type:: immediate_float:
out << "immediate_float";break;
case token_type:: l_parenthesis:
out << "l_parenthesis";break;
case token_type:: r_parenthesis:
out << "r_parenthesis";break;
case token_type:: l_square_brackets:
out << "l_square_brackets";break;
case token_type:: r_square_brackets:
out << "r_square_brackets";break;
case token_type:: l_brace:
out << "tl_brace";break;
case token_type:: r_brace:
out << "r_brace";break;
case token_type:: For:
out << "For";break;
case token_type:: If:
out << "If";break;
case token_type:: Else:
out << "Else";break;
case token_type::While:
out << "While";break;
case token_type::Return:
out << "Return";break;
case token_type::String:
out << "String";break;
case token_type::stmt_end:
out << "stmt_end";break;
case token_type::comma:
out << "comma";break;
default:
break;
}
return out;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。