diff options
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/destructure.yue | 23 | ||||
| -rw-r--r-- | spec/inputs/metatable.yue | 11 |
2 files changed, 33 insertions, 1 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue index 6b52441..c68045d 100644 --- a/spec/inputs/destructure.yue +++ b/spec/inputs/destructure.yue | |||
| @@ -41,7 +41,28 @@ do | |||
| 41 | "Bellagio, Italy 22021" | 41 | "Bellagio, Italy 22021" |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | {poet: {:name, address: {street, city}}} = futurists | 44 | do {poet: {:name, address: {street, city}}} = futurists |
| 45 | |||
| 46 | do { | ||
| 47 | :sculptor | ||
| 48 | :painter | ||
| 49 | poet: | ||
| 50 | :name | ||
| 51 | address: | ||
| 52 | * street | ||
| 53 | * city | ||
| 54 | } = futurists | ||
| 55 | |||
| 56 | do | ||
| 57 | a: | ||
| 58 | b: c | ||
| 59 | d: e = tb | ||
| 60 | |||
| 61 | do | ||
| 62 | a: | ||
| 63 | * b: c | ||
| 64 | * d: e | ||
| 65 | * f = tb | ||
| 45 | 66 | ||
| 46 | -- | 67 | -- |
| 47 | 68 | ||
diff --git a/spec/inputs/metatable.yue b/spec/inputs/metatable.yue index 13ea917..100844c 100644 --- a/spec/inputs/metatable.yue +++ b/spec/inputs/metatable.yue | |||
| @@ -48,4 +48,15 @@ with tb | |||
| 48 | b = t#.close#.test | 48 | b = t#.close#.test |
| 49 | c = t #.close# .test | 49 | c = t #.close# .test |
| 50 | 50 | ||
| 51 | #:mt = a | ||
| 52 | a = #:mt | ||
| 53 | a = #:__index:mt | ||
| 54 | |||
| 55 | local index | ||
| 56 | #:__index:index = a | ||
| 57 | :index# = a | ||
| 58 | |||
| 59 | do #:{new:ctor, :update} = a | ||
| 60 | do {new:ctor, :update} = a.# | ||
| 61 | |||
| 51 | nil | 62 | nil |
