MimIR 0.1
MimIR is my Intermediate Representation
|
Keeps track of indentation level. More...
#include <mim/util/print.h>
Public Member Functions | |
Tab (std::string_view tab={" "}, size_t indent=0) | |
Getters | |
size_t | indent () const |
std::string_view | tab () const |
print | |
Wraps mim::print to prefix it with indentation.
| |
template<class... Args> | |
std::ostream & | print (std::ostream &os, const char *s, Args &&... args) |
template<class... Args> | |
std::ostream & | lnprint (std::ostream &os, const char *s, Args &&... args) |
Same as Tab::print but prepends a std::endl to os . | |
template<class... Args> | |
std::ostream & | println (std::ostream &os, const char *s, Args &&... args) |
Same as Tab::print but appends a std::endl to os . | |
Creates a new Tab | |
Tab | operator++ (int) |
Tab | operator-- (int) |
Tab | operator+ (size_t indent) const |
Tab | operator- (size_t indent) const |
Modifies this Tab | |
Tab & | operator++ () |
Tab & | operator-- () |
Tab & | operator+= (size_t indent) |
Tab & | operator-= (size_t indent) |
Tab & | operator= (size_t indent) |
Tab & | operator= (std::string_view tab) |
|
inline |
Definition at line 198 of file print.h.
References tab().
Referenced by operator+(), operator++(), operator++(), operator+=(), operator-(), operator--(), operator--(), operator-=(), operator=(), and operator=().
|
inline |
Definition at line 204 of file print.h.
Referenced by operator+(), operator+=(), operator-(), operator-=(), and operator=().
|
inline |
Same as Tab::print but prepends a std::endl
to os
.
Definition at line 217 of file print.h.
References print().
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 212 of file print.h.
References mim::print().
Referenced by mim::ast::AST::bootstrap(), lnprint(), println(), and mim::ast::RetExpr::stream().
|
inline |
Same as Tab::print but appends a std::endl
to os
.
Definition at line 221 of file print.h.
References print().
Referenced by mim::Nest::dot(), mim::ast::DeclExpr::stream(), mim::ast::Import::stream(), and mim::ast::Module::stream().
|
inline |
Definition at line 205 of file print.h.
Referenced by operator=(), and Tab().