ADT
arm-eh
ast-experimental
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
pthread-emulation
qualifiedEnum
Last change
on this file since 93744b5 was d76c588, checked in by Aaron Moss <a3moss@…>, 6 years ago |
Stubs for new resolver, implementation of new indexer, type environment
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | //
|
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
3 | //
|
---|
4 | // The contents of this file are covered under the licence agreement in the
|
---|
5 | // file "LICENCE" distributed with Cforall.
|
---|
6 | //
|
---|
7 | // Print.hpp --
|
---|
8 | //
|
---|
9 | // Author : Thierry Delisle
|
---|
10 | // Created On : Tue May 21 16:20:15 2019
|
---|
11 | // Last Modified By :
|
---|
12 | // Last Modified On :
|
---|
13 | // Update Count :
|
---|
14 | //
|
---|
15 |
|
---|
16 | #pragma once
|
---|
17 |
|
---|
18 | #include <iosfwd>
|
---|
19 | #include <utility> // for forward
|
---|
20 |
|
---|
21 | #include "AST/Node.hpp"
|
---|
22 | #include "Common/Indenter.h"
|
---|
23 |
|
---|
24 | namespace ast {
|
---|
25 |
|
---|
26 | class Decl;
|
---|
27 |
|
---|
28 | /// Print a node with the given indenter
|
---|
29 | void print( std::ostream & os, const ast::Node * node, Indenter indent = {} );
|
---|
30 |
|
---|
31 | /// Wrap any standard format printer (matching above) with integer Indenter constructor
|
---|
32 | template<typename T>
|
---|
33 | inline void print( std::ostream & os, T && x, unsigned int indent ) {
|
---|
34 | print( os, std::forward<T>(x), Indenter{ Indenter::tabsize, indent });
|
---|
35 | }
|
---|
36 |
|
---|
37 | /// Print a declaration in its short form
|
---|
38 | void printShort( std::ostream & os, const ast::Decl * node, Indenter indent = {} );
|
---|
39 |
|
---|
40 | inline void printShort( std::ostream & os, const ast::Decl * node, unsigned int indent ) {
|
---|
41 | printShort( os, node, Indenter{ Indenter::tabsize, indent } );
|
---|
42 | }
|
---|
43 |
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.