Encapsulates a preprocessor macro. Macros are stored in the AST, but since they are not regular C++ syntax they are treated specially: They will be in order compared to other macros, but not to the rest of the AST since the preprocessing stage occurs first. They will always be in the global scope. Note that the parameters is a pointer to a vector - if the pointer is null, then the macro is not function-like. If the pointer is non-null then it points to a vector of parameter names. If the macro is function-like but with no parameters, it is a pointer to an empty vector.
Public Typedefs Summary: | |
std::vector<std::string> | Parameters The type of the parameters [Source] |
Public Member functions Summary: | |
constructor | Macro(SourceFile* file, int line, const ScopedName& name, Parameters* params, const std::string& text) Constructor. [Source] |
virtual destructor | ~Macro() Destructor [Source] |
const Parameters* | parameters() The parameters of the macro. [Source] |
const std::string& | text() The expansion text of the macro. [Source] |
virtual void | accept(Visitor*) Accepts the given visitor [Source] |
Private Data members Summary: | |
Parameters* | m_parameters The parameters [Source] |
std::string | m_text The expansion text [Source] |
Public Typedefs Inherited from Declaration | |
vector |
Public Member functions Inherited from Declaration | |
name, name, file, set_file, line, type, set_type, access, set_access, comments, comments, declared, declared |
Public Data members Inherited from FakeGC::cleanup | |
cleanup_next |
Public Member function Details: |
Constructor. Assumes ownership of the Parameters vector if it is not a null pointer.
The parameters of the macro. May be a null pointer if the macro is not function-like