The ENUM has entered the chat and well did a bit of cleanup + better console system. But just as a quick question how have y’all been doing on your projects? Also what keyword should I add next? Well enough of a rant let me really talk now:
Added the enum keyword to the lexer reserved word list. On the paper side, EnumDecl AST nodes got built and registered in a new EnumRegistry that tracks member->value mappings. Simultaneously, operators tokens were unified into a single TokenKind.Operator with a seperate C# enum called OperatorKind that maps to all the operators.
Fixed != parsing, unsigned comparison codegen, enum member overflow, bare unsigned keyword ussage, and duplicate enum member detection.
Now alongside enum I also added typedef. It supports both the simple typedef <type> <alias> and typedef enum { ... } <alias> forms.
Now I was talking about the EnumRegistry and the other one was TypeAliasREgistry, but to make it more maintainable I unifed it all under a generic NameRegistry<T> base.
I did a lot of cleanup on the parser project that I’m not really go into because it’s a bit pointless.
I overhauled the diagnostic system alongisde just the CLI. I moved from System.CommandLine to Spectre.Console.Cli.
Now the most recent thing was the diagnostic system when it comes to multiple errors. I replaced Pidgin’s combinator-based recovery with custom Parser<TToken, T> subclasses.
I added a RecoverableList that tries to parse each item, on failure it reports the error, skips the offending token, and advances to the next ; before retrying.
And a few other things such as dropping AOT because of reflection and keeping R2R, SingleFile, and selfcontained.
And if you look at the images you can see the new diagnostic system and the typedef and enum keyword working,and working together.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.