Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ uint8 b = a + 1;
uint8 c = a + b + 1;
```

## Printing

Values can be printed to standard out using a print statement, proceeded by the value wanted to print.

```
print 1;

uint8 a = 2;
print a;
```

## Examples

Examples can be found in the `/examples` folder.
Expand All @@ -79,6 +90,7 @@ String segments are converted to a list of tokens. Representing the smallest seg
| Identifier | `IDENTIFIER` | Variable identifier |
| Number | `NUMBER` | Integer |
| Return | `RETURN` | Returns a value from a function |
| Print | `PRINT` | Prints a value |

## Syntax Analyser

Expand All @@ -90,6 +102,7 @@ Combines tokens into statements.
| Assignment | `ASSIGNMENT` | Sets a variable to a value |
| Return | `RETURN` | Returns a value from a function |
| Addition | `ADDITION` | Adds two values and assigns them to an identifier |
| Print | `PRINT` | Prints the value after it |

## `LLVM` Intermediate Representation

Expand Down
Loading