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