Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't generate AST correctly when parsing a C source code(written on Windows) under Linux(This is caused by the different EOL under Linux and Windows)
Can't generate AST correctly when parsing a C source code(written on Windows) under Linux [message #904220] Mon, 27 August 2012 23:03
Eclipse UserFriend
I have a C source code which is written in Windows EOL: '\r\n'.
When I want to get the AST under Linux in my plug-in project like this:
IASTTranslationUnit tu = xxx.getASTTranslationUnit(cEditor);
tu.accept(myVisitor);

I can only get the top function declaration from my visitor.
But if I replace all '\r\n' with '\r', i will get the right AST.

My question is:
Can I handle this with some extra CDT flags/options?
Or this situation is not supported by CDT and I have to convert it in some other ways by myself just as what i did above.
Previous Topic:Can't start Indigo
Next Topic:How to run multiple Google Test binaries in CDT C++ unit test?
Goto Forum:
  


Current Time: Tue Jun 24 04:10:41 EDT 2025

Powered by FUDForum. Page generated in 0.05627 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top