Skip to content

Commit

Permalink
Update C/C++ attribute and class to C23 and C++23, issue #160.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jan 17, 2025
1 parent 1f2e354 commit 4b3b0f0
Show file tree
Hide file tree
Showing 4 changed files with 934 additions and 419 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Latest development builds (artifacts in Release configuration for each compiler
* [Vala](https://wiki.gnome.org/Projects/Vala) 0.54
* C/C++, [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#cc)
* Objective-C/C++, [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#objective-cc)
* [C Standard Library](tools/lang/C.c), up to C2x.
* [C++ STL](tools/lang/CPP.cpp), up to C++20.
* [C Standard Library](tools/lang/C.c), up to C23.
* [C++ STL](tools/lang/CPP.cpp), up to C++23.
* [Cangjie (仓颉)](tools/lang/Cangjie.cj), up to October 2024.
* [CSS Style Sheet](tools/lang/CSS.css), up to November 2024.
* [SCSS Style Sheet](tools/lang/SCSS.scss), up to Dart Sass 1.50.
Expand Down
17 changes: 11 additions & 6 deletions src/EditLexers/stlCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ static KEYWORDLIST Keywords_CPP = {{
"__aligned__ __alloc_size__ __noreturn__ __returns_twice__ __noinline__ __noclone__ __always_inline__ __flatten__ __pure__ __nothrow__ __sentinel__ __format__ __format_arg__ __no_instrument_function__ __no_split_stack__ __section__ __constructor__ __destructor__ __used__ __unused__ __deprecated__ __weak__ __malloc__ __alias__ __ifunc__ __warn_unused_result__ __nonnull__ __gnu_inline__ __externally_visible__ __hot__ __cold__ __artificial__ __error__ __warning__ __cleanup__ __common__ __nocommon__ __mode__ __packed__ __shared__ __tls_model__ __vector_size__ __const__ "
"cdecl stdcall __cdecl__ __stdcall__ __deprecated__ __dllexport__ __dllimport__ __naked__ __noinline__ __noreturn__ __nothrow__ __selectany__ "
"may_alias __may_alias__ visibility __visibility__ "
// C++11, 14, 17, 20
"assert carries_dependency fallthrough ensures expects maybe_unused likely unlikely no_unique_address nodiscard optimize_for_synchronized "
// C/C++
"assume carries_dependency fallthrough indeterminate maybe_unused likely unlikely no_unique_address nodiscard optimize_for_synchronized reproducible unsequenced "

, // 5 Class
// locale.h
Expand Down Expand Up @@ -136,16 +136,20 @@ static KEYWORDLIST Keywords_CPP = {{
"runtime_error range_error overflow_error underflow_error "
// <system_error>
"error_category error_code error_condition system_error "
// <stacktrace>
"stacktrace_entry basic_stacktrace stacktrace "
// <utility>
"to_chars_result from_chars_result integer_sequence pair tuple_size tuple_element "
// <tuple>
"tuple "
// <optional>
"optional nullopt_t bad_optional_access "
"optional bad_optional_access "
// <variant>
"variant variant_size variant_alternative monostate bad_variant_access "
// <any>
"any bad_any_cast "
// <expected>
"unexpected unexpected bad_expected_access "
// <bitset>
"bitset "
// <memory>
Expand All @@ -156,7 +160,7 @@ static KEYWORDLIST Keywords_CPP = {{
// <scoped_allocator>
"scoped_allocator_adaptor "
// <functional>
"reference_wrapper identity is_bind_expression is_placeholder function bad_function_call "
"reference_wrapper identity is_bind_expression is_placeholder function move_only_function bad_function_call "
"default_searcher boyer_moore_searcher boyer_moore_horspool_searcher "
// <type_traits>
"integral_constant bool_constant true_type false_type "
Expand Down Expand Up @@ -187,8 +191,8 @@ static KEYWORDLIST Keywords_CPP = {{
"map multimap set multiset "
// <unordered_map> <unordered_set>
"hash unordered_map unordered_multimap unordered_set unordered_multiset "
// <queue> <stack> <span>
"queue priority_queue stack " "span "
// <queue> <stack> <flat_map> <flat_set> <span> <mdspan>
"queue priority_queue stack flat_map flat_multimap flat_set flat_multiset span mdspan "
// <iterator>
"incrementable_traits indirectly_readable_traits iterator_traits input_iterator_tag output_iterator_tag forward_iterator_tag bidirectional_iterator_tag random_access_iterator_tag contiguous_iterator_tag "
"reverse_iterator back_insert_iterator front_insert_iterator insert_iterator move_iterator common_iterator counted_iterator move_sentinel "
Expand Down Expand Up @@ -832,6 +836,7 @@ static KEYWORDLIST Keywords_CPP = {{
"first second " // pair
"ignore " // <tuple>
"nullopt " // <optional>
"unexpect " // <expected>
"variant_npos " // <variant>
// <functional>
"equal_to not_equal_to greater less greater_equal less_equal " // ranges
Expand Down
Loading

0 comments on commit 4b3b0f0

Please sign in to comment.