|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#include "AstGlobal.h"#include "AstScript/ScriptParser.hpp"#include "AstScript/ExprVisitor.hpp"#include "AstUtil/StringView.hpp"命名空间 | |
| namespace | ast |
宏定义 | |
| #define | AST_EXPR(CLASS) |
类型定义 | |
| typedef Value *(* | ast::OpBinFunc) (Value *left, Value *right) |
| typedef Value *(* | ast::OpAssignFunc) (Expr *left, Expr *right) |
| typedef Value *(* | ast::OpUnaryFunc) (Value *value) |
| typedef Value *(* | ast::IterateFunc) (Value *value, int &index) |
枚举 | |
| enum | ast::EOpBinType { ast::eAdd , ast::eSub , ast::eMul , ast::eDiv , ast::ePow , ast::eMod , ast::eAnd , ast::eOr , ast::eBitOr , ast::eBitAnd , ast::eBitXor , ast::eBitLeftShift , ast::eBitRightShift , ast::eBitURightShift , ast::eElemMul , ast::eElemDiv , ast::eElemPow , ast::eElemMod , ast::eElemAnd , ast::eElemOr , ast::eLt , ast::eLe , ast::eEq , ast::eGt , ast::eGe , ast::eNe , ast::numOpBinType , ast::invalidOpBin =numOpBinType , ast::eCatVertical , ast::eCatHorizontal } |
| enum | ast::EOpAssignType { ast::eAssign , ast::eDelayAssign , ast::eBindAssign , ast::eAddAssign , ast::eSubAssign , ast::eMulAssign , ast::eDivAssign , ast::eModAssign , ast::ePowAssign , ast::eElemMulAssign , ast::eElemDivAssign , ast::eElemModAssign , ast::eElemPowAssign , ast::eElemAndAssign , ast::eElemOrAssign , ast::numOpAssignType } |
| enum | ast::EOpUnaryType { ast::eNot , ast::eNeg , ast::eInc , ast::eDec , ast::eBitNot , ast::numOpUnaryType , ast::eIterate } |
| enum | { eIterBegin =0 } |
函数 | |
| Variable * | ast::aNewVariable (StringView name, Expr *expr=nullptr, bool bind=false) |
| Variable * | ast::aNewVariable (Expr *expr, bool bind) |
| Symbol * | ast::aNewSymbol (StringView name) |
| Expr * | ast::aNewOpAssign (EOpAssignType op, Expr *left, Expr *right) |
| Expr * | ast::aNewOpBin (EOpBinType op, Expr *left, Expr *right) |
| Expr * | ast::aNewOpUnary (EOpUnaryType op, Expr *expr) |
| Expr * | ast::aNewExprCondition (Expr *condition, Expr *thenExpr, Expr *elseExpr=nullptr) |
| Expr * | ast::aNewExprRange (Expr *start, Expr *stop, Expr *step=nullptr) |
| Value * | ast::aNewValueString (StringView value) |
| Value * | ast::aNewValueInt (int value) |
| Value * | ast::aNewValueBool (bool value) |
| Value * | ast::aNewValueDouble (double value) |
| Value * | ast::aNewValueQuantity (const Quantity &value) |
| Value * | ast::aValueNull () |
| Expr * | ast::aParseExpr (StringView script) |
| Value * | ast::aEval (StringView script) |
| Value * | ast::aEvalExpr (Expr *expr) |
| bool | ast::aValueIsBool (Value *value) |
| bool | ast::aValueIsDouble (Value *value) |
| bool | ast::aValueIsInt (Value *value) |
| bool | ast::aValueIsArithmetic (Value *value) |
| bool | ast::aValueIsQuantity (Value *value) |
| double | ast::aValueToDouble (Value *value) |
| bool | ast::aValueUnboxBool (Value *value) |
| double | ast::aValueUnboxDouble (Value *value) |
| int | ast::aValueUnboxInt (Value *value) |
| Quantity | ast::aValueUnboxQuantity (Value *value) |
| std::string | ast::aFormatExpr (Expr *expr, Object *context=nullptr) |
| OpBinFunc | ast::aGetOpBinFunc (EOpBinType op, Class *leftType, Class *rightType) |
| OpAssignFunc | ast::aGetOpAssignFunc (EOpAssignType op, Class *leftType, Class *rightType) |
| OpUnaryFunc | ast::aGetOpUnaryFunc (EOpUnaryType op, Class *type) |
| IterateFunc | ast::aGetIterateFunc (Class *type) |
| Value * | ast::aDoOpBin (EOpBinType op, Value *left, Value *right) |
| Value * | ast::aDoOpUnary (EOpUnaryType op, Value *value) |
| Value * | ast::aDoOpAssign (EOpAssignType op, Expr *left, Expr *right) |
| Value * | ast::aIterateBegin (Value *container, int &index) |
| Value * | ast::aIterateNext (Value *container, int &index) |
| A_ALWAYS_INLINE Value * | ast::aNewValue (int value) |
| A_ALWAYS_INLINE Value * | ast::aNewValue (double value) |
| A_ALWAYS_INLINE Value * | ast::aNewValue (bool value) |
| A_ALWAYS_INLINE Value * | ast::aNewValue (const Quantity &value) |
| A_ALWAYS_INLINE Value * | ast::aNewValue (StringView value) |
~
~
ast项目(https://github.com/space-ast/ast) 本项目基于 Apache 2.0 开源许可证分发。 您可在遵守许可证条款的前提下使用、修改和分发本软件。 许可证全文请见:
http://www.apache.org/licenses/LICENSE-2.0
重要须知: 软件按"现有状态"提供,无任何明示或暗示的担保条件。 除非法律要求或书面同意,作者与贡献者不承担任何责任。 使用本软件所产生的风险,需由您自行承担。