[Qt-creator] Symbol visitor and Scope::Use questions
Bertjan Broeksema
b.broeksema at home.nl
Mon Mar 23 18:02:20 CET 2009
Hi Roberto,
We implemented a Symbol visitor and when we visit a block we execute the
following code:
bool SymbolTreeModel::visit(CPlusPlus::Block *block)
{
for (unsigned i = 0; i < block->memberCount(); ++i)
{
Symbol *member = block->memberAt(i);
accept(member);
}
return true;
}
However, if we use this code for this small example:
int main(int argc, char *argv[])
{
string s = "een string";
s += " meer tekst";
cout << s << endl;
return 0;
}
it seems that there is only a child node for the declaration of s in the
block. The semantic pass doesn't seem to add child nodes to the block for the
Expressions which are in the block. Could you explain why this happens and how
we eventually could solve this?
Another question we had is about the Use class in Scope. What exactly is the
purpose of this class? Does it define the relation definition <-> use?
Cheers,
Bertjan Broeksema and Bram Noordzij
p.s. Debugging in QtCreator works like a charm. Nice work!
More information about the Qt-creator-old
mailing list