eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'JavaScriptSyntaxHighlighter':

Home

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

Class: JavaScriptSyntaxHighlighter


Inheritance:

   Object
   |
   +--Scanner
      |
      +--JavaScriptScanner
         |
         +--JavaScriptParser
            |
            +--JavaScriptSyntaxHighlighter

Package:
stx:libjavascript
Category:
Languages-JavaScript-Compiling & Parsing
Version:
rev: 1.49 date: 2023/09/07 20:50:26
user: stefan
file: JavaScriptSyntaxHighlighter.st directory: libjavascript
module: stx stc-classLibrary: libjavascript

Description:


documentation to be added.

class:
    <a short class summary here, describing what instances represent>

responsibilities:    
    <describing what my main role is>

collaborators:    
    <describing with whom and how I talk to>

API:
    <public api and main messages>
    
example:
    <a one-line examples on how to use - can also be in a separate example method>

implementation:
    <implementation points>


[instance variables:]

[class variables:]

copyright

COPYRIGHT (c) 2005 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

api highlighting
o  formatClassDefinition: aString in: aClass elementsInto: elements
format (recolor) a class definition expression in a given class.
Return the text containing font changes and color information.

o  formatFileContents: aString elementsInto: elementsCollection
format (recolor) a file's contents.
Return the text containing font changes and color information.
Here, nothing is done ,just for protocol completeness

o  formatMethod: aMethodOrNil source: aString in: aClass using: preferencesOrNil elementsInto: elements

o  formatMethodSource: aString in: aClass using: preferencesOrNil
format (recolor) a method in a given class.
Return the text containing font changes and color information.

highlighting
o  format: aString with: aBlock in: aClass
format (recolor) a method in a given class.
Return the text containing font changes and color information.

o  format: aString with: aBlock in: aClass using: preferencesOrNil
format (recolor) a method in a given class.
Return the text containing font changes and color information.

o  formatClassDefinition: aString in: aClass
format (recolor) a class definition expression in a given class.
Return the text containing font changes and color information.

o  formatExpression: aString in: aClass
format (recolor) an expression in a given class.
Return the text containing font changes and color information.

Usage example(s):

     self
        formatExpression:'(1 + 2) max:5' 
        in:UndefinedObject

o  formatExpression: aString in: aClass elementsInto: elementsCollection

o  formatMethod: aString in: aClass
format (recolor) a method in a given class.
Return the text containing font changes and color information.

o  formatMethod: aMethod source: aString in: aClass

o  formatMethod: aMethod source: aString in: aClass using: preferencesOrNil
format (recolor) a single method in a given class.
Return the text containing font changes and color information.

o  formatMultiMethodSource: aString in: aClass using: preferencesOrNil
format (recolor) a sequence of methods in a given class.
Return the text containing font changes and color information.

o  formatStatementList: aString in: aClass elementsInto: elements
format (recolor) a statement list in a given class.
Return the text containing font changes and color information.

Usage example(s):

     self
        formatStatementList:'(1 + 2) max:5. 1 + 2' 
        in:UndefinedObject
        elementsInto:(OrderedCollection new).


Instance protocol:

accessing
o  preferences: something

o  sourceText
return the value of the instance variable 'sourceText' (automatically generated)

o  sourceText: something
set the value of the instance variable 'sourceText' (automatically generated)

api highlighting
o  format: aString with: aBlock in: aClass using: preferencesOrNil
format (recolor) a method in a given class.
Return the text containing font changes and color information.

o  formatMethod: aMethodOrNil source: aString in: aClass using: preferencesOrNil
the api used by the expecco code editor

o  formatMethodSource: aString in: aClass using: preferencesOrNil
the api used by the expecco code editor

error handling
o  parseError: aMessage position: position to: endPos
(comment from inherited method)
ParseError raiseRequestErrorString:aMessage

initialization
o  initialize

private
o  isSyntaxHighlighter

o  isUnknownGlobal: nameSym

syntax detection
o  markArgumentIdentifierFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markClassVariableIdentifierFrom: pos1 to: pos2

o  markCommentFrom: pos1 to: pos2

o  markConstantFrom: pos1 to: pos2
Modified (format): / 04-06-2023 / 14:36:43 / exept MBP

o  markFieldNameFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markFrom: pos1 to: pos2 withEmphasis: fontEmp color: clrIn

o  markFunctionNameFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markGlobalClassIdentifierFrom: pos1 to: pos2

o  markGlobalIdentifierFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markIdentifierFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markInstVarIdentifierFrom: pos1 to: pos2

o  markKeyword: kw from: pos1 to: pos2
keywords get a special color

o  markKeywordToken
mark the current token as a keyword

o  markLocalIdentifierFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markSelector: selectorString from: pos1 to: pos2 receiverNode: aReceiverNodeOrNil numArgs: numArgs
a local call

o  markSelfFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markStringFrom: pos1 to: pos2

o  markSuperFrom: pos1 to: pos2
(comment from inherited method)
intentionally left blank here

o  markUnknownIdentifierFrom: pos1 to: pos2
Modified (format): / 14-02-2019 / 14:53:01 / Claus Gittinger

o  markVariable: v
support for syntaxColoring

o  markVariable: v from: pos to: endPos
support for syntaxColoring

o  postProcessTree: aParseTree forText: text
allows for additional checks to be done on the tree
(checking arguments to a call-node in expecco, for example)



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Fri, 03 May 2024 02:26:26 GMT