Skip to content

Commit

Permalink
Quote dollar for by ref array concatenation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdwalters committed Dec 5, 2024
1 parent e80a92d commit e02275a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/expression/binop/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ impl TranslateModule for Add {
match self.kind {
Type::Array(_) => {
let quote = meta.gen_quote();
let dollar = meta.gen_dollar();
let id = meta.gen_value_id();
let name = format!("__AMBER_ARRAY_ADD_{id}");
meta.stmt_queue.push_back(format!("{name}=({left} {right})"));
format!("{quote}${{{name}[@]}}{quote}")
format!("{quote}{dollar}{{{name}[@]}}{quote}")
},
Type::Text => format!("{}{}", left, right),
_ => translate_computation(meta, ArithOp::Add, Some(left), Some(right))
Expand Down

0 comments on commit e02275a

Please sign in to comment.