Skip to content

Commit

Permalink
Improve docs (#60)
Browse files Browse the repository at this point in the history
* switch theme

Signed-off-by: Flipez <code@brauser.io>

* update generator

Signed-off-by: Flipez <code@brauser.io>

* fix path and style

Signed-off-by: Flipez <code@brauser.io>

* change base url

Signed-off-by: Flipez <code@brauser.io>

* improve file docs

Signed-off-by: Flipez <code@brauser.io>

* improve file docs

Signed-off-by: Flipez <code@brauser.io>

* Add header

Signed-off-by: Flipez <code@brauser.io>
  • Loading branch information
Flipez authored Jan 19, 2022
1 parent 3f222ed commit 4e1595a
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/content/docs/control_expressions/foreach.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "controls"
---
# Foreach
For loops allow to iterate over different sets of data and perform actions based on them.

```js
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/control_expressions/if.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "controls"
---
# If
With `if` and `else` keywords the flow of a program can be controlled.

```js
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Array



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/boolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Boolean

A Boolean can represent two values: `true` and `false` and can be used in control flows.

Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Error



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# File



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/float.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Float



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Hash



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/integer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Integer

An integer can be positiv or negative and is always internally represented by a 64-Bit Integer.

Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/null.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# Null



Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/literals/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# String



Expand Down
9 changes: 5 additions & 4 deletions docs/content/docs/specification/builtins.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ menu:
parent: "specification"
toc: true
---
### exit(INTEGER)
# Builtin Functions
## exit(INTEGER)

Terminates the program with the given exit code.

Expand All @@ -14,7 +15,7 @@ Terminates the program with the given exit code.
exit status 1
```

### raise(INTEGER, STRING)
## raise(INTEGER, STRING)

Terminates the program with the given exit code and prints the error message.

Expand All @@ -24,7 +25,7 @@ Terminates the program with the given exit code and prints the error message.
exit status 1
```

### puts(STRING|ARRAY|HASH|BOOLEAN|INTEGER|NULL|FILE)
## puts(STRING|ARRAY|HASH|BOOLEAN|INTEGER|NULL|FILE)

Prints the string representation of the given object to STDOUT.

Expand All @@ -39,7 +40,7 @@ Prints the string representation of the given object to STDOUT.
["test", true, 3]
```

### open(STRING, STRING, STRING)
## open(STRING, STRING, STRING)
> Returns FILE
Opens a file pointer to the file at the path of argument one with the mode of (optional) argument two and a file permission as optional argument three.
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/specification/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ menu:
parent: "specification"
toc: true
---
# Closures
```js
newGreeter = def (greeting) {
return def (name) { puts(greeting + " " + name); }
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/specification/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ menu:
parent: "specification"
toc: true
---
# Comments
Comments start with `//` characters.
All following content up to the end of the line is part of the comment.

Expand Down
3 changes: 2 additions & 1 deletion docs/content/docs/specification/functions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: "Function"
title: "Functions"
menu:
docs:
parent: "specification"
toc: true
---
# Functions
Implicit and explicit return statements are supported.

```js
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/specification/local_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ menu:
parent: "specification"
toc: true
---
# Local Variables
Variables represent the object as a memorable name.

```js
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/specification/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ menu:
parent: "specification"
toc: true
---
# Modules
> 👉 Modules were introduced in `0.11`
Modules are seperate RocketLang files can be imported using the `import` statement.
Expand Down
1 change: 1 addition & 0 deletions docs/templates/literal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ menu:
docs:
parent: "literals"
---
# {{ .Title }}

{{ .Description }}

Expand Down

1 comment on commit 4e1595a

@vercel
Copy link

@vercel vercel bot commented on 4e1595a Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.