Add string concat

This commit is contained in:
greg 2016-01-22 04:55:01 -08:00
parent b1f9e5cefc
commit 96e6a87f64
1 changed files with 1 additions and 0 deletions

View File

@ -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) {