globals.hpp 803 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __GLOBALS_H__
  2. #define __GLOBALS_H__
  3. #include "tree.hpp"
  4. #include <iostream>
  5. // parsing
  6. extern CompilationUnit* unit;
  7. extern bool search_down;
  8. extern Namespace* search_namespace;
  9. extern Namespace* current_namespace;
  10. extern std::string last_docucomment;
  11. // the first file indicated by # 1 "..."
  12. // (this is what the C preprocessor outputs so that you know which was the
  13. // original file before preprocessing
  14. extern std::string original_file;
  15. // the filename where the current fragment came from (before it was included by
  16. // the preprocessor)
  17. extern std::string current_file;
  18. // get line number inside the current_file
  19. int getCurrentLine();
  20. // config/output
  21. extern std::istream* input;
  22. extern std::string inputfile;
  23. extern std::string modulename;
  24. extern std::string selected_namespace;
  25. #endif