Conversation
… a capital letter.
th4s
left a comment
There was a problem hiding this comment.
Looks good to me. I haven't used pest before but it seems that this is exactly the right tool for developing a new language/grammar in Rust.
The pairs api seems to allow to iterate over the parsed tokens. I think this is where we will have to add our optimizations. After that we can start translating to VM bytecode.
… as opposed to within the grammar
|
I amended the HoneyBadgerSwap example to fit the current grammar. The last thing to add before converting this draft PR into an actual PR is some skeleton code for the parser. |
|
I have a more complete grammar, have amended the honey badger swap example further and added some skeleton code for the parser. With Pest, a lot of the code is auto-generated, so all that is need is to define enums/structs and use the corresponding derive macros. |
I have a basic PEG grammar for StoffelLang along with some skeleton code for what the parser should do and to provide some more guidance of what the compiler's functionality should be. I haven't amended the honeybadgerswap examples as there is still some more thought that needs to go into the grammar.
Currently, the grammar doesn't support the following: