aboutsummaryrefslogtreecommitdiff
path: root/doc/docs/de
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-02-28 18:03:14 +0800
committerLi Jin <dragon-fly@qq.com>2026-02-28 18:03:14 +0800
commit29db60797bd74656b57a0f20778c76adc78095ac (patch)
treee7e54bb45011bb1dc5ba159c80dfffd396a61eed /doc/docs/de
parent394ee0f64a0dc022f1dab86213d4771982ecf987 (diff)
downloadyuescript-29db60797bd74656b57a0f20778c76adc78095ac.tar.gz
yuescript-29db60797bd74656b57a0f20778c76adc78095ac.tar.bz2
yuescript-29db60797bd74656b57a0f20778c76adc78095ac.zip
Fixed destructuring with empty and comment lines in table issue. Updated docs.v0.33.7
Diffstat (limited to 'doc/docs/de')
-rw-r--r--doc/docs/de/doc/objects/object-oriented-programming.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/docs/de/doc/objects/object-oriented-programming.md b/doc/docs/de/doc/objects/object-oriented-programming.md
index 706cfda..705fc08 100644
--- a/doc/docs/de/doc/objects/object-oriented-programming.md
+++ b/doc/docs/de/doc/objects/object-oriented-programming.md
@@ -40,6 +40,28 @@ Beachte, dass alle Methoden in der Klasse die Fat-Arrow-Syntax verwenden. Beim A
40 40
41Das `@`-Präfix ist Kurzform für `self.`. `@items` wird zu `self.items`. 41Das `@`-Präfix ist Kurzform für `self.`. `@items` wird zu `self.items`.
42 42
43Der Klassenblock unterstützt auch Metatable-Felder, indem Metamethod-Schlüssel in spitzen Klammern geschrieben werden, zum Beispiel `<tostring>`.
44
45```yuescript
46class User
47 new: (@name) =>
48 <tostring>: => "User(#{@name})"
49
50print tostring User "Yue"
51```
52
53<YueDisplay>
54
55```yue
56class User
57 new: (@name) =>
58 <tostring>: => "User(#{@name})"
59
60print tostring User "Yue"
61```
62
63</YueDisplay>
64
43Eine Instanz der Klasse wird erstellt, indem man den Klassennamen wie eine Funktion aufruft. 65Eine Instanz der Klasse wird erstellt, indem man den Klassennamen wie eine Funktion aufruft.
44 66
45```yuescript 67```yuescript