Skip to content

SageBuilder::buildSourceFile

Build a SgSourceFile node and attach it to SgProject The input file will be loaded if exists, or an empty one will be generated from scratch transparently. Output file name is used to specify the output file name of unparsing. The final SgFile will be inserted to project automatically. If not provided, a new SgProject will be generated internally. Using SgFile‐>get_project() to retrieve it in this case.

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

[[visibility]]
SgSourceFile*
buildSourceFile(
    std::string const& inputFileName,
    std::string const& outputFileName,
    SgProject* project,
    bool clear_globalScopeAcrossFiles = false);

Parameters

Name

Description

project

This class represents a source project, with a list of SgFile objects and global

Created with MrDocs