diff options
author | Li Jin <dragon-fly@qq.com> | 2020-02-26 11:46:27 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-02-26 11:46:27 +0800 |
commit | 3b94999e55df35d19616e87d7f3b6fddf5b8a30b (patch) | |
tree | bc539a1d164a9bce433abaff3c5977fcd6c79b4b /spec | |
parent | 7f18f8cce64f50fb0fb8ba46078860d93b883f21 (diff) | |
download | yuescript-3b94999e55df35d19616e87d7f3b6fddf5b8a30b.tar.gz yuescript-3b94999e55df35d19616e87d7f3b6fddf5b8a30b.tar.bz2 yuescript-3b94999e55df35d19616e87d7f3b6fddf5b8a30b.zip |
add fat arrow support for backcall statement.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/inputs/backcall.moon | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/inputs/backcall.moon b/spec/inputs/backcall.moon index 3aedba9..2972b1d 100644 --- a/spec/inputs/backcall.moon +++ b/spec/inputs/backcall.moon | |||
@@ -90,4 +90,17 @@ do | |||
90 | (data)<- loadAsync file | 90 | (data)<- loadAsync file |
91 | addToCache file,data) |> reduce 0,(a,b)-> a+b | 91 | addToCache file,data) |> reduce 0,(a,b)-> a+b |
92 | 92 | ||
93 | propA = do | ||
94 | (value)<= property => @_value | ||
95 | print "old value: #{@_value}" | ||
96 | print "new value: #{value}" | ||
97 | @_value = value | ||
98 | |||
99 | propB = do | ||
100 | <= property _, (value)=> | ||
101 | print "old value: #{@_value}" | ||
102 | print "new value: #{value}" | ||
103 | @_value = value | ||
104 | @_value | ||
105 | |||
93 | alert "hi" | 106 | alert "hi" |