24#include "AstScript/Expr.hpp"
25#include "AstScript/ExprBlock.hpp"
26#include "AstUtil/SharedPtr.hpp"
64 void addElseif(
Expr* condition,
Expr* block);
68 void setElse(
Expr* block);
71 struct ConditionBranch {
75 std::vector<ConditionBranch> conditionBranches_;
if条件语句表达式
定义 ExprIf.hpp:35
~ExprIf() override=default
析构函数
virtual errc_t setValue(Value *val)
设置表达式的值
定义 Expr.hpp:60
virtual Value * eval() const =0
求值
virtual std::string getExpression(Object *context=nullptr) const =0
获取表达式的字符串表示
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:86