mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Arrays and dictionaries have been implemented, read more
The arrays and dictionaries are currently being printed out correctly, afaik. This means I should be able to go back and work on the type system, assuming nothing happens.
This commit is contained in:
@@ -23,14 +23,17 @@ print 2 + (3 * 3);
|
||||
}
|
||||
print "Back to the outer scope.";
|
||||
|
||||
//test asserts
|
||||
assert true, "This won't be seen";
|
||||
assert false, "This is an error";
|
||||
|
||||
|
||||
|
||||
|
||||
print [1, 2, 3];
|
||||
print [4, 5];
|
||||
print ["key":"value"];
|
||||
|
||||
|
||||
//var arr : [int] = [1, 2, 3, 42];
|
||||
//var dict : [string, int] = ["hello": 1, "world":2];
|
||||
|
||||
|
||||
//test asserts at the end of the file
|
||||
assert true, "This won't be seen";
|
||||
assert false, "This is a failed assert, and will end execution";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user