|
Class: JavaScriptSyntaxHighlighter
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
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:]
copyrightCOPYRIGHT (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.
api highlighting
-
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.
-
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
-
formatMethod: aMethodOrNil source: aString in: aClass using: preferencesOrNil elementsInto: elements
-
-
formatMethodSource: aString in: aClass using: preferencesOrNil
-
format (recolor) a method in a given class.
Return the text containing font changes and color information.
highlighting
-
format: aString with: aBlock in: aClass
-
format (recolor) a method in a given class.
Return the text containing font changes and color information.
-
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.
-
formatClassDefinition: aString in: aClass
-
format (recolor) a class definition expression in a given class.
Return the text containing font changes and color information.
-
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
|
-
formatExpression: aString in: aClass elementsInto: elementsCollection
-
-
formatMethod: aString in: aClass
-
format (recolor) a method in a given class.
Return the text containing font changes and color information.
-
formatMethod: aMethod source: aString in: aClass
-
-
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.
-
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.
-
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).
|
accessing
-
preferences: something
-
-
sourceText
-
return the value of the instance variable 'sourceText' (automatically generated)
-
sourceText: something
-
set the value of the instance variable 'sourceText' (automatically generated)
api highlighting
-
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.
-
formatMethod: aMethodOrNil source: aString in: aClass using: preferencesOrNil
-
the api used by the expecco code editor
-
formatMethodSource: aString in: aClass using: preferencesOrNil
-
the api used by the expecco code editor
error handling
-
parseError: aMessage position: position to: endPos
-
(comment from inherited method)
ParseError raiseRequestErrorString:aMessage
initialization
-
initialize
-
private
-
isSyntaxHighlighter
-
-
isUnknownGlobal: nameSym
-
syntax detection
-
markArgumentIdentifierFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markClassVariableIdentifierFrom: pos1 to: pos2
-
-
markCommentFrom: pos1 to: pos2
-
-
markConstantFrom: pos1 to: pos2
-
Modified (format): / 04-06-2023 / 14:36:43 / exept MBP
-
markFieldNameFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markFrom: pos1 to: pos2 withEmphasis: fontEmp color: clrIn
-
-
markFunctionNameFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markGlobalClassIdentifierFrom: pos1 to: pos2
-
-
markGlobalIdentifierFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markIdentifierFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markInstVarIdentifierFrom: pos1 to: pos2
-
-
markKeyword: kw from: pos1 to: pos2
-
keywords get a special color
-
markKeywordToken
-
mark the current token as a keyword
-
markLocalIdentifierFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markSelector: selectorString from: pos1 to: pos2 receiverNode: aReceiverNodeOrNil numArgs: numArgs
-
a local call
-
markSelfFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markStringFrom: pos1 to: pos2
-
-
markSuperFrom: pos1 to: pos2
-
(comment from inherited method)
intentionally left blank here
-
markUnknownIdentifierFrom: pos1 to: pos2
-
Modified (format): / 14-02-2019 / 14:53:01 / Claus Gittinger
-
markVariable: v
-
support for syntaxColoring
-
markVariable: v from: pos to: endPos
-
support for syntaxColoring
-
postProcessTree: aParseTree forText: text
-
allows for additional checks to be done on the tree
(checking arguments to a call-node in expecco, for example)
|