CompErr.st
author Claus Gittinger <cg@exept.de>
Sat, 18 May 1996 17:33:35 +0200
changeset 278 8c8c96856b41
parent 135 aa4f7b8f121e
child 928 90470934ef24
permissions -rw-r--r--
showCr: -> showCR:

"
 COPYRIGHT (c) 1995 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.
"

'From Smalltalk/X, Version:2.10.4 on 24-feb-1995 at 3:12:23 am'!

Object subclass:#CompilationErrorHandler
	 instanceVariableNames:'myStream currentSource'
	 classVariableNames:''
	 poolDictionaries:''
	 category:'System-Compiler'
!

!CompilationErrorHandler class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libcomp/Attic/CompErr.st,v 1.3 1996-05-18 15:33:29 cg Exp $'
!

documentation
"
    Instances of this class are created temporary during fileIn.
    They get notified about any errors. Currently, all we
    do here is to output the error on the Transcript;
    eventually, we will open a box showing the position of the error.
"
!

copyright
"
 COPYRIGHT (c) 1995 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.
"
! !

!CompilationErrorHandler class methodsFor:'instance creation'!

on:aStream
    ^ self new reader:aStream
! !

!CompilationErrorHandler methodsFor:'error handling'!

correctableError:aMessage position:position to:endPos
    "error notification during fileIn.
     This is sent by the compiler/evaluator if it detects errors."

    ^ self error:aMessage position:position to:endPos


!

error:aMessage position:position to:endPos
    "error notification during fileIn.
     This is sent by the compiler/evaluator if it detects errors."

    "
     will eventually open a TextBox here, showing the error ....
    "
"/    position printOn:Transcript.
"/    Transcript show:' '.
    Transcript showCR:aMessage.
    ^ false

!

warning:aMessage position:position to:endPos
    "warning notification during fileIn - ignore it.
     This is sent by the compiler/evaluator if it detects errors."

    ^ self

! !

!CompilationErrorHandler methodsFor:'private access'!

reader:aStream
    myStream := aStream
! !

!CompilationErrorHandler methodsFor:'accessing'!

source:aString
    currentSource := aString
! !