编程实战:类C语法的编译型脚本解释器(四)

系列入口:

编程实战:类C语法的编译型脚本解释器(系列)-CSDN博客

本文介绍总入口和使用方法。

一、总入口

cpp 复制代码
	class IScript
	{
	private:
		CScript* m_p;
		string m_msg;
	public:
		IScript() :m_p(nullptr) {}
		string GetMessage()const;

		//连接
		bool AttachScript(CScript* p);

		//编译
		bool Compile(char const* _source, vector<pair<string, Variable > >* pEnvs = NULL);

		//执行
		string const& GetSource()const;
		bool IsCompiled()const;
		string& Report(string& ret)const;
		bool Execute(Variable& ret, vector<pair<string, Variable > >* pEnvs = NULL, void* pe = NULL);
		long GetExecCount()const;
	};

(我还没写完)

(这里是结束)

相关推荐
祈安_13 小时前
C语言内存函数
c语言·后端
norlan_jame2 天前
C-PHY与D-PHY差异
c语言·开发语言
czy87874752 天前
除了结构体之外,C语言中还有哪些其他方式可以模拟C++的面向对象编程特性
c语言
m0_531237172 天前
C语言-数组练习进阶
c语言·开发语言·算法
Z9fish2 天前
sse哈工大C语言编程练习23
c语言·数据结构·算法
代码无bug抓狂人2 天前
C语言之单词方阵——深搜(很好的深搜例题)
c语言·开发语言·算法·深度优先
CodeJourney_J2 天前
从“Hello World“ 开始 C++
c语言·c++·学习
枫叶丹42 天前
【Qt开发】Qt界面优化(七)-> Qt样式表(QSS) 样式属性
c语言·开发语言·c++·qt
with-the-flow2 天前
从数学底层的底层原理来讲 random 的函数是怎么实现的
c语言·python·算法
Sunsets_Red3 天前
P8277 [USACO22OPEN] Up Down Subsequence P 题解
c语言·c++·算法·c#·学习方法·洛谷·信息学竞赛