From 382f82d1175757d2dd859a1bef254829b858fe7b Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 13 Oct 2019 22:15:00 +0200 Subject: [PATCH] :book: Update docs [skip ci] --- README.md | 1 + docs/02_Reference/00_Types/00_Primitives.mdr | 1 + docs/02_Reference/00_Types/01_Enums.mdr | 21 +++++++++++++++++++ docs/02_Reference/00_Types/02_Unions.mdr | 1 + docs/02_Reference/00_Types/03_Typedefs.mdr | 1 + .../00_Types/04_Function_Pointers.mdr | 1 + 6 files changed, 26 insertions(+) create mode 100644 docs/02_Reference/00_Types/00_Primitives.mdr create mode 100644 docs/02_Reference/00_Types/01_Enums.mdr create mode 100644 docs/02_Reference/00_Types/02_Unions.mdr create mode 100644 docs/02_Reference/00_Types/03_Typedefs.mdr create mode 100644 docs/02_Reference/00_Types/04_Function_Pointers.mdr diff --git a/README.md b/README.md index 230ccbb7..3684f086 100644 --- 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 index 00000000..7d279218 --- /dev/null +++ b/docs/02_Reference/00_Types/00_Primitives.mdr @@ -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 index 00000000..8759ae31 --- /dev/null +++ b/docs/02_Reference/00_Types/01_Enums.mdr @@ -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 index 00000000..3ca0d197 --- /dev/null +++ b/docs/02_Reference/00_Types/02_Unions.mdr @@ -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 index 00000000..a64999b2 --- /dev/null +++ b/docs/02_Reference/00_Types/03_Typedefs.mdr @@ -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 index 00000000..9f45ff3a --- /dev/null +++ b/docs/02_Reference/00_Types/04_Function_Pointers.mdr @@ -0,0 +1 @@ +# Function Pointers -- 2.43.0