author | Stefan Vogel <sv@exept.de> |
Fri, 25 Apr 2003 18:40:04 +0200 | |
changeset 1401 | d9a2949c6229 |
parent 928 | 90470934ef24 |
child 1414 | 613ec963af7c |
permissions | -rw-r--r-- |
70 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
70
diff
changeset
|
3 |
All Rights Reserved |
70 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#CompilationErrorHandler |
|
928 | 14 |
instanceVariableNames:'myStream currentSource' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Compiler' |
|
70 | 18 |
! |
19 |
||
20 |
!CompilationErrorHandler class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
70
diff
changeset
|
25 |
All Rights Reserved |
70 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
928 | 34 |
! |
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
Instances of this class are created temporary during fileIn. |
|
39 |
They get notified about any errors. Currently, all we |
|
40 |
do here is to output the error on the Transcript; |
|
41 |
eventually, we will open a box showing the position of the error. |
|
42 |
" |
|
70 | 43 |
! ! |
44 |
||
45 |
!CompilationErrorHandler class methodsFor:'instance creation'! |
|
46 |
||
47 |
on:aStream |
|
48 |
^ self new reader:aStream |
|
49 |
! ! |
|
50 |
||
928 | 51 |
!CompilationErrorHandler methodsFor:'accessing'! |
52 |
||
53 |
source:aString |
|
54 |
currentSource := aString |
|
55 |
! ! |
|
56 |
||
70 | 57 |
!CompilationErrorHandler methodsFor:'error handling'! |
58 |
||
928 | 59 |
correctableError:aMessage position:position to:endPos from:aCompiler |
70 | 60 |
"error notification during fileIn. |
61 |
This is sent by the compiler/evaluator if it detects errors." |
|
62 |
||
928 | 63 |
^ self error:aMessage position:position to:endPos from:aCompiler |
70 | 64 |
|
928 | 65 |
"Created: / 30.7.1999 / 18:11:15 / cg" |
70 | 66 |
! |
67 |
||
928 | 68 |
error:aMessage position:position to:endPos from:aCompiler |
70 | 69 |
"error notification during fileIn. |
70 |
This is sent by the compiler/evaluator if it detects errors." |
|
71 |
||
72 |
" |
|
73 |
will eventually open a TextBox here, showing the error .... |
|
74 |
" |
|
75 |
"/ position printOn:Transcript. |
|
76 |
"/ Transcript show:' '. |
|
278 | 77 |
Transcript showCR:aMessage. |
70 | 78 |
^ false |
79 |
||
928 | 80 |
"Created: / 30.7.1999 / 18:10:30 / cg" |
70 | 81 |
! |
82 |
||
928 | 83 |
warning:aMessage position:position to:endPos from:aCompiler |
70 | 84 |
"warning notification during fileIn - ignore it. |
85 |
This is sent by the compiler/evaluator if it detects errors." |
|
86 |
||
87 |
^ self |
|
88 |
||
928 | 89 |
"Created: / 30.7.1999 / 18:11:05 / cg" |
70 | 90 |
! ! |
91 |
||
92 |
!CompilationErrorHandler methodsFor:'private access'! |
|
93 |
||
94 |
reader:aStream |
|
95 |
myStream := aStream |
|
96 |
! ! |
|
97 |
||
928 | 98 |
!CompilationErrorHandler class methodsFor:'documentation'! |
70 | 99 |
|
928 | 100 |
version |
101 |
^ '$Header: /cvs/stx/stx/libcomp/CompilationErrorHandler.st,v 1.4 1999-07-30 18:01:33 cg Exp $' |
|
70 | 102 |
! ! |