Author Topic: How to add struct/class members to tags created by <foo>_proc_search  (Read 2282 times)

Uwe

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
I'm dealing since quite a while now to get the hang of how tagging is working.
I figured out how a very fundamental foo_proc_search is working, but am stuck now while trying to add members to struct/class tags.
Is there some document that describes the general concept and gives a brief overview about how to use all the various tag_tree_xxx functions and how the bits and pieces are fitting together?
I would like to implement a language handler that would be able to support some language consisting of nested structured types like the following:

newtype <name>
   struct
       type <member 1>;
       type <member n>;
   array
       type, <size>;
   literals
       "name 1", ..., "name n";
endtype

I would like the type definitions show up in a similar way in the Defs window.
Any suggestions, pointers to documents or some understandable sample code highly welcome.

hs2

  • Senior Community Member
  • Posts: 2747
  • Hero Points: 288
Re: How to add struct/class members to tags created by <foo>_proc_search
« Reply #1 on: January 28, 2013, 08:43:36 pm »
There is a good tutorial. Hope it helps.
Good luck, HS2

Uwe

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: How to add struct/class members to tags created by <foo>_proc_search
« Reply #2 on: January 29, 2013, 11:31:21 am »
Thanks for the hint. I've already seen it and derived a basic version of a language support implementation.
It shows tags for new types in the Defs and Symbols windows, but I'm unable to add any 2nd level tags and finally
even this sample raised a lot of new questions:
Under which conditions are the parameters of foo_proc_search non-zero?
The proc_name parameter must point to the tag when exiting from the function, else I don't see any tags displayed.
I assumed that tag_tree_compose_tag would do the job of adding tags to the db, but this seems not to be the case.
I've tried to call it multiple times from foo_proc_search to add kind of child/next level tags, but this doesn't
work and created some more questions about the meaning of the class_id parameter.