用C/C++做开发时,有很多的宏命令,绕来绕去的,很难看清楚关系。一般的编译器都提供了展开的命令,VC下的命令如下:
CL /EP /C YourCodeFile.cpp
This command will carry out all preprocessor directives and expand macros in the C++ code file "YourCodeFile.cpp". The/EP option suppresses compilation. /EP also suppresses the output files from the /FA, /Fa, and /Fm options. The/C (Preserve Comments During Preprocessing) option is used to preserve comments in the preprocessed output.
这个是从msdn上摘下来的,除了可以用于cpp文件之外,还可以用于.h头文件。
我将v8的ast.h展开后可以看见他的astNode类的定