parsers/smalltalk/extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 03 Nov 2014 11:30:59 +0000
changeset 407 a0e6299c7337
parent 390 17ba167b8ee1
child 424 77c414db3cca
permissions -rw-r--r--
Removed unused / obsolete methods from PPToken * remove PPToken class>>on:start:stop * remove PPToken>>initializeOn:start:stop

"{ 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> $'
! !