Browse Source

cppparser: Backport enum scope fix to 1.10

From bc039a0476b31fa624ce548629b7e05cccd2d570
rdb 2 năm trước cách đây
mục cha
commit
8cbf93162a
2 tập tin đã thay đổi với 1779 bổ sung1772 xóa
  1. 1769 1771
      dtool/src/cppparser/cppBison.cxx.prebuilt
  2. 10 1
      dtool/src/cppparser/cppBison.yxx

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1769 - 1771
dtool/src/cppparser/cppBison.cxx.prebuilt


+ 10 - 1
dtool/src/cppparser/cppBison.yxx

@@ -2896,8 +2896,17 @@ base_specification:
         ;
 
 enum:
-        enum_decl '{' enum_body '}'
+        enum_decl
 {
+  if (current_enum->_scope != nullptr) {
+    push_scope(current_enum->_scope);
+  }
+}
+        '{' enum_body '}'
+{
+  if (current_enum->_scope != nullptr) {
+    pop_scope();
+  }
   $$ = current_enum;
   current_enum = nullptr;
 }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác