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]]
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

This class represents strings within the IR 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