aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/class.moon
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-01-18 18:15:24 +0800
committerLi Jin <dragon-fly@qq.com>2020-01-18 18:15:24 +0800
commit8d1af508f4173e4af6a4ea98584c1a86619f6a20 (patch)
tree0264c4b01f1152d8114cf46aea6fd773276c0b01 /spec/inputs/class.moon
parentf53ccb373efbf6f6f40284111df309e351c2c18f (diff)
downloadyuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.gz
yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.bz2
yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.zip
fix Moonscript issue 122, add support for ? operator.
Diffstat (limited to 'spec/inputs/class.moon')
-rw-r--r--spec/inputs/class.moon30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/inputs/class.moon b/spec/inputs/class.moon
index 9a98055..2290bc7 100644
--- a/spec/inputs/class.moon
+++ b/spec/inputs/class.moon
@@ -73,11 +73,11 @@ class CoolSuper
73 hi: => 73 hi: =>
74 super(1,2,3,4) 1,2,3,4 74 super(1,2,3,4) 1,2,3,4
75 super.something 1,2,3,4 75 super.something 1,2,3,4
76 super.something(1,2,3,4).world 76 _ = super.something(1,2,3,4).world
77 super\yeah"world".okay hi, hi, hi 77 super\yeah"world".okay hi, hi, hi
78 something.super 78 _ = something.super
79 super.super.super.super 79 _ = super.super.super.super
80 super\hello 80 _ = super\hello
81 nil 81 nil
82 82
83 83
@@ -114,11 +114,11 @@ y = @@
114@ = 343 114@ = 343
115@.hello 2,3,4 115@.hello 2,3,4
116 116
117hello[@].world 117_ = hello[@].world
118 118
119 119
120class Whacko 120class Whacko
121 @hello 121 _ = @hello
122 if something 122 if something
123 print "hello world" 123 print "hello world"
124 124
@@ -132,20 +132,20 @@ print "hello"
132 132
133yyy = -> 133yyy = ->
134 class Cool 134 class Cool
135 nil 135 _ = nil
136 136
137 137
138-- 138--
139 139
140class a.b.c.D 140class a.b.c.D
141 nil 141 _ = nil
142 142
143 143
144class a.b["hello"] 144class a.b["hello"]
145 nil 145 _ = nil
146 146
147class (-> require "moon")!.Something extends Hello.World 147class (-> require "moon")!.Something extends Hello.World
148 nil 148 _ = nil
149 149
150-- 150--
151 151
@@ -160,7 +160,7 @@ print (class WhatsUp).__name
160 160
161export ^ 161export ^
162class Something 162class Something
163 nil 163 _ = nil
164 164
165 165
166-- 166--
@@ -197,17 +197,17 @@ class Whack extends Thing
197class Wowha extends Thing 197class Wowha extends Thing
198 @butt: -> 198 @butt: ->
199 super! 199 super!
200 super.hello 200 _ = super.hello
201 super\hello! 201 super\hello!
202 super\hello 202 _ = super\hello
203 203
204 204
205 @zone: cool { 205 @zone: cool {
206 -> 206 ->
207 super! 207 super!
208 super.hello 208 _ = super.hello
209 super\hello! 209 super\hello!
210 super\hello 210 _ = super\hello
211 } 211 }
212 212
213nil 213nil