diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-26 10:06:01 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-26 10:06:01 -0600 |
commit | f4474891acec5918f94bc126fed8eb9bb2792912 (patch) | |
tree | 819864472649715d2bae19eeeba450a94621b5f2 /include/printer/cfamily.h | |
parent | eb1ab91e1a12520d825cae60ee49655a0e8c4b94 (diff) | |
download | chill-f4474891acec5918f94bc126fed8eb9bb2792912.tar.gz chill-f4474891acec5918f94bc126fed8eb9bb2792912.tar.bz2 chill-f4474891acec5918f94bc126fed8eb9bb2792912.zip |
set printS getPrecS to protected
Diffstat (limited to 'include/printer/cfamily.h')
-rw-r--r-- | include/printer/cfamily.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/printer/cfamily.h b/include/printer/cfamily.h index 83e7765..0426ded 100644 --- a/include/printer/cfamily.h +++ b/include/printer/cfamily.h @@ -7,23 +7,19 @@ #include "printer/generic.h" -/*! - * \file - */ - namespace chill { namespace printer { /*! - * \brief Print the AST for C like syntax, This replace the old print function + * \brief Print the AST in a C-like syntax. + * + * This replace the old print function. * Custom multiplexer should not be needed. This version should calculate the correct precedence for expressions. * Expression should be encapsulated in {} or () or ended with ; with heuristics at the parent node * * All precedence calculation taken from http://en.cppreference.com/w/cpp/language/operator_precedence */ class CFamily : public GenericPrinter { - public: - CFamily() {} - + protected: virtual int getPrecS(chillAST_BinaryOperator *n); virtual int getPrecS(chillAST_CallExpr *n); @@ -109,6 +105,8 @@ namespace chill { virtual void printS(std::string ident, chillAST_UnaryOperator *n, std::ostream &o); virtual void printS(std::string ident, chillAST_VarDecl *n, std::ostream &o); + public: + CFamily() {} }; } } |