Conversation
Fixed type propogation with normal expressions Fixed a bunch of other things that I no longer remember
This function has had multiple issues throughout the development of this compiler. I finally had enough after some horrendous mishaps and fixed the most blaring issues I could find. + Correct tree branching + Equidistant spacing? (I think all of the spacing is the same however that branch is reach so far as the depth is the same)
- Changed cast operators to be UNARY_POST and fixed an issue with their node generation - Added backtrace support
Added missing header files Fixed gitignore Fixed READMEs
- Added an interner to the lexical phase - Trying to incorporate the interner into the parser and other parts of the compiler - Added a basic structure for symbol table API - Added a basic structure for type checker/resolution API
Added khash and moved interner to use khash instead Changed tokens to be in place and not heap allocated Types are now only parsed during the parse phase #26
Modules are now parsed to completition, one at a time Removed 'as' (BIT_CAST) operator Added structs for every AST type Added symbols as an AST type and modified the defintion of a symbol All IDs are parsed to symbols now instead which should then later be resolved. This means that there always only ever one version of a declaration in the AST while multiple symbols can point to it.
Some parser refactor as well for nicer looking parsing
Made parser and lexer not heap allocated Modified token handling Made changes to the operator parsing and handling Modified block_arena to double block count everytime instead of adding a single block at a time
Added buffer strings which are basically just sourcespans where we have allocated buffers for the string data Made sure we use arena_grow so we can profile to see how often it is called Current parser single test.fe file benchmark: ~2 million LOC/s
Moved symbol_table to symbol_map and symbol_table now has the different needed symbol_maps for a scope Added a member function index. It stores all struct and impl member functions which is used for function resolution candidate lookup Added a pre-checker phase Added template list to traits and impls Closes #25, #27 and #33
Added struct templates Implemented more of the type checking system
Removed copy, move and place traits
Added place intrinsic
Modified trait syntax to use:
```
impl<GenericTypes> Trait<RequiredTypes> where HasTraitImplementation1<GenericTypes>, HasTraitImplementation2<RequiredTypes> {}
```
Fixed all traits to use the new system
Added implicit casting which only allows type casts (non altering casts)
Added a rule that trait implementation required types must be the same
order as the trait specifies
Closes #34, #35
Single line comment would not resolve into a linebreak so an expr would be turned into multi-line
Added 'Self' and 'void' keyword Changed void data type to use 'VoidT' instead of 'VOID'
Handles second part of #37
Removed scope AST modifications from child nodes as that is an unknown side effect which I had forgotten about when I was debugging an issue
Added context_lookup_type(ID name_id) Started utilizing the types symbol table more, will try to keep this up I think as well Structures have a seperate declarations and member list. Declarations are only for a_declaration while members are for functions and variable symbols Added back self type to struct templates list
Added initial constraint generation and type gathering phase https://se.cs.uni-tuebingen.de/publications/benes2025overloading.pdf
Changed main module to be stored with its ID, not entry point string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.