search for: parse_precompiled_preamble

Displaying 3 results from an estimated 3 matches for "parse_precompiled_preamble".

2013 Dec 10
0
[LLVMdev] libcang python bindings and working with macros question
...if cursor.displayname == spelling: return cursor """ import scripts.clang.cindex as cindex from scripts.util import get_cursor index = cindex.Index.create() t = cindex.TranslationUnit tu = index.parse('blah.c',[ ] ,options=t.PARSE_DETAILED_PROCESSING_RECORD | t.PARSE_PRECOMPILED_PREAMBLE) cursor = tu.cursor z = get_cursor(cursor,'TESTB') fid = open('blah.c') raw = fid.read() fid.close() print raw[z.extent.start.offset:z.extent.end.offset] this outputs TESTB 2 + TESTA How should I go about obtaining the expanded macro of 3. -- Thank you, Sam Price -----...
2013 Dec 11
0
[LLVMdev] libcang python bindings and working with macros question
...if cursor.displayname == spelling: return cursor """ import scripts.clang.cindex as cindex from scripts.util import get_cursor index = cindex.Index.create() t = cindex.TranslationUnit tu = index.parse('blah.c',[ ] ,options=t.PARSE_DETAILED_PROCESSING_RECORD | t.PARSE_PRECOMPILED_PREAMBLE) cursor = tu.cursor z = get_cursor(cursor,'TESTB') fid = open('blah.c') raw = fid.read() fid.close() print raw[z.extent.start.offset:z.extent.end.offset] this outputs TESTB 2 + TESTA How should I go about obtaining the expanded macro of 3. preferably without reading in the...
2013 Dec 12
0
[LLVMdev] [libclang] Python bindings bug.
...tokens returned from a cursor pointing to a macro change if there is a typedef following a macro. How do I go about submiting a bug against this? import clang.cindex as cindex from clang.util import get_cursor,get_cursors t = cindex.TranslationUnit options=t.PARSE_DETAILED_PROCESSING_RECORD | t.PARSE_PRECOMPILED_PREAMBLE src1 =""" #define TEST 5 """ tu = t.from_source('t.c',"",unsaved_files=[('t.c',src1)],options=options) cursor = get_cursor(tu.cursor,'TEST') tokens = list(cursor.get_tokens()) print tokens[-1].spelling #Prints 5 OK src2 = "&quo...