@@ -210,12 +210,17 @@ def RAssign(value, operator, pattern)
210210 end
211211
212212 # Create a new ClassDeclaration node.
213- def ClassDeclaration ( constant , superclass , bodystmt )
213+ def ClassDeclaration (
214+ constant ,
215+ superclass ,
216+ bodystmt ,
217+ location = Location . default
218+ )
214219 ClassDeclaration . new (
215220 constant : constant ,
216221 superclass : superclass ,
217222 bodystmt : bodystmt ,
218- location : Location . default
223+ location : location
219224 )
220225 end
221226
@@ -225,12 +230,12 @@ def Comma(value)
225230 end
226231
227232 # Create a new Command node.
228- def Command ( message , arguments , block )
233+ def Command ( message , arguments , block , location = Location . default )
229234 Command . new (
230235 message : message ,
231236 arguments : arguments ,
232237 block : block ,
233- location : Location . default
238+ location : location
234239 )
235240 end
236241
@@ -247,8 +252,8 @@ def CommandCall(receiver, operator, message, arguments, block)
247252 end
248253
249254 # Create a new Comment node.
250- def Comment ( value , inline )
251- Comment . new ( value : value , inline : inline , location : Location . default )
255+ def Comment ( value , inline , location = Location . default )
256+ Comment . new ( value : value , inline : inline , location : location )
252257 end
253258
254259 # Create a new Const node.
@@ -285,14 +290,21 @@ def CVar(value)
285290 end
286291
287292 # Create a new DefNode node.
288- def DefNode ( target , operator , name , params , bodystmt )
293+ def DefNode (
294+ target ,
295+ operator ,
296+ name ,
297+ params ,
298+ bodystmt ,
299+ location = Location . default
300+ )
289301 DefNode . new (
290302 target : target ,
291303 operator : operator ,
292304 name : name ,
293305 params : params ,
294306 bodystmt : bodystmt ,
295- location : Location . default
307+ location : location
296308 )
297309 end
298310
@@ -565,8 +577,8 @@ def MAssign(target, value)
565577 end
566578
567579 # Create a new MethodAddBlock node.
568- def MethodAddBlock ( call , block )
569- MethodAddBlock . new ( call : call , block : block , location : Location . default )
580+ def MethodAddBlock ( call , block , location = Location . default )
581+ MethodAddBlock . new ( call : call , block : block , location : location )
570582 end
571583
572584 # Create a new MLHS node.
0 commit comments