In the setup function of the astparser module, there is no rc.parser but
rc.parsers which is a dict with values like {'c': ['pycparser', 'clang',
'gccxml'], 'c++': ['clang', 'gccxml', 'pycparser']}.  So, the parser for
each file is chosen later than the setup function, is it true? If so, what
is the next location we can determine the parser?


On Mon, Mar 3, 2014 at 8:28 PM, Anthony Scopatz <notifications@github.com>wrote:

> In xdress/utils.py:
>
> > @@ -42,6 +42,8 @@
> >
> >  FORBIDDEN_NAMES = frozenset(['del', 'global'])
> >
> > +SITE_RC = {} # an RunControl instance after parse_global_rc()
>
> Ahh sure thing. You access the parser as rc.parser This would looks
> something like:
>
> def setup(self, rc):
>     if rc.parser == 'pycparser':
>         rc.includes.insert(0, '/path/to/dir')
>     ....
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/xdress/xdress/pull/197/files#r10239101>
> .
>



-- 
Jinsuo Nie