Minor fixes
This commit is contained in:
parent
cbca2a9a47
commit
eb8567d6f4
|
@ -3,8 +3,7 @@ A basic programming language written in Nim
|
||||||
|
|
||||||
## Project structure
|
## Project structure
|
||||||
|
|
||||||
The project is split into several directories and submodules to ease human inspection:
|
The project is split into several directories and submodules:
|
||||||
- `README.md` -> This file here (lol)
|
|
||||||
- `docs` -> Contains markdown files with the various specifications for NimVM (bytecode, grammar, etc)
|
- `docs` -> Contains markdown files with the various specifications for NimVM (bytecode, grammar, etc)
|
||||||
- `docs/bytecode.md` -> Lays out the bytecode specification for NimVM as well as serialization guidelines
|
- `docs/bytecode.md` -> Lays out the bytecode specification for NimVM as well as serialization guidelines
|
||||||
- `docs/grammar.md` -> Formal grammar specification in EBNF syntax
|
- `docs/grammar.md` -> Formal grammar specification in EBNF syntax
|
||||||
|
@ -45,7 +44,7 @@ The compilation toolchain has been designed as follows:
|
||||||
- constant folding (meaning 1 + 2 will be replaced with 3 instead of producing 2 constant opcodes and 1 addition opcode)
|
- constant folding (meaning 1 + 2 will be replaced with 3 instead of producing 2 constant opcodes and 1 addition opcode)
|
||||||
- global name resolution. This is possible because NimVM's syntax only allows for globals to be defined in a way that
|
- global name resolution. This is possible because NimVM's syntax only allows for globals to be defined in a way that
|
||||||
is statically inferrable, so "name error" exceptions can be caught before any code is even ran.
|
is statically inferrable, so "name error" exceptions can be caught before any code is even ran.
|
||||||
- throw warnings for things like unreachable code after return statements (optional)
|
- throw warnings for things like unreachable code after return statements (optional).
|
||||||
|
|
||||||
The optimizer also detects attempts to modify a constant's or a let's value at compile-time.
|
The optimizer also detects attempts to modify a constant's or a let's value at compile-time.
|
||||||
- Once the optimizater is done, the compiler takes the AST and compiles it to bytecode for it to be later interpreted
|
- Once the optimizater is done, the compiler takes the AST and compiles it to bytecode for it to be later interpreted
|
||||||
|
|
Loading…
Reference in New Issue