Highlight Object-Methods possible ?

Discuss syntax highlighting or submit new syntax files.
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

That's not practicable !
I would have to define from one to about fifty letters.

Another idea ?
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight Object-Methods possible ?

Post by Rickard Johansson »

Why can't you use something like (?<=\w\.)[a-zA-Z]+ :?: Do you really have to check for the $ sign?
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

Yes !

AutoIt can contain precompiler-options like '#test=xyz.ext'

In this example the fileextension is marked as method :(
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight Object-Methods possible ?

Post by Rickard Johansson »

You could highlight the precompiler-options as well and put this keyword group before the object method group.

E.g.

#precompiler options=#[a-zA-Z-\.=]+
#Objects=(?<=\w\.)[a-zA-Z]+
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

Not pretty, but a possible solution.

P.S.: This workaround is not yet useful !
The pattern '.xyz' also occurs in other combinations like '#include <GUIConstants.au3>' (here marked '.au3' as method) or like '#Region dummytext Form=Name.ext' (here also the extension marked as method).
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

Hallo Rickard.
Can you change it, that we can use RegEx's like "(?:\$\w+\.)", "(?<=\$\w+\.)" or "\$\w+\.\K", to delete the var-name with a undefinied lenght from the match ?
Or is the RegEx in RJTED a fixed Dll or other library ? I can not find a solution to highlicht only the method after the ".".

Here is a example-code:

Code: Select all

; This are Methods
$def.abc1
$1abc.3def
xyz $abc.3def
xyz $1abcdef.3ghi

; This not
#test=test.ico
xyz abcd.xy99z
$xyz bcd.xy99z
_Test()
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

Is there a possibility ?
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight Object-Methods possible ?

Post by Rickard Johansson »

I can't make changes to the regex dll file. I'll try to use a newer library but it will take some time to make it work.
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight Object-Methods possible ?

Post by Rickard Johansson »

I've replaced the old regex library and you can use something like this in the next version (v8.90):

[Keywords]
#Own functions=\$\w+\.\K\w+
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight Object-Methods possible ?

Post by micha_he »

Great, i will wait to test it ! Thanks....
Post Reply