[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] CDT-2.1 breaking API changes
|
OK. I get it now.
+1
FYI, In the AST I'm working on (doc soon to follow), I have Types and
Declarations. TypeDeclarations are Declarations that introduce Types into
scope.
1) would be a TypeDeclaration that may refer forwardly to the Type if it
is defined later in the translationUnit or it would refer to a stub Type
that lets you know it's a struct. Either way, you should be able to tell
that it's a forward declaration (or backwards, too, I guess).
2) would be a TypeDeclaration that refers immediately to the Type.
3) would be a TypeDeclaration that refers immediately to the Type followed
by a VariableDeclaration that refers to the Type.
At any rate, we should be able to generate the CModel you need from the
AST when it magically appears in a few months.
Cheers,
Doug Schaefer, IBM's Eclipse CDT Architect
Ottawa (Palladium), Ontario, Canada
"Alain Magloire" <alain@xxxxxxx>
Sent by: cdt-dev-admin@xxxxxxxxxxx
09/16/2004 12:25 PM
Please respond to
cdt-dev
To
cdt-dev@xxxxxxxxxxx
cc
Subject
Re: [cdt-dev] CDT-2.1 breaking API changes
>
> Being heavily focused on the AST at the moment, I am definitely
interested
> in your thoughts on structure definition vs structure declaration. From
an
> AST perspective, there is no such thing as a structure definition. You
> declare a structure as a type and then use that type in other
> declarations.
>
> However, I haven't looked at the CModel in a long time and can't recall
> how things were done there. What were you planning for this?
>
It should not affect the AST generation nor API.
The Core Model has a number of inconsistencies, IStruture is one.
1) Declaration of structure foo:
struct foo;
2) Definition && declaration of structure foo
Struct foo {
int bar;
};
3) Definition/declaration of structure foo, declaration/definition of
variable foobar
Struct foo {
int bar;
} foobar;
In the model, now for 1, 2 everything is an IStructure.
Modules lile OpenType view, Class hierachy view, C++ browsing perpspective
need
to see distinction in IStructure.
So for (2)
IStructureDefinition extends IStructureDeclaration, IMember {
}
The IStructure we have now is actually an IStructureDeclaration, rename
IStructureDeclartion should minimize the confusion.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev