ParseWarning.st
author Claus Gittinger <cg@exept.de>
Thu, 23 May 2019 11:07:39 +0200
changeset 4416 d86ff3337fa1
parent 4349 3cbb3f48bcd0
permissions -rw-r--r--
#REFACTORING by cg class: Parser errorFlag return class definition added: #initializerExpressions comment/format in: #errorFlag #parseMethodBody #parseMethodBodyOrEmpty changed: #evaluate:in:receiver:notifying:logged:ifFail:compile:checkForEndOfInput: (send #hasError instead of #errorFlag) #parseMethodBodyVarSpec class: Parser class comment/format in: #parseMethodArgAndVarSpecification:in:ignoreErrors:ignoreWarnings:parseBody: changed: #blockAtLine:in:orSource:numArgs:numVars: (send #hasError instead of #errorFlag)

"
 COPYRIGHT (c) 1989 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libcomp' }"

"{ NameSpace: Smalltalk }"

Notification subclass:#ParseWarning
	instanceVariableNames:'errorMessage startPosition endPosition lineNumber'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Compiler'
!

!ParseWarning class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1989 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    Warnings generated by parsers (eg. the Smalltalk code parser).
    In unhandled, a message is sent to the Transcript and the compilation proceeds.

    [author:]
        Claus Gittinger

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!ParseWarning methodsFor:'accessing'!

endPosition
    ^ endPosition
!

endPosition:something
    endPosition := something.
!

errorMessage
    ^ errorMessage
!

errorMessage:something
    errorMessage := something.
!

lineNumber
    ^ lineNumber
!

lineNumber:something
    lineNumber := something.
!

startPosition
    ^ startPosition
!

startPosition:something
    startPosition := something.
!

startPosition:startPositionArg endPosition:endPositionArg 
    startPosition := startPositionArg.
    endPosition := endPositionArg.
! !

!ParseWarning methodsFor:'default action'!

defaultResumeValue
    Logger warning:('Parser Warning: ',(self errorMessage ? self description)).
    ^ super defaultResumeValue
! !

!ParseWarning class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !