ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since eba615c was
6f4b7f2,
checked in by Aaron Moss <a3moss@…>, 6 years ago
|
Finish Stmt printers, implement short_mode for Decls
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[461046f] | 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 | |
---|
| 20 | #include "AST/Node.hpp" |
---|
| 21 | #include "Common/Indenter.h" |
---|
| 22 | |
---|
| 23 | namespace ast { |
---|
| 24 | |
---|
[6f4b7f2] | 25 | class Decl; |
---|
| 26 | |
---|
| 27 | /// Print a node with the given indenter |
---|
[461046f] | 28 | void print( std::ostream & os, const ast::Node * node, Indenter indent = {} ); |
---|
| 29 | |
---|
| 30 | inline void print( std::ostream & os, const ast::Node * node, unsigned int indent ) { |
---|
| 31 | print( os, node, Indenter{ Indenter::tabsize, indent }); |
---|
| 32 | } |
---|
| 33 | |
---|
[6f4b7f2] | 34 | /// Print a declaration in its short form |
---|
| 35 | void printShort( std::ostream & os, const ast::Decl * node, Indenter indent = {} ); |
---|
| 36 | |
---|
| 37 | inline void printShort( std::ostream & os, const ast::Decl * node, unsigned int indent ) { |
---|
| 38 | printShort( os, node, Indenter{ Indenter::tabsize, indent } ); |
---|
| 39 | } |
---|
| 40 | |
---|
[461046f] | 41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.