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

(我还没写完)

(这里是结束)

相关推荐
Discipline~Hai21 分钟前
ARM01-ARM体系架构
linux·c语言·arm开发·架构
cjr_xyi2 小时前
AT1202Contest_c binarydigit 题解
c语言·c++·算法
Navigator_Z4 小时前
LeetCode //C - 1156. Swap For Longest Repeated Character Substring
c语言·算法·leetcode
无相求码4 小时前
const vs #define:C语言常量定义的差异
c语言·算法
Android洋芋4 小时前
AI辅助C盘清理
c语言·开发语言·人工智能·ai辅助c盘清理
ScilogyHunter4 小时前
GCC/Clang 原始字符串详解
c语言·原始字符串
麻瓜老宋6 小时前
AI开发C语言应用按步走,表达式计算器calc的第四步,交互式 REPL 模式
c语言·开发语言·atomcode
十月的皮皮7 小时前
stm20260719-STM32F103RCT6_HAL库_三人抢答器
c语言·stm32·单片机·嵌入式硬件·stm32cubemx·hal库
特立独行的猫a7 小时前
Python的C/C++三方库移植到鸿蒙PC实战踩坑记
c语言·c++·python·harmonyos·三方库移植·鸿蒙pc
wuyk5558 小时前
53.嵌入式开发中栈溢出的深度解析:从HardFault到解决方案
c语言·stm32·单片机