PPStartOfLineParser.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 08 Sep 2015 02:40:05 +0100
changeset 543 02d90f0038fd
parent 427 a7f5e6de19d2
permissions -rw-r--r--
Poratbility: do not use #removeAtIndex: under Pharo. Pharo does not have #removeAtIndex: which is actually and ANSI protocol. But Pharoers do not like ANSI and don't give a shit about compatibility. To workaround it, use super-ugly #respondsTo: test.

"{ Package: 'stx:goodies/petitparser' }"

"{ NameSpace: Smalltalk }"

PPParser subclass:#PPStartOfLineParser
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitParser-Parsers'
!


!PPStartOfLineParser methodsFor:'parsing'!

parseOn: aPPContext
	(aPPContext isStartOfLine) ifTrue: [ 
		^ #startOfLine
	].
	^ PPFailure message: 'Start of line expected' context: aPPContext at: aPPContext position
! !

!PPStartOfLineParser class methodsFor:'documentation'!

version_HG

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