⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 token.cpp

📁 an easy compiler to compile C
💻 CPP
字号:
// Token.cpp: implementation of the Token class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Token.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

string Token::toStr() const {
	string a ("(");
	a += char(type);
	a += " , ";
	a += char(value);
	a += ")";
	return a;
}

Token::Token(): type(Token::EMPTY), value(Token::NONE) {}

Token::Token(int atype, int avalue):
  type(atype), value(avalue)
{}

bool Token::operator ==(const Token& tk) const {
	return type == tk.type && value == tk.value;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -