Lines Matching refs:ExprAST

153 class ExprAST {  class
155 virtual ~ExprAST() {} in ~ExprAST()
160 class NumberExprAST : public ExprAST {
168 class VariableExprAST : public ExprAST {
177 class UnaryExprAST : public ExprAST {
179 ExprAST *Operand;
181 UnaryExprAST(char opcode, ExprAST *operand) in UnaryExprAST()
187 class BinaryExprAST : public ExprAST {
189 ExprAST *LHS, *RHS;
191 BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) in BinaryExprAST()
197 class CallExprAST : public ExprAST {
199 std::vector<ExprAST*> Args;
201 CallExprAST(const std::string &callee, std::vector<ExprAST*> &args) in CallExprAST()
207 class IfExprAST : public ExprAST {
208 ExprAST *Cond, *Then, *Else;
210 IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) in IfExprAST()
216 class ForExprAST : public ExprAST {
218 ExprAST *Start, *End, *Step, *Body;
220 ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, in ForExprAST()
221 ExprAST *step, ExprAST *body) in ForExprAST()
227 class VarExprAST : public ExprAST {
228 std::vector<std::pair<std::string, ExprAST*> > VarNames;
229 ExprAST *Body;
231 VarExprAST(const std::vector<std::pair<std::string, ExprAST*> > &varnames, in VarExprAST()
232 ExprAST *body) in VarExprAST()
268 ExprAST *Body;
270 FunctionAST(PrototypeAST *proto, ExprAST *body) in FunctionAST()
304 ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str);return 0;} in Error()
308 static ExprAST *ParseExpression();
313 static ExprAST *ParseIdentifierExpr() { in ParseIdentifierExpr()
323 std::vector<ExprAST*> Args; in ParseIdentifierExpr()
326 ExprAST *Arg = ParseExpression(); in ParseIdentifierExpr()
345 static ExprAST *ParseNumberExpr() { in ParseNumberExpr()
346 ExprAST *Result = new NumberExprAST(NumVal); in ParseNumberExpr()
352 static ExprAST *ParseParenExpr() { in ParseParenExpr()
354 ExprAST *V = ParseExpression(); in ParseParenExpr()
364 static ExprAST *ParseIfExpr() { in ParseIfExpr()
368 ExprAST *Cond = ParseExpression(); in ParseIfExpr()
375 ExprAST *Then = ParseExpression(); in ParseIfExpr()
383 ExprAST *Else = ParseExpression(); in ParseIfExpr()
390 static ExprAST *ParseForExpr() { in ParseForExpr()
404 ExprAST *Start = ParseExpression(); in ParseForExpr()
410 ExprAST *End = ParseExpression(); in ParseForExpr()
414 ExprAST *Step = 0; in ParseForExpr()
425 ExprAST *Body = ParseExpression(); in ParseForExpr()
433 static ExprAST *ParseVarExpr() { in ParseVarExpr()
436 std::vector<std::pair<std::string, ExprAST*> > VarNames; in ParseVarExpr()
447 ExprAST *Init = 0; in ParseVarExpr()
470 ExprAST *Body = ParseExpression(); in ParseVarExpr()
483 static ExprAST *ParsePrimary() { in ParsePrimary()
498 static ExprAST *ParseUnary() { in ParseUnary()
506 if (ExprAST *Operand = ParseUnary()) in ParseUnary()
513 static ExprAST *ParseBinOpRHS(int ExprPrec, ExprAST *LHS) { in ParseBinOpRHS()
528 ExprAST *RHS = ParseUnary(); in ParseBinOpRHS()
547 static ExprAST *ParseExpression() { in ParseExpression()
548 ExprAST *LHS = ParseUnary(); in ParseExpression()
625 if (ExprAST *E = ParseExpression()) in ParseDefinition()
632 if (ExprAST *E = ParseExpression()) { in ParseTopLevelExpr()
1335 ExprAST *Init = VarNames[i].second; in Codegen()