From 269b1fbf5d4d2c9ad33e75fb000d388b8391cb0f Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 8 Sep 2022 10:16:49 +0800 Subject: fix doc. --- doc/docs/doc/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/docs/doc/README.md b/doc/docs/doc/README.md index 5e81d4c..46511ea 100755 --- a/doc/docs/doc/README.md +++ b/doc/docs/doc/README.md @@ -69,8 +69,8 @@ inventory = -- metatable manipulation apple = size: 15 - : {color: 0x00ffff} -p apple.color, apple. if apple.<>? + <index>: {color: 0x00ffff} +p apple.color, apple.<index> if apple.<>? -- js-like export syntax export yuescript = "ζœˆδΉ‹θ„šζœ¬" @@ -452,18 +452,18 @@ close _ = : -> print "out of scope"
 mt = {}
-add = (right)=> <>: mt, value: @value + right.value
+add = (right)=> <>: mt, value: @value + right.value
 mt.__add = add
 
-a = <>: mt, value: 1
+a = <>: mt, value: 1
  -- set field with variable of the same name
-b = :, value: 2
-c = : mt.__add, value: 3
+b = :<add>, value: 2
+c = <add>: mt.__add, value: 3
 
 d = a + b + c
 print d.value
 
-close _ = : -> print "out of scope"
+close _ = <close>: -> print "out of scope"
 
@@ -483,10 +483,10 @@ print tb.item
 -- create with metatable containing field "value"
-tb = <"value">: 123
-tb. = tb.<>
+tb = <"value">: 123
+tb.<index> = tb.<>
 print tb.value
-tb.<> = __index: {item: "hello"}
+tb.<> = __index: {item: "hello"}
 print tb.item
 
@@ -500,7 +500,7 @@ print item, new, close, getter ```
-{item, :new, :, : getter} = tb
+{item, :new, :<close>, <index>: getter} = tb
 print item, new, close, getter
 
-- cgit v1.2.3-55-g6feb