Does Moc uses handwritten C++ parser ?
Unsolved
Qt Creator and other tools
-
I heard that parsing C++ is really hard. So how does moc does this ? does it use libclang or libtooling ?
-
@noone In case you don't get an answer here: moc is open source, so you can check how it is implemented.
-
It's a hand-written parser. It doesn't need to understand all of C++ though, because it's only interested in class declarations etc.
As @jsulm pointed out, it's open source, see https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/moc :)
1/3