eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Parser::Correction':

Home

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

Class: Correction (private in Parser

This class is only visible from within Parser.

Inheritance:

   Object
   |
   +--Parser::Correction
      |
      +--Parser::CorrectByChangingSelector
      |
      +--Parser::CorrectByDeclaringIdentifierAs
      |
      +--Parser::CorrectByDeletingLocalIdentifier
      |
      +--Parser::CorrectByGeneratingMissingMethod
      |
      +--Parser::CorrectByGroupingMessage
      |
      +--Parser::CorrectByInsertingPeriod
      |
      +--Parser::CorrectByInteractiveCorrection
      |
      +--Parser::CorrectByInteractiveRename
      |
      +--Parser::CorrectByMakingValidHexConstant

Package:
stx:libcomp
Category:
System-Compiler
Owner:
Parser

Description:


a new correction scheme.

Previously, there were only 2 hardcoded interactive corrections possible when
the compiler had a correctbleError to report (declare as and correct).
The use was asked via the correctableError: message (to the requestor),
which had to return a symbol.

Now, we move to a more flexible correction scheme, where the parser provides a list
of plausible corrections as a collection of operations (actually class instances),
which provide button labels (and possibly addition information in the future).

Also, the correction object is supposed (in the future) to do the correction, so those
operations are to be moved out of the compiler.


Class protocol:

instance creation
o  instance

queries
o  buttonLabel


Instance protocol:

accessing
o  buttonLabel

correcting
o  fixFrom: position1 to: position2 for: aCompiler
to be redefined by subclasses.
should return corrected source or nil

ignored accessing
o  positionOfPeriod: ignored

o  receiverClass: ignoredClass

o  receiverNode: ignoredNode

o  selector: ignoredSelector

instance creation
o  instance



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 26 Nov 2022 08:52:40 GMT