Lines Matching refs:ExprAST
119 struct ExprAST { struct
120 virtual ~ExprAST() {} in ~ExprAST() argument
125 struct NumberExprAST : public ExprAST {
133 struct VariableExprAST : public ExprAST {
141 struct UnaryExprAST : public ExprAST {
142 UnaryExprAST(char Opcode, std::unique_ptr<ExprAST> Operand) in UnaryExprAST()
148 std::unique_ptr<ExprAST> Operand;
152 struct BinaryExprAST : public ExprAST {
153 BinaryExprAST(char Op, std::unique_ptr<ExprAST> LHS, in BinaryExprAST()
154 std::unique_ptr<ExprAST> RHS) in BinaryExprAST()
160 std::unique_ptr<ExprAST> LHS, RHS;
164 struct CallExprAST : public ExprAST {
166 std::vector<std::unique_ptr<ExprAST>> Args) in CallExprAST()
172 std::vector<std::unique_ptr<ExprAST>> Args;
176 struct IfExprAST : public ExprAST {
177 IfExprAST(std::unique_ptr<ExprAST> Cond, std::unique_ptr<ExprAST> Then, in IfExprAST()
178 std::unique_ptr<ExprAST> Else) in IfExprAST()
182 std::unique_ptr<ExprAST> Cond, Then, Else;
186 struct ForExprAST : public ExprAST {
187 ForExprAST(std::string VarName, std::unique_ptr<ExprAST> Start, in ForExprAST()
188 std::unique_ptr<ExprAST> End, std::unique_ptr<ExprAST> Step, in ForExprAST()
189 std::unique_ptr<ExprAST> Body) in ForExprAST()
196 std::unique_ptr<ExprAST> Start, End, Step, Body;
200 struct VarExprAST : public ExprAST {
201 typedef std::pair<std::string, std::unique_ptr<ExprAST>> Binding;
204 VarExprAST(BindingList VarBindings, std::unique_ptr<ExprAST> Body) in VarExprAST()
210 std::unique_ptr<ExprAST> Body;
241 std::unique_ptr<ExprAST> Body) in FunctionAST()
247 std::unique_ptr<ExprAST> Body;
289 static std::unique_ptr<ExprAST> ParseExpression();
294 static std::unique_ptr<ExprAST> ParseIdentifierExpr() { in ParseIdentifierExpr()
304 std::vector<std::unique_ptr<ExprAST>> Args; in ParseIdentifierExpr()
333 static std::unique_ptr<ExprAST> ParseParenExpr() { in ParseParenExpr()
340 return ErrorU<ExprAST>("expected ')'"); in ParseParenExpr()
346 static std::unique_ptr<ExprAST> ParseIfExpr() { in ParseIfExpr()
355 return ErrorU<ExprAST>("expected then"); in ParseIfExpr()
363 return ErrorU<ExprAST>("expected else"); in ParseIfExpr()
402 std::unique_ptr<ExprAST> Step; in ParseForExpr()
438 std::unique_ptr<ExprAST> Init; in ParseVarExpr()
476 static std::unique_ptr<ExprAST> ParsePrimary() { in ParsePrimary()
478 default: return ErrorU<ExprAST>("unknown token when expecting an expression"); in ParsePrimary()
491 static std::unique_ptr<ExprAST> ParseUnary() { in ParseUnary()
506 static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec, in ParseBinOpRHS()
507 std::unique_ptr<ExprAST> LHS) { in ParseBinOpRHS()
543 static std::unique_ptr<ExprAST> ParseExpression() { in ParseExpression()