Created
October 6, 2014 13:37
-
-
Save mlcollard/cf82db1c795976d38477 to your computer and use it in GitHub Desktop.
srcML - Example of libsrcml convenience functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
libsrcml_convenience.cpp | |
Demonstrates basic use of libsrcml convenience function srcml() | |
for converting to and from the srcML format | |
Error handling removed for clarity | |
*/ | |
#include <srcml.h> | |
int main() { | |
// Translate source file main.cpp -> srcML file main.cpp.xml | |
srcml("main.cpp", "main.cpp.xml"); | |
// Translate srcML file main.cpp.xml -> source file newmain.cpp | |
srcml("main.cpp.xml", "newmain.cpp"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment