I do not know the syntax highlighter, but I know the AST fairly well.
The first two points are fairly easy:

 *

   Color method temp variables and block parameter variables
   differently. Currently they are identified too generally as just
   #variables. They are therefore always the same color. Can someone
   point me to the parser classes that extract these features?

 *

   Color differently Classes and other globals? I'm trying to find this
   distinction as well in the parser classes. If someone familiar with
   the parsing and related GUI classes can give me some pointers, I'll
   do the work.

 *

   Let the user assign colors to the first 7 levels of parentheses and
   first 7 levels of brackets.


1) There is no differences in the AST about temporary / arguments declaration. They are both at the level of the sequence node of the method/block (the body).
Thankfully we can ask for the parent and have a case for each.
You'd have to modify visitTemporaryDeclarationNode:.

2) There is no difference in the AST between classes / Globals.
Because Classes are in fact Globals.
You'd have to ask for the (self class environment classAt: aGlobal name)  ifNotNil: [ class behavior ] ifNil: [ global behavior ].

A quick look seem that the behavior of the syntax highlighter is in the IconStyler class.
(again, don't know it, just checking this out quickly).

Pierre


On 8/6/2022 4:53 AM, Shaping wrote:

Are there any experts here on the Settings’ Syntax Highlighter subsection and associated parser classes that make the ASTs?  I have some extensions/mods I would like to make to the highlighter.   Can someone suggest which classes to study?

I’m alternating between improvement like this and porting my stuff from VW, with Christian’s help. Thanks Christian.

Here’s the issue sketching what I want to do in the highlighter:

https://github.com/pharo-project/pharo/issues/11505

Shaping

Reply via email to