tipc
A TIP to LLVM compiler
Static Public Member Functions | List of all members
FrontEnd Class Reference

A collection of routines implementing the compiler front end. More...

#include <FrontEnd.h>

Static Public Member Functions

static std::shared_ptr< ASTProgramparse (std::istream &stream)
 Parse an input stream and return an AST. More...
 
static void prettyprint (ASTProgram *program, std::ostream &os)
 
static void astVisualize (std::shared_ptr< ASTNode > node, std::ostream &os)
 

Detailed Description

A collection of routines implementing the compiler front end.

Member Function Documentation

◆ astVisualize()

void FrontEnd::astVisualize ( std::shared_ptr< ASTNode node,
std::ostream &  os 
)
static

◆ parse()

FrontEnd::parse ( std::istream &  stream)
static

Parse an input stream and return an AST.

Parsing can detect errors, which are reported via throw of a ParseError exception. In the absence of errors, ownership of the generated AST is transfered to the caller.

Parameters
streamthe input stream holding the program text.
Returns
the generated AST.

◆ prettyprint()

void FrontEnd::prettyprint ( ASTProgram program,
std::ostream &  os 
)
static

The documentation for this class was generated from the following files: