Skip to content

SageBuilder::buildNamespaceDeclaration_nfi

Build one namespace declaration with explicit semantic and lexical ownership. Source-lexical declarations require source-spelled fragments and a positive producer-wide namespace order in the final expanded token stream; generated and semantic-only declarations require no order.

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

[[visibility("default")]]
SgNamespaceDeclarationStatement*
buildNamespaceDeclaration_nfi(
    SgName const& name,
    bool unnamednamespace,
    SgScopeStatement* scope,
    namespace_declaration_ownership_enum ownership,
    SgNamespaceSourceFragment* openingIntroducerFragment,
    SgNamespaceSourceFragment* openingFragment,
    SgNamespaceSourceFragment* closingFragment,
    std::optional<unsigned int> sourceOrder);

Return Value

This class represents the concept of a C++ namespace declaration.

Parameters

Name Description
name String-backed name value used by AST nodes.
scope This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
sourceOrder Class template for optional values.

Created with MrDocs