mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Added scopes using '{}' symbols, read more
I've also added a new literal type called 'identifier'. This will be used for variable names, and has a type mask embedded in it.
This commit is contained in:
@@ -14,7 +14,16 @@ print -69;
|
||||
print -4.20;
|
||||
print 2 + (3 * 3);
|
||||
|
||||
assert true, "This won't be seen";
|
||||
//test scopes
|
||||
{
|
||||
print "This statement is within a scope.";
|
||||
{
|
||||
print "This is a deeper scope.";
|
||||
}
|
||||
}
|
||||
print "Back to the outer scope.";
|
||||
|
||||
//test asserts
|
||||
assert true, "This won't be seen";
|
||||
assert false, "This is an error";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user