From a4cb52fb96e1cfd2a50512c60c9e19615ec77555 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 12 Nov 2022 10:45:53 +0800 Subject: [PATCH] - fix: _Pragma is not correctly handled; --- NEWS.md | 1 + RedPandaIDE/parser/parserutils.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 2aec27e8..b9d8d800 100644 --- a/NEWS.md +++ b/NEWS.md @@ -24,6 +24,7 @@ Red Panda C++ Version 2.4 - fix: inline functions are not correctly parsed; - fix: &operator= functions are not correctly parsed; - fix: Code Formatter's "add indent to continueous lines" option is not correctly saved. + - fix: _Pragma is not correctly handled; Red Panda C++ Version 2.3 diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index fbb2fd98..149599ea 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -119,6 +119,7 @@ void initParser() CppKeywords.insert("typeid",KeywordType::SkipNextParenthesis); CppKeywords.insert("while",KeywordType::SkipNextParenthesis); CppKeywords.insert("static_assert",KeywordType::SkipNextParenthesis); + CppKeywords.insert("_Pragma",KeywordType::SkipNextParenthesis); // Skip to } CppKeywords.insert("asm",KeywordType::MoveToRightBrace); @@ -187,6 +188,7 @@ void initParser() CppKeywords.insert("struct",KeywordType::None); CppKeywords.insert("union",KeywordType::None); + CppKeywords.insert("for",KeywordType::For); CppKeywords.insert("catch",KeywordType::Catch); CppKeywords.insert("private",KeywordType::Private);