Wisent:
Andrea Turso <[email protected]> Sun, 23 Aug 2015 17:39:12 +0100
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CADL_vSLG9pGO=2kheyTBjwg5=eUfskrsisi3Q1Vk0L6qneJrtQ@mail.gmail.com> |
Dear Eric,
I have hit a blocker while writing a Wisent grammar to tag a PHP buffer, in
particular I'm using class instantiation and parameter type hinting
information to add include-tags.
I think this should enable Semantic to load and parse all required files to
provide the appropriate completion.
My understanding is that Wisent is only aware of tags that are yielded by a
rule, so for example if I want to push an include tag I do this:
class_instantiation: T_NEW qualified_name
*(INCLUDE-TAG $2 nil)*
;
Alternatively, if I need the name of the class being instantiated I can do
class_instantiation: T_NEW qualified_name
*(identity $2)*
;
I am now working in a scenario where I need the class_instantiation rule to
do both actions – push the tag and return the class name.
In the following example I use *progn *to illustrate what I'm trying to
achieve, of course the class name is returned but the tag isn't registered:
class_instantiation: T_NEW qualified_name
*(progn (INCLUDE-TAG $2 nil) $2)*
;
Is there any way to have a rule to both push a tag and return a value?
Kind regards,
Andrea Turso
------------------------------------------------------------------------------
_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic