- testing:
use testdata dir with files for files to parse and expected output - fix the rest of this readme
- use jump instructions for if statements instead of what happens now
- for loops
- calling functions that are declared further down the file
- float litterals with e notation, eg. 1e-5
- generating (ssa) IR
- better errors
- type system: enums, interfaces
- optimization (definitely not for now)
- clean up codebase
- importing/modules
const var fn return
type struct interface while
if else true false
name | value |
---|---|
letter | unicode_letter | "_" |
binary_digit | [01] |
octal_digit | [0-7] |
decimal_digit | [0-9] |
hex_digit | [0-9A-Fa-f] |
digit | decimal_digit |
name | value |
---|---|
binary_number | "0b" (binary_digit) + |
ocatal_number | "0o" (octal_digit) + |
hex_number | "0x" (hex_digit) + |
decimal_number | (decimal_digit) + |
number | binary_number | octal_number | hex_number | decimal_number |
identifiers are names for things like functions, variables.
name | value |
---|---|
identifier | letter (letter | digit )* |
a mathematical expression
name | value |
---|---|
Type | Typename |
Typename | identifier |
a variable is a way to store something
name | value |
---|---|
variable_decleration | "var" identifier ":" Type "=" Expression ";" |
setting value | identifier = Expression ";" |
a constant is a compile-time expression which can be reused
name | value |
---|---|
const_decleration | "const" identifier ":" Type "=" Expression ";" |
you know what a function is
name | value |
---|---|
function_decleration | "fn" identifier "(" (identifier ":" Type) * ")" [ ":" Type ] "{" <code> "}" |