. @[1 2 3]; var x = @[1 2 3] var x = $(echo hi) var x = ${x} var x = "quoted ${x}" . var x = y + 2 * 3; var x = "one\ntwo\n"; var x = [1,2,3]; var x = [4+5, 6+7*8] var x = [] var x = [x for x in y] . var x = @(a b); var x = @('c' $'string\n'); var x = @($(echo command) $(echo sub)); (command.Sentence child: (C {(Id.Lit_Other '@') (Id.Lit_LBracket '[') (1)} {(2)} {(3) (Id.Lit_RBracket ']')}) terminator: ) --- @[1 2 3] (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.ArrayLiteral left: items: [(Const Id.Expr_DecInt 1) (Const Id.Expr_DecInt 2) (Const Id.Expr_DecInt 3)] ) ) --- $(echo hi) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) ) ) --- ${x} (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (${ Id.VSub_Name x) ) --- "quoted ${x}" (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (DQ ('quoted ') (${ Id.VSub_Name x)) ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.Binary op: left: (Var y) right: (expr.Binary op: left: (Const Id.Expr_DecInt 2) right: (Const Id.Expr_DecInt 3) ) ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (DQ (one) (Id.Lit_Other '\\') (ntwo) (Id.Lit_Other '\\') (n)) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.List elts: [(Const Id.Expr_DecInt 1) (Const Id.Expr_DecInt 2) (Const Id.Expr_DecInt 3)] ctx: expr_context.Store ) ) terminator: ) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.List elts: [ (expr.Binary op: left: (Const Id.Expr_DecInt 4) right: (Const Id.Expr_DecInt 5) ) (expr.Binary op: left: (Const Id.Expr_DecInt 6) right: (expr.Binary op: left: (Const Id.Expr_DecInt 7) right: (Const Id.Expr_DecInt 8) ) ) ] ctx: expr_context.Store ) ) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.List ctx:expr_context.Store) ) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.ListComp elt: (Var x) generators: [(comprehension lhs:[(name_type name:)] iter:(Var y))] ) ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (sh_array_literal left: words:[{(a)} {(b)}]) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (sh_array_literal left: words: [ {(SQ )} { (single_quoted left: tokens: [ ] ) } ] ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (sh_array_literal left: words: [ { (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)} {(c var x = @(a b) * @($c ${d}); var x = @( a b c ); . var x = $(echo hi); var x = $(echo $(echo hi)); var x = $(echo hi) var x = $(echo $((1+2))); var x = $(for i in 1 2 3; do echo $i; done); var x = @(a b) ommand)})]) ) } { (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)} {(sub)})]) ) } ] ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (expr.Binary op: left: (sh_array_literal left: words:[{(a)} {(b)}]) right: (sh_array_literal left: words: [{($ Id.VSub_DollarName '$c')} {(${ Id.VSub_Name d)}] ) ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (sh_array_literal left: words:[{(a)} {(b)} {(c)}]) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children: [ (C {(echo)} { (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) ) } ) ] ) ) ) terminator: ) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children:[(C {(echo)}) (C {(hi)})]) ) ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children: [ (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } ) ] ) ) ) terminator: ) (command.Sentence child: (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (command_sub left_token: command_list: (command.CommandList children: [ (command.ForEach iter_name: i iter_words: [{(1)} {(2)} {(3)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {($ Id.VSub_DollarName '$i')}) terminator: ) ] ) ) ] ) ) ) terminator: ) (command.VarDecl keyword: lhs: [(name_type name:)] rhs: (sh_array_literal left: words:[{(a)} {(b)}]) )