# HG changeset patch # User Jan Vrany # Date 1336169681 -7200 # Node ID 4af6ce1837b29fc3d099098cf28f7fe5089cb2a5 # Parent caf553957d9cc025afda24badc3d89910eb6af8b Checkin from browser diff -r caf553957d9c -r 4af6ce1837b2 extensions.st --- a/extensions.st Sat May 05 00:10:26 2012 +0200 +++ b/extensions.st Sat May 05 00:14:41 2012 +0200 @@ -18,12 +18,12 @@ "Return the Character that is lower than the receiver. Wrap if the resulting value is not a legal Character value. (JS) claus: - modified to return the difference as integer, if the argument - is another character. If the argument is a number, a character is - returned." + modified to return the difference as integer, if the argument + is another character. If the argument is a number, a character is + returned." aMagnitude isCharacter ifTrue:[ - ^ asciivalue - aMagnitude asInteger + ^ asciivalue - aMagnitude asInteger ]. ^ Character codePoint:((asciivalue - aMagnitude asInteger) \\ 16r3FFFFFFF) @@ -46,7 +46,7 @@ ppMinus: aCharacter "Create a range of characters between the receiver and the argument." - + ^ PPPredicateObjectParser between: self and: aCharacter "Created: / 19-12-2010 / 18:13:19 / Jan Kurs " @@ -73,14 +73,14 @@ !PositionableStream methodsFor:'*petitparser-core-converting'! asPetitStream - "Some of my subclasses do not use the instance-variables collection, position and readLimit but instead have a completely different internal representation. In these cases just use the super implementation that is inefficient but should work in all cases." + "Some of my subclasses do not use the instance-variables collection, position and readLimit but instead have a completely different internal representation. In these cases just use the super implementation that is inefficient but should work in all cases." - "DUNNO WHY, but on: collection from: position to: last set the start to position -1" - self breakPoint: #petitparser. + "DUNNO WHY, but on: collection from: position to: last set the start to position -1" + self breakPoint: #petitparser. - ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) - ifFalse: [ PPStream on: collection from: (position +1) to: readLimit ] - ifTrue: [ super asPetitStream ] + ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) + ifFalse: [ PPStream on: collection from: (position +1) to: readLimit ] + ifTrue: [ super asPetitStream ] "/ ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) @@ -149,5 +149,5 @@ !stx_goodies_petitparser class methodsFor:'documentation'! extensionsVersion_CVS - ^ '$Header: /cvs/stx/stx/goodies/petitparser/extensions.st,v 1.3 2012-01-13 11:22:50 cg Exp $' -! ! + ^ '$Header: /cvs/stx/stx/goodies/petitparser/extensions.st,v 1.4 2012-05-04 22:14:41 vrany Exp $' +! ! \ No newline at end of file