assert_equal('a0.123', 'a' .. 0.123)
endif
+ assert_equal(3, 1 + [2, 3, 4][0])
+ assert_equal(5, 2 + {key: 3}['key'])
+
set digraph
assert_equal('val: true', 'val: ' .. &digraph)
set nodigraph
/*
* List: [expr, expr]
*/
- case '[': ret = compile_list(arg, cctx, ppconst);
+ case '[': if (generate_ppconst(cctx, ppconst) == FAIL)
+ return FAIL;
+ ret = compile_list(arg, cctx, ppconst);
break;
/*
* Dictionary: {'key': val, 'key': val}
*/
- case '{': ret = compile_dict(arg, cctx, ppconst);
+ case '{': if (generate_ppconst(cctx, ppconst) == FAIL)
+ return FAIL;
+ ret = compile_dict(arg, cctx, ppconst);
break;
/*