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

10
lox/class_this.lox Normal file
View file

@ -0,0 +1,10 @@
class Cake {
taste() {
var adjective = "delicious";
print "The " + this.flavor + " cake is " + adjective + "!";
}
}
var cake = Cake();
cake.flavor = "German chocolate";
cake.taste();