@@ -78,7 +78,7 @@ In the following sections will the bullet points above be covered. The answers w
## Syntax
The implemented langugage is desciribed usign EBNF grammar below. The language is implemented using lalrpop. Note that "?" means optional and when a part ends with "s" for example "programs" is it a vector containing one or more program (same as program+).
#### EBNF
```ebnf
Program
:Programs
...
...
@@ -225,10 +225,35 @@ Bool
;
```
Showcase
#### Showcase
```rust
```
#### Coverage
- Two different function definitions (with arguments and return type or without arguments and return type)
- Let and mutable let
- Assignments
- Functioncalls
- If with or without else
- While
- Expressions
- Types: bool, i32 and unit
All statements have explicit types.
#### Future implementation
- Function definition with arguments but no return type or no arguments but return type
- Else if
- Other loops than while
- More types
- Nested functions
- Functions not needed to be decleared in specific order
- Global assignments
- Shadowing
Currently it is needed to seperate statements with ";" (except for the last one) for the parser to interpret it as a vector. This would be nice to rewrite in the future.