编程实战:类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;
	};

(我还没写完)

(这里是结束)

相关推荐
Zwawa15 小时前
屏幕不止一种:OLED、LCD1602字符屏、TFT/IPS图形屏和串口屏怎么用,这与TTY和PTY又有什么关系
c语言·单片机·嵌入式
Fruiticecake15 小时前
C 程序员速通现代 C++(一):lambda、std::function、移动语义与智能指针
c语言·c++
田甲16 小时前
做一款 Type-C 母座读卡器:GL3224 双卡方案实测
c语言·开发语言
·present·20 小时前
CSAPP(lecture 13_02 Linking)
c语言·c++
wuyk5551 天前
Keil工具链-第05讲-启动文件与__main到底做了什么
c语言·stm32·单片机·嵌入式硬件·物联网
Navigator_Z2 天前
LeetCode //C - 1317. Convert Integer to the Sum of Two No-Zero Integers
c语言·算法·leetcode
冻柠檬飞冰走茶2 天前
字母移动游戏题解:贪心求最长可保留连续子串(附 C 实现)
c语言·开发语言·数据结构·算法·动态规划
Hhy_11072 天前
《C++深度解构06》手撕 string —— 从底层内存管理到深浅拷贝彻底吃透
c语言·开发语言·c++·学习·visual studio
曦樂~2 天前
Cpp面筋
c语言·c++
HUANGZHENXUAN1233 天前
最大子矩阵和:从 O(n⁴) 到 O(n³) 的列压缩 + Kadane
c语言·前端