]> Nishi Git Mirror - gwion.git/commitdiff
:book: Update docs [skip ci]
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 20:15:00 +0000 (22:15 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 20:15:00 +0000 (22:15 +0200)
README.md
docs/02_Reference/00_Types/00_Primitives.mdr [new file with mode: 0644]
docs/02_Reference/00_Types/01_Enums.mdr [new file with mode: 0644]
docs/02_Reference/00_Types/02_Unions.mdr [new file with mode: 0644]
docs/02_Reference/00_Types/03_Typedefs.mdr [new file with mode: 0644]
docs/02_Reference/00_Types/04_Function_Pointers.mdr [new file with mode: 0644]

index 230ccbb738f6ff3a95acfca1f6e55b8733926340..3684f0869d43497965e1f8872b52bae20ac7be73 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@
 [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2417/badge)](https://bestpractices.coreinfrastructure.org/projects/2417)
 [![Coveralls branch](https://img.shields.io/coveralls/fennecdjay/Gwion/master.svg)](https://coveralls.io/github/fennecdjay/Gwion?branch=master)
 [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg)](#contributors)
+[![BCH compliance](https://bettercodehub.com/edge/badge/fennecdjay/Gwion?branch=master)](https://bettercodehub.com/)
 
 Gwion is a programming language, aimed at making music
 
diff --git a/docs/02_Reference/00_Types/00_Primitives.mdr b/docs/02_Reference/00_Types/00_Primitives.mdr
new file mode 100644 (file)
index 0000000..7d27921
--- /dev/null
@@ -0,0 +1 @@
+# Primitive types
diff --git a/docs/02_Reference/00_Types/01_Enums.mdr b/docs/02_Reference/00_Types/01_Enums.mdr
new file mode 100644 (file)
index 0000000..8759ae3
--- /dev/null
@@ -0,0 +1,21 @@
+# Enums
+
+For those who don't know about enumerated types,
+you can read about those
+[here](https://www.geeksforgeeks.org/enumeration-enum-c) and
+[here](https://en.wikipedia.org/wiki/Enumerated_type)
+
+## Enums in gwion
+You simply use an enum like this
+``` enum0.gw
+enum Optionnal_name {
+  zero, one, two
+};
+<<< zero, one, two >>>;
+```
+
+When inside a class,
+Enums are automatically declared **static**,
+but they accept **private** or **protect** specifiers.
+
+When not in a class, they can be made `global`
diff --git a/docs/02_Reference/00_Types/02_Unions.mdr b/docs/02_Reference/00_Types/02_Unions.mdr
new file mode 100644 (file)
index 0000000..3ca0d19
--- /dev/null
@@ -0,0 +1 @@
+# Union types
diff --git a/docs/02_Reference/00_Types/03_Typedefs.mdr b/docs/02_Reference/00_Types/03_Typedefs.mdr
new file mode 100644 (file)
index 0000000..a64999b
--- /dev/null
@@ -0,0 +1 @@
+# Typedefs
diff --git a/docs/02_Reference/00_Types/04_Function_Pointers.mdr b/docs/02_Reference/00_Types/04_Function_Pointers.mdr
new file mode 100644 (file)
index 0000000..9f45ff3
--- /dev/null
@@ -0,0 +1 @@
+# Function Pointers