Add string concat
This commit is contained in:
parent
b1f9e5cefc
commit
96e6a87f64
@ -139,6 +139,7 @@ impl Evaluator {
|
||||
match &op[..] {
|
||||
"+" => match (left, right) {
|
||||
(Number(l), Number(r)) => Number(l + r),
|
||||
(StringLiteral(s1), StringLiteral(s2)) => StringLiteral(format!("{}{}", s1, s2)),
|
||||
_ => Null,
|
||||
},
|
||||
"-" => match (left, right) {
|
||||
|
Loading…
Reference in New Issue
Block a user