Synopsis - Issue Tracker

Message283

Author volodya
Recipients stefan, volodya
Date 2004-10-05.09:12:35
Content
Stefan Seefeld via synopsis issue tracker wrote:

> Why can't we just look for all identifiers that are not
> declarators ?

In which scopes? Or you mean, for all identifiers in all scopes?

> Some issues that we have to resolve before any of this can work:
>
> * We need to be able to generate a fully qualified name from any symbol
>    returned by a lookup.

I think that basically, the Symbol class should have a 'name' member. Now it 
only has 'type' member which returns Encoding, and it's not obvious how to 
extact fully qualified name from there.

Alternatively, we can just output the like where the looked up symbols are 
defined.

> * As an extension of the above requirement: we need to define a 'scope
>    type tree' in particular to contain 'named scopes' such as namespaces
>    and classes/structs/unions.

That's true.

> * We need a way to access the current scope that applies while we are
>    traversing the parse tree. This is more or less easy during the parse,
>    as there we track the 'current scope'. But how can that be reproduced
>    in a separate pass ?

I don't know about of AST. If namespaces, classes, function bodies, etc are 
separate nodes, then a visitor can be written which which adjusts the scope 
as it traverses the tree.
History
Date User Action Args
2004-10-05 09:12:35volodyasetrecipients: + volodya, stefan
2004-10-05 09:12:35volodyalinktask25 messages
2004-10-05 09:12:35volodyacreate