PPStartOfLine.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 21 Apr 2015 17:20:11 +0100
changeset 437 54b3bc9e3987
parent 377 6112a403a52d
permissions -rw-r--r--
A super ugly hack to fix line endings in Java comments. All three - CR, CR-LF and LF - should be supported.

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

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

!PPStartOfLine methodsFor:'parsing'!

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