Added arrays and tables to the bytecode inspector

Currently searching for an issue related to compounds.
This commit is contained in:
2026-04-22 14:31:17 +10:00
parent 9bb115f732
commit 63dfd33e5e
5 changed files with 71 additions and 11 deletions
+35
View File
@@ -0,0 +1,35 @@
//array outside a table
var a = [
[1, 2, 3],
["alpha": 1, "beta": 2, "gamma": 3],
[7, 8, 9],
];
print a;
//table outside an array
var t = [
"alpha": [1,2,3],
"beta": [4,5,6],
"gamma": [7,8,9],
];
print t;
//we need to go deeper
var deeper = [
[1, 2, 3],
[
"alpha": [1,2,3],
"beta": [4,5,6],
"gamma": [7,[
"delta":10,"epsilon":11,"foxtrot":12
],9],
],
[7, 8, 9],
];
print deeper;
+14
View File
@@ -0,0 +1,14 @@
//snipped out of the tests, this seems fine?
//nested
var example = [
"outer": ["inner": true],
"alpha": 1,
"beta": 2,
"gamma": 3
];
print example;
assert example == ["alpha": 1, "beta": 2, "gamma": 3, "outer": ["inner": true]], "nested tables failed";
return example;