feat: add README
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# FromZero / Language
|
||||
|
||||
[README in Russian](./README.ru.md)
|
||||
|
||||
**FromZero/Language** is a package consisting of a JIT compiler and a virtual machine for the FZL language.
|
||||
|
||||
## Features
|
||||
|
||||
At the moment, the language has the following capabilities:
|
||||
|
||||
- Builtin `printline` function for printing argument to stdout
|
||||
- String and numeric literals
|
||||
- Arithmetic operations: addition, subtraction, multiplication, division, modulo, power
|
||||
|
||||
|
||||
## File extensions
|
||||
|
||||
Standard file extensions:
|
||||
|
||||
- `.fzs` - source code
|
||||
- `.fzb` - compiled binary file
|
||||
|
||||
|
||||
## Building
|
||||
|
||||
1. Clone the repository: `git clone https://git.samsonium.dev/samsonium/fz-lang.git`
|
||||
2. Build: `make build`
|
||||
|
||||
After this, a "build" directory will appear in the project root. It will contain two executable files:
|
||||
|
||||
- `fzc` - a compiler
|
||||
- `fz` - virtual machine
|
||||
|
||||
Both executables have usage help that can be displayed using `--help` flag (or `-h`).
|
||||
|
||||
|
||||
## Development guideline
|
||||
|
||||
You need a code editor with Clang LSP support because of `.clang-format` file in the project root.
|
||||
This file provides set up codestyle rules.
|
||||
|
||||
There is two targets in Makefile for debugging purposes: `build-c` for the compiler and `build-vm` for the VM.
|
||||
Each target can be called with `FILE` variable. For example:
|
||||
|
||||
|
||||
```shell
|
||||
$ make debug-c FILE=exl/hw.fzs
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user