📄 codestate.h
字号:
/***************************************************************************/
/* NOTE: */
/* This document is copyright (c) by Oz Solomon and Yonat Sharon, and is */
/* bound by the MIT open source license. */
/* See License.txt or visit www.opensource.org/licenses/mit-license.html */
/***************************************************************************/
#ifndef CODE_STATE_H
#define CODE_STATE_H
#include "CodeParser.h"
#pragma warning (disable : 4786)
#include <map>
//
// this file contains definitions necessary for creating state maps
// for specific languages. A state map is simply a collection of
// interrealted CodeState objects,
//
class CodeState;
// CodeAction == member function of Context
typedef void (CodeParser::Context::*CodeAction)(CodeParser::Position);
struct CodeEffect { // defines what happens when a datum is processed
CodeAction action;
const CodeState* next;
bool markPosition;
};
class CodeState : public std::map<CodeParser::Datum, CodeEffect>
{
public:
#ifndef NDEBUG
const char* itsName;
#endif // NDEBUG
};
#endif // CODE_STATE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -