match to switch; Optional semicolons after "import" statements

This commit is contained in:
Ginger Bill
2017-10-01 17:09:57 +01:00
parent f38c8875b2
commit c1e720a49b
33 changed files with 641 additions and 451 deletions
+4 -4
View File
@@ -150,7 +150,7 @@ union_type :: proc() {
val = nil;
match v in val {
switch v in val {
case int: fmt.println("int", v);
case bool: fmt.println("bool", v);
case: fmt.println("nil");
@@ -171,7 +171,7 @@ union_type :: proc() {
val = nil;
match v in val {
switch v in val {
case int: fmt.println("int", v);
case bool: fmt.println("bool", v);
case: fmt.println("nil");
@@ -218,7 +218,7 @@ union_type :: proc() {
entity := new_entity(Monster);
match e in entity.derived {
switch e in entity.derived {
case Frog:
fmt.println("Ribbit");
case Monster:
@@ -262,7 +262,7 @@ union_type :: proc() {
entity := new_entity(Monster);
match e in entity.derived {
switch e in entity.derived {
case Frog:
fmt.println("Ribbit");
case Monster: