Skip to content

SageBuilder::buildFile

AST high level builders for others

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

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

Description

Build a SgFile 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.

Return Value

This class represents a source file for a project (which may contian

Parameters

Name

Description

project

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

Created with MrDocs