AST access to const modifier
Andreas Fester <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I am using the python API for the Synopsis.Parsers.Cxx
parser.
Does the AST allow access to the const modifier
of methods, like in
class A {
public:
virtual int getValue() const;
// ^^^^^
};
?
I tried something like
def visitOperation(self, operation):
for premod in operation.premodifier():
print "PRE[" + premod + "]",
for postmod in operation.postmodifier():
print "POST[" + postmod + "]",
premodifier() properly returns (only) the "virtual" modifier,
but postmodifier() is always empty.
Is there any other way to check if a method is "const"?
Thanks & Best Regards,
Andreas
- --
Andreas Fester
mailto:[email protected]
WWW: http://www.littletux.net
ICQ: 326674288
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDuUeBZ3bQVzeW+rsRAmgZAJ92hrMS49k8Gh57Q+J7QfQQ/phB1gCfSOT0
TlflLZueGEEiUXiY4f9ZhwQ=
=rHRt
-----END PGP SIGNATURE-----