Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
loicbourgois committed Aug 1, 2021
1 parent 5e55587 commit 5c8ccfe
Show file tree
Hide file tree
Showing 14 changed files with 1,217 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/0.bootstrap.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docs/000_hello_world.gf
@@ -0,0 +1,16 @@
display
salutation
title
english
Greeting
french
Salutation
function
hello
output
english
Hello World!
french
Bonjour tout le monde !
graph
function.hello -> display.salutation
16 changes: 16 additions & 0 deletions docs/000_hello_world.gf.test
@@ -0,0 +1,16 @@
display
salutation
title
english
Greeting
french
Salutation
function
hello
output
english
Hello World!
french
Bonjour tout le monde !
graph
function.hello -> display.salutation
26 changes: 26 additions & 0 deletions docs/001_hello_someone.gf
@@ -0,0 +1,26 @@
display_input
name
title
english
Name
french
Nom
display
personal_salutation
title
english
Greeting
french
Salutation
function
hello_someone
input
name
output
english
Hello {name}!
french
Bonjour {name} !
graph
input.name -> function.hello_someone
function.hello_someone -> display.personal_salutation
26 changes: 26 additions & 0 deletions docs/001_hello_someone.gf.test
@@ -0,0 +1,26 @@
display_input
name
title
english
Name
french
Nom
display
personal_salutation
title
english
Greeting
french
Salutation
function
hello_someone
input
name
output
english
Hello {name}!
french
Bonjour {name} !
graph
input.name -> function.hello_someone
function.hello_someone -> display.personal_salutation
142 changes: 142 additions & 0 deletions docs/002_drive_alone.gf
@@ -0,0 +1,142 @@
###########
# Imports #
###########
com.gouttelettes.types.date
com.gouttelettes.functions.today


#########
# Types #
#########
date_of_birth
format
date
constraints
before_or_equal_today
assert
self <= today()
error_message
en
Date must be inferior or equal to today


################
# Enumerations #
################
species
dog
english
Dog
french
Chien
human
english
Human
french
humain


country
France
USA


##########
# Inputs #
##########
date_of_birth
title
english
Date of birth
french
Date de naissance
type
date_of_birth


country
title
english
Country
french
Pays
type
country


species
title
english
Species
french
Espèces
type
species


###########
# Outputs #
###########
age
title
english
Age
french
Age
type
number


drive_alone_without_restriction
title
english
Can drive alone without restriction
french
Peut conduire seul sans restriction
type
yes_no_maybe


explanation
title
english
Explanation
french
Explication
type
text


#############
# Functions #
#############
compute_age
inputs
date_of_birth
outputs
age
if
date_of_birth <= today -> today - date_of_birth


can_drive_alone_without_restriction
inputs
age
country
outputs
yes_no_maybe
optional text
if
country == France and 18 <= age -> yes
country == France and age < 18 -> no
country == USA and 18 <= age -> yes
country == USA and 17 <= age < 18 -> maybe "Depends of the state."
"Source: https://en.wikipedia.org/wiki/List_of_minimum_driving_ages#North_America."
country == USA and age < 17 -> no


#########
# Graph #
#########
date_of_birth -> function.compute_age -> age
age country -> can_drive_alone_without_restriction -> drive_alone_without_restriction explanation
20 changes: 20 additions & 0 deletions docs/003_high_up.gf
@@ -0,0 +1,20 @@
import
std.display.hex_game
display
plateau
type
hex_game
title
english
Greeting
french
Salutation
function
hello
output
english
Hello World!
french
Bonjour tout le monde !
graph
function.hello -> display.salutation
Binary file added docs/5224725ecea7d0a6f16b.module.wasm
Binary file not shown.

0 comments on commit 5c8ccfe

Please sign in to comment.