1 #ifndef EXPRAST_H 2 #define EXPRAST_H 3 4 #include "expression.h" 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 /** 9 * TODO: All of this belongs inside the parsing code. This is just AST stuff 10 */ 11 RSArgList *RS_NewArgList(RSExpr *e); 12 void RSArgList_Free(RSArgList *l); 13 RSArgList *RSArgList_Append(RSArgList *l, RSExpr *e); 14 15 RSExpr *RS_NewStringLiteral(const char *str, size_t len); 16 RSExpr *RS_NewNullLiteral(); 17 RSExpr *RS_NewNumberLiteral(double n); 18 RSExpr *RS_NewOp(unsigned char op, RSExpr *left, RSExpr *right); 19 RSExpr *RS_NewFunc(const char *str, size_t len, RSArgList *args, RSFunction cb); 20 RSExpr *RS_NewProp(const char *str, size_t len); 21 RSExpr *RS_NewPredicate(RSCondition cond, RSExpr *left, RSExpr *right); 22 RSExpr *RS_NewInverted(RSExpr *child); 23 #ifdef __cplusplus 24 } 25 #endif 26 #endif