parsers/smalltalk/extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 02 Jul 2018 08:46:03 +0200
changeset 557 5ddba1e78795
parent 424 77c414db3cca
permissions -rw-r--r--
Tagged Smalltalk/X 8.0.0

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

!PPParser methodsFor:'*petitsmalltalk-operations'!

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

    "Modified: / 24-11-2014 / 21:36:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

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