VBScript tagging

Discussion Forums discussion VBScript tagging

This topic contains 0 voices and has 0 replies.

Viewing 1 post (of 1 total)
Author Posts
Author Posts
May 9, 2012 at 3:52 pm #8370

Pok
Member

I am trying to define tagging rules for VBScript files. I am able to tag procedures, classes and constants, but it has a caveat: procedures defined in classes show up on their own along other “regular” procedures in the tag tree, not nested under the class leaf where the functions have been defined.

Can someone point me to the right direction how c++ functionality can be applied to VBScript files so that class members show up as class members and not as global tags?

What I have come up with is something like this:

additionalSupportedSchemes.ini:

[vbscript]

c = 20

f = 1

k = 3

p = 18

v = 13

additionalLanguages.conf:

–langdef=vbscript

–langmap=vbscript:.vbs

–regex-vbscript=/^[^']*Const[ t]+(S+)[ t]*=[ t]*(.*)[ t]*$/1 (2)/c,Constant,Constants/mi

–regex-vbscript=/^[^']*Function[ t]+(S+)[ t]*((.*))[ t]*$/1 (2)/f,Function,Functions/mi

–regex-vbscript=/^[^']*Sub[ t]+(S+)[ t]*((.*))[ t]*$/1 (2)/f,Function,Functions/mi

–regex-vbscript=/^[^']*Class[ t]+(S+)[ t]*$/1/k,Class,Classes/mi

–regex-vbscript=/^[^']*(Private|Public)*[ t]*Property[ t]+(Let|Get)[ t]+(S+)[ t]*([^ tnr]*)[ t]*$/3 (2)/p,Property,Properties/mi

–regex-vbscript=/^[^']*Dim[ t]+(S+)[ t]*$/1/v,Variable,Variables/mi

In other words if I have:

Class Test

Property Get Test ()

Test = vbNullString

End Property

End Class

instead of the tree:

filename.vbs
- class
- Test
- Test ()

I get the tree

filename.vbs
- class
- Test
- function
- Test ()

in other words the function Test () is not nested under class Test.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.