how to define order in visit_foo for KDevelop-pg
Jakob Petsovits
jpetso at gmx.at
Sun Jul 22 20:08:18 UTC 2007
On Saturday, 21. July 2007, Andreas Pakulat wrote:
> Hi,
>
> Is there a way to influence the order of the visit_node calls in this
> visit_scope function?
>
> void default_visitor::visit_scope(scope_ast *node)
> {
> visit_node(node->func_args);
> visit_node(node->scope_body);
> visit_node(node->or_op);
> }
>
> The rule is this:
>
> func_args=function_args ( scope_body=scope_body | or_op=or_op
> scope_body=scope_body | 0 )
>
> | ( or_op=or_op | 0 ) scope_body=scope_body
>
> -> scope ;;
>
> I'd like to have the or_op visited first, then the func_args and then
> the scope_body.
No, as far as I know this is not possible without having a custom visitor.
You could
a) subclass the default visitor and fix the order of the calls in the
overriding member function, or
b) add support for that to kdev-pg directly.
I think that's pretty much it.
More information about the KDevelop-devel
mailing list