[Gambas-user] Parsing a class or module

BB adamnt42 at gmail.com
Fri Mar 24 14:35:57 CET 2023


On 24/3/23 11:38 pm, Martín wrote:
> Hi,
>
> Given a class, for example myform.class, is there any algorithm that 
> reads it and then:
> List all the global variables
> List all variables and methods of the class.
> List all public variables of other classes that myform.class accesses.
> List all public methods of other classes that myform.class accesses.
> The idea behind all this is to be able to copy a form from a project 
> and everything it needs to work and nothing else.
>
> That is to say, if there is an auxiliary class clac.class and in that 
> class there are two methods but myform.class uses only one of them, 
> that is the one that is copied.
>
> For example Gamabs IDE can order the classes in the treeview according 
> to their location in the filesystem or according to their inheritance. 
> To do this kind of thing there must be some algorithm that parses each 
> code file.
>
> Best regards.
>
> Martin.
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
The *Class* class is what you are after (BION)! e.g. Class.Symbols 
:Returns an array of all the symbol names of a class. 😷
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230325/e82c71d3/attachment.htm>


More information about the User mailing list