[cfe-dev] Attempt 3 at CXX Namespaces
Kevin Tew
tewk at cs.utah.edu
Fri Mar 14 16:05:34 PDT 2008
I'm puzzled at how to go about adding child decls too a namespace.
I've picked up, that the parser shouldn't use AST types and only make
Actions.ActOn... calls.
Currently I'm thinking something like this:
llvm::SmallVector<DeclTy*, 16> NamespaceChildren;
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
NamespaceChildren.push_back(ParseExternalDeclaration());
}
Actions.ActOnNamespaceMembers(&NamespaceChildren[0],
NamespaceChildren.size());
or something like this:
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
Actions.ActOnNamespaceMember(ParseExternalDeclaration());
}
Am I on the right track?
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxxnamespaces_try3.patch
Type: text/x-diff
Size: 7903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080314/8e0e6f27/attachment.patch>
More information about the cfe-dev
mailing list