What is the walk-through to add custom Identifier recognizer to clang ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

What is the walk-through to add custom Identifier recognizer to clang ?

Oleg Smolsky via cfe-dev
Hi,
I want to add a custom Identifier recognizer to clang compiler that allows it access to the members of selected object, for example see the code below:

[code]
#include <iostream>
using namespace std;
class XY {
    public:
        void printX() { cout << "X" << endl; }
        void printY() { cout << "Y" << endl; }
}
int main() {
    XY xy;
    with(xy) {
        printX();
        printY();
    }
    return 0;
}
[/code]

I've added "with" token(keyword), statement, parser, semantic, recursive ast visitor, tree transform and all other requirements to parse concept statement.
All parsing routine are fine follow by " use of undeclared identifier 'printX' " and " use of undeclared identifier 'printX' " errors.
What are the complement works which has to be done after what I have said so far to allow compiler detect selected object members?

--
Regards,
Mohsen Timar

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev