From 3440b08d8db7234c0fa68a58faafaab67c29c350 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 25 May 2023 18:19:18 +0800 Subject: [PATCH] - enhancement: ignore '__extension__' when parsing C/C++ codes. --- NEWS.md | 2 ++ RedPandaIDE/parser/parserutils.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index a71895aa..01e8180b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,10 +1,12 @@ Red Panda C++ Version 2.22 + - enhancement: ignore '__extension__' when parsing C/C++ codes. - fix: Crash at startup when current problem in the problem set is connected with source file. - fix: Double-clicking on touchpad can't select current word. - fix: foreach-loops are not correctly parsed. - fix: '^' is not correctly handled as operator. - fix: lambda expression is not correctly handled. + Red Panda C++ Version 2.21 diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index 42d58ca1..3536af94 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -72,6 +72,8 @@ void initParser() CppKeywords.insert("explicit",KeywordType::SkipItself); CppKeywords.insert("export",KeywordType::SkipItself); CppKeywords.insert("false",KeywordType::SkipItself); + CppKeywords.insert("__extension__",KeywordType::SkipItself); + //CppKeywords.insert("for",SkipType::skItself); CppKeywords.insert("mutable",KeywordType::SkipItself); CppKeywords.insert("noexcept",KeywordType::SkipItself);