Garrit Franke
48f3a6692e
chore: extract types into own module
3 years ago
Garrit Franke
4c4f9f743d
chore: extract AST to own module
3 years ago
Garrit Franke
7810052c56
Modules ( #17 )
...
* chore: rename program -> module
* feat: add module builder
* feat: append standard library
* chore: fix clippy warnings
* chore: fix formatting
* feat: imports
* chore: fix formatting
* feat: resolve path deltas to entrypoint
* chore: fix formatting
* fix: path resolver
* chore: refactor stdlib
* docs: document modules
* docs: add "unreleased" section to changelog
* docs: add modules as unreleased bullet in changelog
* feat: resolve nested modules
* fix: clean up file resolvement
* chore: fix clippy lints
3 years ago
Garrit Franke
278d5e6542
Match statements ( #15 )
...
* feat: lexical tokens for match
* feat: parser implementation of match
* feat: js generation for match statements
* feat: match block arms
* feat: default arm for match
* chore: fix formatting
* chore: fix clippy warnings
* docs: add match statement
* feat: use "else" keyword instead of "default"
Co-authored-by: Garrit Franke <garrit@slashdev.space>
3 years ago
Garrit Franke
2c6d81c063
feat: struct definitions ( #12 )
...
* feat: struct definitions
* feat: struct initialization
* chore: fix warning
* feat: use `new` keyword to initialize structs
* feat: infer struct type
* feat: allow structs as types
* feat: basic field access
* chore: fix formatting
* feat: assert function
* docs: add structs
* fix: builtin readme
* chore: refactor field access parsing
* chore: fix formatting
* feat: struct field assignments
* feat: struct field access in expressions
* feat: struct field access on function calls
* chore: fix formatting
* feat: nested structs
* chore: fix formatting
* chore: fix clippy warnings
Co-authored-by: Garrit Franke <garrit@slashdev.space>
3 years ago
Garrit Franke
ebd34541b1
chore: fix warnings
3 years ago
Garrit Franke
6a6547b9c7
feat: assignment operators ( #10 )
...
* feat: assignment operators
* docs: use assignment operators
Co-authored-by: Garrit Franke <garrit@slashdev.space>
3 years ago
Garrit Franke
c156773c5f
feat: scoped variables
3 years ago
Garrit Franke
4a4634e2d7
feat: add any type
3 years ago
Garrit Franke
54b971b445
feat: infer function return types
3 years ago
Garrit Franke
94a3e34776
feat: break and continue
3 years ago
Garrit Franke
1fa86badab
docs: add functions
3 years ago
Garrit Franke
031e378538
WIP: Add for loops
3 years ago
Garrit Franke
949b4dc449
Generate function prototypes
3 years ago
Garrit Franke
b34944e257
Compile stdlib seperately
3 years ago
Garrit Franke
9459c11afa
Add C backend
3 years ago
Garrit Franke
c615014cb8
Add function return type
3 years ago
Garrit Franke
a565849f3a
Add types to function arguments
3 years ago
Garrit Franke
13a88a0e76
Fix array access as assignment
3 years ago
Garrit Franke
ac07e43719
Add array access syntax
3 years ago
Garrit Franke
0d213f33e9
Add variable assignment
3 years ago
Garrit Franke
8fe1e42c43
Add booleans
3 years ago
Garrit Franke
13fb396842
Refactor parser module structure
3 years ago
Garrit Franke
03c71987cd
Add integer arrays
3 years ago
Garrit Franke
2a6003846d
Fix warnings
3 years ago
Garrit Franke
226fb93792
Add copyright notices
3 years ago
Garrit Franke
b23a9bd751
Generalize block into own statement
3 years ago
Garrit Franke
82496b7807
Add remaining comparison operators
3 years ago
Garrit Franke
7d8883ed63
Allow multiple statements in if conditional
3 years ago
Garrit Franke
e22f5647c6
Add math operations
3 years ago
Garrit Franke
a593bba4d7
Remove uneeded compount statement
3 years ago
Garrit Franke
c250d98c31
Implement return generation
3 years ago
Garrit Franke
193ea74aa2
Allow empty returns
3 years ago
Garrit Franke
7ca96f9a43
Add strings
3 years ago
Garrit Franke
86ca1cd2dd
Parse functions
3 years ago