Lines Matching refs:ExprAST
78 /// ExprAST - Base class for all expression nodes.
79 class ExprAST {
81 virtual ~ExprAST() {}
85 class NumberExprAST : public ExprAST {
92 class VariableExprAST : public ExprAST {
99 class BinaryExprAST : public ExprAST {
101 ExprAST *LHS, *RHS;
103 BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs)
108 class CallExprAST : public ExprAST {
110 std::vector<ExprAST*> Args;
112 CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)
131 ExprAST *Body;
133 FunctionAST(PrototypeAST *proto, ExprAST *body)
166 ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str);return 0;}
170 static ExprAST *ParseExpression();
175 static ExprAST *ParseIdentifierExpr() {
185 std::vector<ExprAST*> Args;
188 ExprAST *Arg = ParseExpression();
207 static ExprAST *ParseNumberExpr() {
208 ExprAST *Result = new NumberExprAST(NumVal);
214 static ExprAST *ParseParenExpr() {
216 ExprAST *V = ParseExpression();
229 static ExprAST *ParsePrimary() {
240 static ExprAST *ParseBinOpRHS(int ExprPrec, ExprAST *LHS) {
255 ExprAST *RHS = ParsePrimary();
274 static ExprAST *ParseExpression() {
275 ExprAST *LHS = ParsePrimary();
311 if (ExprAST *E = ParseExpression())
318 if (ExprAST *E = ParseExpression()) {