|
Class: SourceFileLoader
Object
|
+--SourceFileLoader
- Package:
- stx:libcomp
- Category:
- System-Compiler
- Version:
- rev:
1.45
date: 2016/07/13 08:15:58
- user: mawalch
- file: SourceFileLoader.st directory: libcomp
- module: stx stc-classLibrary: libcomp
- Author:
- Claus Gittinger
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.
Also, information found in scanned compiler directives is remembered
here, for later queries (this is required, since the fileIn mechanism
creates new parsers for every chunk - someone has to remember this
information across chunks ...).
instance creation
-
on: aStream
-
accessing
-
reader: something
-
to fileIn gravel-Smalltalk sources
-
source: aString
-
this is optionally sent by the chunk reader,
to pass a single chunks source before its evaluated.
This allows me to show the erroneous code in a TextView
(but this is not yet implemented)
compiler queries
-
currentNameSpace
-
sent by the compiler to ask for the current nameSpace.
This is still to be finished ...
usage example(s):
currentNameSpace := Smalltalk defaultNameSpace
|
-
isWorkspace
-
back-query from the compiler to ask if this is an interactive view
(for error feedback)
-
packageToInstall
-
sent by the compiler to ask in which package new methods/classes
are to be installed.
This is still to be finished ...
-
usedNameSpaces
-
sent by the compiler to ask for a list of used nameSpaces.
This is still to be finished ...
-
wantChangeLog
-
sent by the compiler to ask if a changeLog entry should
be written. Return false here, since SourceFileLaoders are
used to read existing source files
directive processing
-
addUsedSpace: aNameSpace
-
sent by the compiler, whenever it encounters a 'Uses:'
directive; collect used namespaces here, for later namespace
queries
-
addUsedSpaces: aNameSpaceList
-
sent by the compiler, whenever it encounters a 'Uses:'
directive; collect used namespaces here, for later namespace
queries
-
requirePackage: packageName
-
sent by the compiler, whenever it encounters a 'Prerequisites:'
directive. For now, this is ignored.
-
setNameSpace: aNameSpaceName
-
sent by the compiler, whenever it encounters a 'NameSpace:'
directive. Remember the namespace for further variable resolving
and nameSpace queries.
-
setPackage: packageName
-
sent by the compiler, whenever it encounters a 'Package:'
directive. Remember the package for further queries.
-
setSyntax: aSyntaxName
-
sent by the compiler, whenever it encounters a 'Syntax:' directive.
Remember the syntax for further parsing.
error handling
-
correctableError: aMessage position: position to: endPos from: aCompiler
-
correctable error notification during fileIn.
This is sent by the compiler/evaluator if it detects undefined variables-errors.
-
correctableSelectorWarning: aMessage position: position to: endPos from: aCompiler
-
correctable error notification during fileIn.
-
correctableWarning: aMessage position: position to: endPos from: aCompiler
-
correctable error notification during fileIn.
This is sent by the compiler/evaluator if it detects undefined variables-errors.
-
error: aMessage position: position to: endPos from: aCompiler
-
error notification during fileIn.
This is sent by the compiler/evaluator if it detects errors.
-
insertAndSelect: aString at: aCharacterPosition
-
ST-80 compatible error notification during fileIn.
-
showWherePosition: position to: endPos from: aCompiler
-
show more details about the errors/warnings position.
-
unusedVariableWarning: aString position: relPos to: relEndPos from: aCompiler
-
compiler notifies us of a (or some) unused variables;
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort;
this method should return true to the compiler if user wants the error
to be corrected; false otherwise
-
warning: aMessage position: position to: endPos from: aCompiler
-
warning notification during fileIn - ignore it.
This is sent by the compiler/evaluator if it detects errors.
private-accessing
-
reader: aStream wantChangeLog: aBoolean
-
SourceFileReader
|