implemented infix operator parsing
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
|
||||
namespace ast {
|
||||
|
||||
infix_expr::infix_expr(
|
||||
token::token token, std::string op, ast::expression* left
|
||||
)
|
||||
: token(std::move(token)),
|
||||
op(op),
|
||||
left(left) {}
|
||||
|
||||
std::string infix_expr::token_literal() const {
|
||||
return token.literal;
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
namespace ast {
|
||||
struct infix_expr : expression {
|
||||
infix_expr(token::token, std::string, ast::expression*);
|
||||
token::token token;
|
||||
expression* left;
|
||||
std::string op;
|
||||
|
Reference in New Issue
Block a user