parsers/smalltalk/extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 26 Oct 2014 22:05:59 +0000
changeset 394 ba6a64ffe00d
parent 390 17ba167b8ee1
child 424 77c414db3cca
permissions -rw-r--r--
Portability - test if RPackageOrganizer is present... ...if not, do not register new package using it. RPackage is Pharo specific thing not present in other Smalltalks.

"{ Package: 'stx:goodies/petitparser/parsers/smalltalk' }"!

!PPParser methodsFor:'*petitsmalltalk-operations'!

smalltalkToken
	| ws |
	ws := PPSmalltalkWhitespaceParser new.
	^ ((ws, ((PPTokenParser on: self) tokenClass: PPSmalltalkToken; yourself), ws) ==> #second)
		name: 'trimmingToken';
		yourself
! !

!RBProgramNode methodsFor:'*petitsmalltalk-accessing'!

addComments: aCollectionOfIntervals
	(aCollectionOfIntervals isNil or: [ aCollectionOfIntervals isEmpty ])
		ifFalse: [ self comments: self comments , aCollectionOfIntervals ]
! !

!RBValueToken methodsFor:'*PetitSmalltalk-Test'!

inputValue
	self flag: 'ugly hack to deal with PPToken #value deprecation '.
	^ self value
! !

!stx_goodies_petitparser_parsers_smalltalk class methodsFor:'documentation'!

extensionsVersion_HG

    ^ '$Changeset: <not expanded> $'
! !