eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SourceFileLoader':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SourceFileLoader


Inheritance:

   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

Description:


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 ...).


Class protocol:

instance creation
o  on: aStream


Instance protocol:

accessing
o  reader: something
to fileIn gravel-Smalltalk sources

o  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
o  currentNameSpace
sent by the compiler to ask for the current nameSpace.
This is still to be finished ...

usage example(s):

currentNameSpace := Smalltalk defaultNameSpace

o  isWorkspace
back-query from the compiler to ask if this is an interactive view
(for error feedback)

o  packageToInstall
sent by the compiler to ask in which package new methods/classes
are to be installed.
This is still to be finished ...

o  usedNameSpaces
sent by the compiler to ask for a list of used nameSpaces.
This is still to be finished ...

o  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
o  addUsedSpace: aNameSpace
sent by the compiler, whenever it encounters a 'Uses:'
directive; collect used namespaces here, for later namespace
queries

o  addUsedSpaces: aNameSpaceList
sent by the compiler, whenever it encounters a 'Uses:'
directive; collect used namespaces here, for later namespace
queries

o  requirePackage: packageName
sent by the compiler, whenever it encounters a 'Prerequisites:'
directive. For now, this is ignored.

o  setNameSpace: aNameSpaceName
sent by the compiler, whenever it encounters a 'NameSpace:'
directive. Remember the namespace for further variable resolving
and nameSpace queries.

o  setPackage: packageName
sent by the compiler, whenever it encounters a 'Package:'
directive. Remember the package for further queries.

o  setSyntax: aSyntaxName
sent by the compiler, whenever it encounters a 'Syntax:' directive.
Remember the syntax for further parsing.

error handling
o  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.

o  correctableSelectorWarning: aMessage position: position to: endPos from: aCompiler
correctable error notification during fileIn.

o  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.

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

o  insertAndSelect: aString at: aCharacterPosition
ST-80 compatible error notification during fileIn.

o  showWherePosition: position to: endPos from: aCompiler
show more details about the errors/warnings position.

o  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

o  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
o  reader: aStream wantChangeLog: aBoolean


Private classes:

    SourceFileReader


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 16:40:13 GMT