diff --git a/Makefile b/Makefile index 118f2f65..965e9a62 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,10 @@ test: wrend # Generate the Wren site. docs: + @./script/generate_docs.py + +# Continuously generate the Wren site. +watchdocs: @./script/generate_docs.py --watch # Take the contents of corelib.wren and copy them into src/wren_core.c. diff --git a/doc/site/classes.markdown b/doc/site/classes.markdown index 8ad77b2d..e96b0ef8 100644 --- a/doc/site/classes.markdown +++ b/doc/site/classes.markdown @@ -28,9 +28,10 @@ To make our unicorn do stuff, we need to give it methods. This defines a `prance` method that takes no arguments. To support parameters, add a parenthesized parameter list after the method's name: :::dart - // Inside class... - prance(where, when) { - IO.print("The unicorn prances in " + where + " at " + when) + class Unicorn { + prance(where, when) { + IO.print("The unicorn prances in " + where + " at " + when) + } } Unlike most other dynamically-typed languages, in Wren you can have multiple methods in a class with the same name, as long as they take a different number of parameters. In other words, you can overload by arity. So this class is fine: diff --git a/doc/site/fibers.markdown b/doc/site/fibers.markdown new file mode 100644 index 00000000..4297d0da --- /dev/null +++ b/doc/site/fibers.markdown @@ -0,0 +1,3 @@ +^title Fibers + +**TODO** \ No newline at end of file diff --git a/doc/site/functions.markdown b/doc/site/functions.markdown new file mode 100644 index 00000000..8e298ac9 --- /dev/null +++ b/doc/site/functions.markdown @@ -0,0 +1,3 @@ +^title Functions + +**TODO** \ No newline at end of file diff --git a/doc/site/lists.markdown b/doc/site/lists.markdown new file mode 100644 index 00000000..257a8a3c --- /dev/null +++ b/doc/site/lists.markdown @@ -0,0 +1,3 @@ +^title Lists + +**TODO** \ No newline at end of file diff --git a/doc/site/maps.markdown b/doc/site/maps.markdown new file mode 100644 index 00000000..4f4160ed --- /dev/null +++ b/doc/site/maps.markdown @@ -0,0 +1,3 @@ +^title Maps + +**TODO** \ No newline at end of file diff --git a/doc/site/method-calls.markdown b/doc/site/method-calls.markdown index 4f8e0f4e..bf361614 100644 --- a/doc/site/method-calls.markdown +++ b/doc/site/method-calls.markdown @@ -83,7 +83,7 @@ it `b`". Most of these are probably familiar already. The `..` and `...` operators are "range" operators. The number type implements those and returns a range object, -which can in turn be iterated over using a [`for`](loops.html) loop. +which can in turn be iterated over using a `for` [loop](looping.html). ## Subscript operators diff --git a/doc/site/template.html b/doc/site/template.html index cf5ccd6e..f6d8fd40 100644 --- a/doc/site/template.html +++ b/doc/site/template.html @@ -35,9 +35,9 @@