eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::NaiveSyntaxHighlighterForC':

Home

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

Class: NaiveSyntaxHighlighterForC (in Tools)


Inheritance:

   Object
   |
   +--Scanner
      |
      +--Parser
         |
         +--AbstractSyntaxHighlighter
            |
            +--Tools::NaiveSyntaxHighlighter
               |
               +--Tools::NaiveSyntaxHighlighterForC

Package:
stx:libtool
Category:
Interface-Tools-File-Syntax
Version:
rev: 1.7 date: 2024/02/16 18:09:02
user: stefan
file: Tools__NaiveSyntaxHighlighterForC.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


a quick and dirty hack;
not really (yet) aware of what it is doing.
All highlighting is based on hardcoded heuristics;
a bad implementation, but better than nothing...


Class protocol:

api highlighting
o  formatFileContents: aString elementsInto: elementsCollection
format (recolor) a file's contents.
Return the text containing font changes and color information.

constants
o  keywords

o  knownFunctions

o  knownStdFunctions

o  knownUnixFunctions

o  typeNames


Instance protocol:

accessing
o  constantColor

o  constantEmphasis

o  controlFlowKeywordColor

o  controlFlowKeywordEmphasis

o  functionColor
^ Color brown.

o  functionDefinitionColor

o  functionDefinitionEmphasis

o  functionEmphasis
i.e. no emphasis

o  globalVariablesColor

o  globalVariablesEmphasis

o  keywordColor

o  keywordEmphasis

o  moreKnownFunctions: aCollectionOfFunctionNames
Modified (format): / 22-10-2017 / 15:42:46 / cg

o  wellknownFunctionColor
preferences globalIdentifierColor "/ selectorColor

o  wellknownFunctionEmphasis
selectorEmphasis

o  wellknownTypeColor

o  wellknownTypeEmphasis

api highlighting
o  formatFileContents: aString elementsInto: elementsCollection
format (recolor) a file's contents.
Return the text containing font changes and color information.

initialization
o  initialize
must be called if redefined

private-scanning
o  scanEOLComment

o  scanIdentifier
(#('typedef' 'sizeof') includes:word) ifTrue:[

o  scanNormalComment
unterminated comment

o  scanStep
care for #include etc.

o  scanString: delimiter
unterminated string



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 08:47:52 GMT