blueloveTH 2 lat temu
rodzic
commit
13ee2c3c04
2 zmienionych plików z 12 dodań i 5 usunięć
  1. 1 1
      README.md
  2. 11 4
      docs/coding_style_guide.md

+ 1 - 1
README.md

@@ -158,7 +158,7 @@ All kinds of contributions are welcome.
   - any suggestions
   - any suggestions
   - any questions
   - any questions
 
 
-Check our [Coding Style Guide](https://pocketpy.dev/coding_style_guide/) if you want to contribute C++ code.
+If you find this project useful, consider star this repository (●'◡'●)
 
 
 ## Reference
 ## Reference
 
 

+ 11 - 4
docs/coding_style_guide.md

@@ -6,7 +6,14 @@ label: Coding style guide
 
 
 # Coding Style Guide
 # Coding Style Guide
 
 
-## Naming rules
+
+## For Python
+
+Use [PEP-8](https://www.python.org/dev/peps/pep-0008/) as the coding style guide.
+
+## For C++
+
+### Naming rules
 
 
 For class names, always use **PascalCase**
 For class names, always use **PascalCase**
 
 
@@ -53,7 +60,7 @@ For macros, use **SNAKE_CASE**
 #define TEST(x) x+1
 #define TEST(x) x+1
 ```
 ```
 
 
-## Access control
+### Access control
 
 
 Please use python style access control.
 Please use python style access control.
 
 
@@ -74,7 +81,7 @@ public:
 
 
 It does not forbid users to access internal members.
 It does not forbid users to access internal members.
 
 
-## Use compact style
+### Use compact style
 
 
 Try to make the code compact if it does not affect readability.
 Try to make the code compact if it does not affect readability.
 
 
@@ -88,7 +95,7 @@ if(x == 1){
 }
 }
 ```
 ```
 
 
-## For `std::shared_ptr<T>`
+### For `std::shared_ptr<T>`
 
 
 Use a `_` suffix to indicate a type is a shared pointer.
 Use a `_` suffix to indicate a type is a shared pointer.