implement chapter 13 in rust!

This commit is contained in:
Sebastian Hugentobler 2025-05-26 10:19:18 +02:00
parent 621c97102a
commit 32e5e8a41a
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
23 changed files with 318 additions and 19 deletions

14
lox/super_call.lox Normal file
View file

@ -0,0 +1,14 @@
class Doughnut {
cook() {
print "Fry until golden brown.";
}
}
class BostonCream < Doughnut {
cook() {
super.cook();
print "Pipe full of custard and coat with chocolate.";
}
}
BostonCream().cook();