Lines Matching refs:ExprAST
129 class ExprAST { class
131 virtual ~ExprAST() {} in ~ExprAST()
136 class NumberExprAST : public ExprAST {
145 class VariableExprAST : public ExprAST {
155 class UnaryExprAST : public ExprAST {
157 ExprAST *Operand;
160 UnaryExprAST(char opcode, ExprAST *operand) in UnaryExprAST()
166 class BinaryExprAST : public ExprAST {
168 ExprAST *LHS, *RHS;
171 BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) in BinaryExprAST()
177 class CallExprAST : public ExprAST {
179 std::vector<ExprAST *> Args;
182 CallExprAST(const std::string &callee, std::vector<ExprAST *> &args) in CallExprAST()
188 class IfExprAST : public ExprAST {
189 ExprAST *Cond, *Then, *Else;
192 IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) in IfExprAST()
198 class ForExprAST : public ExprAST {
200 ExprAST *Start, *End, *Step, *Body;
203 ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, in ForExprAST()
204 ExprAST *step, ExprAST *body) in ForExprAST()
210 class VarExprAST : public ExprAST {
211 std::vector<std::pair<std::string, ExprAST *> > VarNames;
212 ExprAST *Body;
215 VarExprAST(const std::vector<std::pair<std::string, ExprAST *> > &varnames, in VarExprAST()
216 ExprAST *body) in VarExprAST()
252 ExprAST *Body;
255 FunctionAST(PrototypeAST *proto, ExprAST *body) : Proto(proto), Body(body) {} in FunctionAST()
288 ExprAST *Error(const char *Str) { in Error()
301 static ExprAST *ParseExpression();
306 static ExprAST *ParseIdentifierExpr() { in ParseIdentifierExpr()
316 std::vector<ExprAST *> Args; in ParseIdentifierExpr()
319 ExprAST *Arg = ParseExpression(); in ParseIdentifierExpr()
340 static ExprAST *ParseNumberExpr() { in ParseNumberExpr()
341 ExprAST *Result = new NumberExprAST(NumVal); in ParseNumberExpr()
347 static ExprAST *ParseParenExpr() { in ParseParenExpr()
349 ExprAST *V = ParseExpression(); in ParseParenExpr()
360 static ExprAST *ParseIfExpr() { in ParseIfExpr()
364 ExprAST *Cond = ParseExpression(); in ParseIfExpr()
372 ExprAST *Then = ParseExpression(); in ParseIfExpr()
381 ExprAST *Else = ParseExpression(); in ParseIfExpr()
389 static ExprAST *ParseForExpr() { in ParseForExpr()
402 ExprAST *Start = ParseExpression(); in ParseForExpr()
409 ExprAST *End = ParseExpression(); in ParseForExpr()
414 ExprAST *Step = 0; in ParseForExpr()
426 ExprAST *Body = ParseExpression(); in ParseForExpr()
435 static ExprAST *ParseVarExpr() { in ParseVarExpr()
438 std::vector<std::pair<std::string, ExprAST *> > VarNames; in ParseVarExpr()
449 ExprAST *Init = 0; in ParseVarExpr()
474 ExprAST *Body = ParseExpression(); in ParseVarExpr()
488 static ExprAST *ParsePrimary() { in ParsePrimary()
510 static ExprAST *ParseUnary() { in ParseUnary()
518 if (ExprAST *Operand = ParseUnary()) in ParseUnary()
525 static ExprAST *ParseBinOpRHS(int ExprPrec, ExprAST *LHS) { in ParseBinOpRHS()
540 ExprAST *RHS = ParseUnary(); in ParseBinOpRHS()
561 static ExprAST *ParseExpression() { in ParseExpression()
562 ExprAST *LHS = ParseUnary(); in ParseExpression()
641 if (ExprAST *E = ParseExpression()) in ParseDefinition()
648 if (ExprAST *E = ParseExpression()) { in ParseTopLevelExpr()
947 ExprAST *Init = VarNames[i].second; in Codegen()