From e60b909294348cc81b7485d9cde2c2b2ebde9279 Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Wed, 17 Nov 2021 17:18:02 +0800 Subject: [PATCH] - enhancement: code completion suggestion for "__func__" variable --- NEWS.md | 5 ++++- RedPandaIDE/parser/cppparser.cpp | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d6e99929..d8b5b0f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,7 @@ -Version 0.8.12 For Dev-C++ 7 Beta +Version 0.9.1 For Dev-C++ 7 Beta + - enhancement: code completion suggestion for "__func__" variable + +Version 0.9.0 For Dev-C++ 7 Beta - fix: control keys in the numpad doesn't work in the editor - fix: project layout infos are wrongly saved to registry - fix: project layout infos are not correctly saved/loaded diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 03360fe0..ac324a9a 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -2153,6 +2153,21 @@ void CppParser::handleMethod(const QString &sType, const QString &sName, const Q true, false); } + // add "__func__ variable" + addStatement( + functionStatement, + mCurrentFile, + "", //dont override hint + "static const char ", + "__func__", + "[]", + "\""+scopelessName+"\"", + startLine+1, + StatementKind::skVariable, + StatementScope::ssLocal, + StatementClassScope::scsNone, + true, + false); } else { functionStatement = addStatement( functionClass,