Conlang: Implement functions 1.0 (Resolves #12)

- [x] Call syntax
- [x] Function declaration syntax
TODO:
- [ ] Any form of type checking
- [ ] Static variable resolution
- [ ] Closures, etc.
This commit is contained in:
2023-10-29 23:47:00 -05:00
parent f3306e7ba4
commit ee5dabb4f3
7 changed files with 587 additions and 200 deletions

View File

@@ -11,15 +11,15 @@ Friday each month.
- [x] Write AST for expression grammar
- [x] Write parser for AST
- [ ] Create tests for parser (and AST)
- [ ] Parse `dummy.cl` into a valid AST
- [x] Parse `dummy.cl` into a valid AST
- [x] Pretty printer, for debugging
- [ ] Create minimal statement grammar
- [ ] Variable definition statements
- [ ] Function definition statements
- [x] Create minimal statement grammar
- [x] Variable definition statements
- [x] Function definition statements
## Short Goals:
- [ ] `for` loops and `while` loops can be used on the trailing side of an assignment
- [ ] Tree-walk interpreter for prototyping and debugging
- [x] `for` loops and `while` loops can be used on the trailing side of an assignment
- [x] Tree-walk interpreter for prototyping and debugging
- [ ] Data structures and sum-type enums
- [ ] Expression type-checker
- [ ] Trait/Interface system