#REFACTORING by exept draft
authorClaus Gittinger <cg@exept.de>
Sun, 08 Sep 2019 15:49:47 +0200
changeset 644 0bf7cd45f7eb
parent 641 ef3a2a415733
child 645 2f598ee17a2d
#REFACTORING by exept class: PPSequenceParser changed: #map: (send #== instead of #=, send #argumentCount instead of #numArgs)
PPSequenceParser.st
--- a/PPSequenceParser.st	Sat Jun 29 03:27:35 2019 +0000
+++ b/PPSequenceParser.st	Sun Sep 08 15:49:47 2019 +0200
@@ -1,5 +1,9 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:goodies/petitparser' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPListParser subclass:#PPSequenceParser
 	instanceVariableNames:''
 	classVariableNames:''
@@ -67,9 +71,9 @@
 !PPSequenceParser methodsFor:'operators-mapping'!
 
 map: aBlock
-	^ aBlock numArgs = self children size
-		ifTrue: [ self ==> [ :nodes | aBlock valueWithArguments: nodes ] ]
-		ifFalse: [ self error: aBlock numArgs asString , ' arguments expected.' ]
+        ^ aBlock argumentCount == self children size
+                ifTrue: [ self ==> [ :nodes | aBlock valueWithArguments: nodes ] ]
+                ifFalse: [ self error: aBlock argumentCount asString , ' arguments expected.' ]
 ! !
 
 !PPSequenceParser methodsFor:'parsing'!
@@ -93,14 +97,14 @@
 !PPSequenceParser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPSequenceParser.st,v 1.4 2014-03-04 14:33:25 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPSequenceParser.st,v 1.4 2014-03-04 14:33:25 cg Exp $'
+    ^ '$Header$'
 !
 
 version_SVN
-    ^ '$Id: PPSequenceParser.st,v 1.4 2014-03-04 14:33:25 cg Exp $'
+    ^ '$Id$'
 ! !