tipc
A TIP to LLVM compiler
Functions
PrettyPrinter.cpp File Reference
#include "PrettyPrinter.h"
#include <iostream>
#include <sstream>
Include dependency graph for PrettyPrinter.cpp:

Functions

std::string joinWithDelim (std::vector< std::string > &visitResults, std::string delim, int sz, int skip)
 

Function Documentation

◆ joinWithDelim()

std::string joinWithDelim ( std::vector< std::string > &  visitResults,
std::string  delim,
int  sz,
int  skip 
)

join last sz items from the visitedResults with delimiter delim. Then, remove these items from the stack

the delimiter before the last skip items are not appended (e.g. to not add trailing commas)

returns the joined string