JScript syntax file: common class member lists
Posted: 21 Feb 2010 14:10
Hi everyone,
First of all, I wish make my personal congratualtions to Rickard for the x[index].member implementation: with this feature, writing JScritp code, with a well defined JScript syntax file, has become very very easy and funny!
Yesterday, I started to add a lot of class and class member to the JScript syntax file. During this activity I see that more member lists are common to many class. For example: the members (properties, methods, events and arrays) are applyed to , ecc.
So, for the array I have to define the specific members for the anchor class and then add the members of the class (beacuse anchor is actually an object of class). In the same mode, I have define the specific members for the class (of the array ) and then add all the members for to the form class.
I think that is possible to reduce a lot of work if we can define "virtual" class and use that as item in the class member list. A "virtual" class in not a part of class list (allow autocompletion to distinguish real class from virtual class), but is a specific list. Then, when we build the class members list, we can add specific class items and add all the members of a "virtual" class, simply specifing the name of the virtual class.
For example, in the class I add as proper member and, adding as "virual" class, I can automatically add all the member of that "virtual" class to the !
Do you think that is a reasonable/praticable solutions?
Thankyou in advance for your comments
First of all, I wish make my personal congratualtions to Rickard for the x[index].member implementation: with this feature, writing JScritp code, with a well defined JScript syntax file, has become very very easy and funny!
Yesterday, I started to add a lot of class and class member to the JScript syntax file. During this activity I see that more member lists are common to many class. For example: the
Code: Select all
HTMLElement
Code: Select all
anchors
Code: Select all
forms
So, for the
Code: Select all
document.anchors[].
Code: Select all
HTMLElement
Code: Select all
HTMLElement
Code: Select all
form
Code: Select all
document.forms[].
Code: Select all
HTMLElement
I think that is possible to reduce a lot of work if we can define "virtual" class and use that as item in the class member list. A "virtual" class in not a part of class list (allow autocompletion to distinguish real class from virtual class), but is a specific list. Then, when we build the class members list, we can add specific class items and add all the members of a "virtual" class, simply specifing the name of the virtual class.
For example, in the
Code: Select all
document.anchors[].
Code: Select all
href
Code: Select all
HTMLElement
Code: Select all
document.anchors[].
Do you think that is a reasonable/praticable solutions?
Thankyou in advance for your comments