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.34 date: 2018/05/18 02:27:38
user: cg
file: JavaScriptSyntaxHighlighter.st directory: libjavascript
module: stx stc-classLibrary: libjavascript

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

error handling
o  parseError: aMessage position: position to: endPos

initialization
o  initialize

private
o  isSyntaxHighlighter

o  isUnknownGlobal: nameSym

syntax detection
o  markArgumentIdentifierFrom: pos1 to: pos2

o  markClassVariableIdentifierFrom: pos1 to: pos2

o  markCommentFrom: pos1 to: pos2

o  markConstantFrom: pos1 to: pos2

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

o  markFunctionNameFrom: pos1 to: pos2

o  markGlobalClassIdentifierFrom: pos1 to: pos2

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

o  markIdentifierFrom: pos1 to: pos2

o  markInstVarIdentifierFrom: pos1 to: pos2

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

o  markLocalIdentifierFrom: pos1 to: pos2

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

o  markSelfFrom: pos1 to: pos2

o  markStringFrom: pos1 to: pos2

o  markSuperFrom: pos1 to: pos2

o  markUnknownIdentifierFrom: pos1 to: pos2

o  markVariable: v
support for syntaxColoring

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



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 19 Nov 2018 21:44:41 GMT