From 36d2a815a3a9acee5bf718b1bb7a222091d39fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Wed, 11 Oct 2017 15:10:35 +0200 Subject: [PATCH] Fix code generation of unexposed entities --- src/code_generator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/code_generator.cpp b/src/code_generator.cpp index 39d44fb..3837352 100644 --- a/src/code_generator.cpp +++ b/src/code_generator.cpp @@ -1034,7 +1034,10 @@ namespace code_generator::output output(type_safe::ref(generator), type_safe::ref(entity), cur_access); if (output) + { detail::write_token_string(output, entity.spelling()); + output << newl; + } return static_cast(output); } @@ -1196,10 +1199,9 @@ void detail::write_token_string(code_generator::output& output, const cpp_token_ // operators that are always binary operators in all contexts else if (token.spelling.back() == '=' // all assignment operators || token.spelling == "/" || token.spelling == "%" || token.spelling == "==" - || token.spelling == "!=" || token.spelling == "<" || token.spelling == ">" - || token.spelling == "<=" || token.spelling == ">=" || token.spelling == "&&" - || token.spelling == "||" || token.spelling == "|" || token.spelling == "^" - || token.spelling == "?") + || token.spelling == "!=" || token.spelling == "<=" || token.spelling == ">=" + || token.spelling == "&&" || token.spelling == "||" || token.spelling == "|" + || token.spelling == "^" || token.spelling == "?") output << operator_ws << punctuation(token.spelling) << operator_ws; else output << punctuation(token.spelling);