29 lines
683 B
Smalltalk
29 lines
683 B
Smalltalk
Class {
|
|
#name : 'PPMappedActionParser',
|
|
#superclass : 'PPActionParser',
|
|
#category : 'PetitCompiler-Parsers'
|
|
}
|
|
|
|
{ #category : 'converting' }
|
|
PPMappedActionParser >> asCompilerNode [
|
|
^ PPCMappedActionNode new
|
|
name: self name;
|
|
block: block;
|
|
child: parser;
|
|
properties: properties;
|
|
parser: self;
|
|
yourself
|
|
|
|
"Created: / 02-06-2015 / 17:27:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
]
|
|
|
|
{ #category : 'parsing' }
|
|
PPMappedActionParser >> parseOn: aPPContext [
|
|
| element |
|
|
^ (element := parser parseOn: aPPContext) isPetitFailure
|
|
ifFalse: [ block valueWithArguments: element ]
|
|
ifTrue: [ element ]
|
|
|
|
"Created: / 02-06-2015 / 17:15:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
]
|