Skip to content

SageBuilder::buildSourceFile

Build a SgSourceFile node and attach it to SgProject Parse an existing readable input file. An unreadable input or frontend failure is a hard error. Use buildGeneratedSourceFile for output-only AST construction. outputFileName selects the unparse destination. The file is registered in project; buildFile creates a project when none is supplied. Retrieve its owner with SgFile::get_project().

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

[[visibility("default")]]
SgSourceFile*
buildSourceFile(
    std::string const& inputFileName,
    std::string const& outputFileName,
    SgProject* project);

Parameters

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

Created with MrDocs