Add array concat operator
This commit is contained in:
@@ -147,6 +147,14 @@ impl Parser {
|
||||
},
|
||||
span,
|
||||
),
|
||||
InfixKind::Concat => self.ast.push(
|
||||
Expr::Binary {
|
||||
op: BinaryOp::Concat,
|
||||
lhs,
|
||||
rhs,
|
||||
},
|
||||
span,
|
||||
),
|
||||
InfixKind::Equal => self.ast.push(
|
||||
Expr::Binary {
|
||||
op: BinaryOp::Equal,
|
||||
@@ -532,6 +540,7 @@ impl Parser {
|
||||
TokenKind::Gte => Some((InfixKind::GreaterEqual, 11, 12)),
|
||||
TokenKind::Lt => Some((InfixKind::Less, 11, 12)),
|
||||
TokenKind::Lte => Some((InfixKind::LessEqual, 11, 12)),
|
||||
TokenKind::PlusPlus => Some((InfixKind::Concat, 12, 13)),
|
||||
TokenKind::Plus => Some((InfixKind::Add, 13, 14)),
|
||||
TokenKind::Minus => Some((InfixKind::Sub, 13, 14)),
|
||||
TokenKind::Star => Some((InfixKind::Mul, 15, 16)),
|
||||
@@ -632,6 +641,7 @@ enum InfixKind {
|
||||
Sub,
|
||||
Mul,
|
||||
Div,
|
||||
Concat,
|
||||
Equal,
|
||||
NotEqual,
|
||||
Greater,
|
||||
|
||||
Reference in New Issue
Block a user