mfichman / jogo

High(er) performance compiled programming language with clean, powerful syntax
MIT License
6 stars 1 forks source link

Allow 'default' case in match statements #50

Closed mfichman closed 11 years ago

mfichman commented 11 years ago
match variable {
with 8: 
    Io::println('matched 8')
with 7: 
    Io::println('matched 7')
default:
    Io::println('default')
}
mfichman commented 11 years ago

Default case uses the wildcard * character:

   match var {
   with *: Io::println("default")
   }