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

📄 error.cpp

📁 小型C语言编译器,VC条件下运行,最后编译为汇编代码
💻 CPP
字号:
// error.cpp : implementation file
//

#include "stdafx.h"
#include "error.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

CString _error::GetStrError()
{
	CString ret = _T("");

	switch( m_id ) {
	case ERROR_INVALID_TYPE:
		ret.Format( "error in line %d: invalid type '%s'", m_param, m_strComment );
		break;

	case ERROR_DECLARATION:
		ret.Format( "error in line %d: '%s' is reserved", m_param, m_strComment );
		break;

	case ERROR_SEMICOLON_MISS:
		ret.Format( "error in line %d: missing ';' after identifier \"%s\"", m_param, m_strComment );
		break;
	}

	return ret;
}

⌨️ 快捷键说明

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