Skip to content

PreprocessingInfo

For preprocessing information including source comments, include , if, define, etc

Synopsis

Declared in <SageIII/rose_attributes_list.h>

Enums

Name

Description

DirectiveType

RelativePositionType

MK: Enum type to store if the directive goes before or after the corresponding line of source code

Static Member Functions

Non-Member Functions

Name

Description

ASTtools::isIfDirectiveBegin

Returns true if the info is an '#if', '#ifdef', or '#ifndef'.

ASTtools::isIfDirectiveMiddle

Returns true if the info is an '#elif' or '#else'.

ASTtools::isPositionAfter

Returns true if info is positioned after its statement.

ASTtools::isPositionBefore

Returns true if info is positioned before its statement.

ASTtools::isPositionInside

Returns true if info is positioned inside its statement.

SageBuilder::buildComment

Build and attach a comment, comment style is inferred from the language type of the target node if not provided. It is indeed a wrapper of SageInterface::attachComment().

SageBuilder::buildCpreprocessorDefineDeclaration

Build and attach #define XX directives, pass "#define xxx xxx" as content.

SageBuilder::buildHeader

Build a dangling #include "x.h" header, insertHeader() is needed to actually insert it

SageInterface::attachArbitraryText

Attach an arbitrary string to a located node. A workaround to insert irregular statements or vendor‐specific attributes.

SageInterface::attachComment

Build and attach comment, comment style is inferred from the language type of the target node if not provided

SageInterface::attachComment

Build and attach comment onto the global scope of a source file

SageInterface::findHeader

Find the preprocessingInfo node representing #include <header.h> or #include "header.h" within a source file. Return NULL if not found.

SageInterface::insertHeader

Insert #include "filename" or #include <filename> (system header) into the global scope containing the current scope, right after other #include XXX.

SageInterface::insertHeader

Insert #include "filename" or #include <filename> (system header) onto the global scope of a source file

SageInterface::insertHeader

Insert #include "filename" or #include <filename> (system header) onto the global scope of a source file, add to be the last #include .. by default among existing headers, Or as the first header. Recommended for use.

Created with MrDocs