Lines Matching refs:ExprAST
100 class ExprAST { class
102 virtual ~ExprAST() {} in ~ExprAST()
107 class NumberExprAST : public ExprAST {
115 class VariableExprAST : public ExprAST {
123 class BinaryExprAST : public ExprAST {
125 ExprAST *LHS, *RHS;
127 BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) in BinaryExprAST()
133 class CallExprAST : public ExprAST {
135 std::vector<ExprAST*> Args;
137 CallExprAST(const std::string &callee, std::vector<ExprAST*> &args) in CallExprAST()
143 class IfExprAST : public ExprAST {
144 ExprAST *Cond, *Then, *Else;
146 IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) in IfExprAST()
152 class ForExprAST : public ExprAST {
154 ExprAST *Start, *End, *Step, *Body;
156 ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, in ForExprAST()
157 ExprAST *step, ExprAST *body) in ForExprAST()
178 ExprAST *Body;
180 FunctionAST(PrototypeAST *proto, ExprAST *body) in FunctionAST()
214 ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str);return 0;} in Error()
218 static ExprAST *ParseExpression();
223 static ExprAST *ParseIdentifierExpr() { in ParseIdentifierExpr()
233 std::vector<ExprAST*> Args; in ParseIdentifierExpr()
236 ExprAST *Arg = ParseExpression(); in ParseIdentifierExpr()
255 static ExprAST *ParseNumberExpr() { in ParseNumberExpr()
256 ExprAST *Result = new NumberExprAST(NumVal); in ParseNumberExpr()
262 static ExprAST *ParseParenExpr() { in ParseParenExpr()
264 ExprAST *V = ParseExpression(); in ParseParenExpr()
274 static ExprAST *ParseIfExpr() { in ParseIfExpr()
278 ExprAST *Cond = ParseExpression(); in ParseIfExpr()
285 ExprAST *Then = ParseExpression(); in ParseIfExpr()
293 ExprAST *Else = ParseExpression(); in ParseIfExpr()
300 static ExprAST *ParseForExpr() { in ParseForExpr()
314 ExprAST *Start = ParseExpression(); in ParseForExpr()
320 ExprAST *End = ParseExpression(); in ParseForExpr()
324 ExprAST *Step = 0; in ParseForExpr()
335 ExprAST *Body = ParseExpression(); in ParseForExpr()
347 static ExprAST *ParsePrimary() { in ParsePrimary()
360 static ExprAST *ParseBinOpRHS(int ExprPrec, ExprAST *LHS) { in ParseBinOpRHS()
375 ExprAST *RHS = ParsePrimary(); in ParseBinOpRHS()
394 static ExprAST *ParseExpression() { in ParseExpression()
395 ExprAST *LHS = ParsePrimary(); in ParseExpression()
431 if (ExprAST *E = ParseExpression()) in ParseDefinition()
438 if (ExprAST *E = ParseExpression()) { in ParseTopLevelExpr()