Closed dzimmanck closed 2 years ago
I am working on this. It involves a pretty substantial re-factor of the parser code in order to re-use the data type parsing for both states and events.
I have a branch ready for review at https://github.com/dzimmanck/smlang-rs/tree/feature/support_lifetimes_in_state_data.
I haven't issued a pull request yet because:
This involved quite a bit of re-factor that I think went pretty well. To aide in review, I broke it into 8 concise commits with limited scope for each change and every one of which still passes all tests. @korken89, would love a review of these changes before I proceed when you get a chance.
I debugged the code and added a working example, so I submitted a pull request. Pull request #28 .
Closed by pull request #28
While events can contain data with lifetimes, states cannot and generate a "use of undeclared lifetime" error inside the procedural macro if you try.
Simple example: