compiler/extensions.st
changeset 480 5b0254cca4db
parent 477 b18b6cc7aabc
child 484 e829f3860745
--- a/compiler/extensions.st	Tue Jun 02 00:16:55 2015 +0100
+++ b/compiler/extensions.st	Tue Jun 02 17:25:57 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:goodies/petitparser/compiler' }"!
 
 !Character methodsFor:'*petitcompiler'!
@@ -625,6 +627,16 @@
     ^ aCollection
 ! !
 
+!PPSequenceParser methodsFor:'*petitcompiler'!
+
+map: aBlock
+        ^ aBlock numArgs = self children size
+                ifTrue: [ PPMappedActionParser on: self block: aBlock ]
+                ifFalse: [ self error: aBlock numArgs asString , ' arguments expected.' ]
+
+    "Modified: / 02-06-2015 / 17:16:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PPSmalltalkGrammar methodsFor:'*petitcompiler'!
 
 comment