--- a/PPPredicateObjectParser.st Tue Mar 04 15:33:19 2014 +0100
+++ b/PPPredicateObjectParser.st Tue Mar 04 15:33:20 2014 +0100
@@ -37,10 +37,12 @@
!
cr
- Smalltalk isSmalltalkX ifTrue:[
- ^ self char: Character return message: 'carriage return expected'
- ].
- ^ self char: Character cr message: 'carriage return expected'
+ |cr|
+
+ cr := Smalltalk isSmalltalkX
+ ifTrue:[Character return]
+ ifFalse:[Character cr].
+ ^ self char: cr message: 'carriage return expected'
!
digit
@@ -69,10 +71,12 @@
!
newline
- Smalltalk isSmalltalkX ifTrue:[
- ^ self chars: (String with: Character return with: Character lf) message: 'newline expected'
- ].
- ^ self chars: (String with: Character cr with: Character lf) message: 'newline expected'
+ |cr|
+
+ cr := Smalltalk isSmalltalkX
+ ifTrue:[Character return]
+ ifFalse:[Character cr].
+ ^ self chars: (String with: cr with: Character lf) message: 'newline expected'
!
punctuation
@@ -103,16 +107,16 @@
negated: [ :each | false ] message: 'no input expected'
!
-anyExceptAnyOf: aCollectionOfChars
+anyExceptAnyOf: aCollection
^ self
- on: [ :each | (aCollectionOfChars includes: each) not ] message: 'any except ' , aCollectionOfChars printString , ' expected'
- negated: [ :each | aCollectionOfChars includes: each ] message: aCollectionOfChars printString , ' not expected'
+ on: [ :each | (aCollection includes: each) not ] message: 'any except ' , aCollection printString , ' expected'
+ negated: [ :each | aCollection includes: each ] message: aCollection printString , ' not expected'
!
-anyOf: anArray
+anyOf: aCollection
^ self
- on: [ :each | anArray includes: each ] message: 'any of ' , anArray printString , ' expected'
- negated: [ :each | (anArray includes: each) not ] message: 'none of ' , anArray printString , 'expected'
+ on: [ :each | aCollection includes: each ] message: 'any of ' , aCollection printString , ' expected'
+ negated: [ :each | (aCollection includes: each) not ] message: 'none of ' , aCollection printString , 'expected'
!
between: min and: max
@@ -161,13 +165,14 @@
!PPPredicateObjectParser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.4 2012-12-01 14:29:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.5 2014-03-04 14:33:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.4 2012-12-01 14:29:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.5 2014-03-04 14:33:20 cg Exp $'
!
version_SVN
- ^ '§Id: PPPredicateObjectParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
+ ^ '$Id: PPPredicateObjectParser.st,v 1.5 2014-03-04 14:33:20 cg Exp $'
! !
+