korken89 / smlang-rs

A State Machine Language DSL procedual macro for Rust
Apache License 2.0
203 stars 28 forks source link

Add name to statemachine and make dot output stable and unique #62

Closed asmfreak closed 1 year ago

asmfreak commented 1 year ago

This adds ability to name statemachines. I have a personal pet project that uses smlang. It uses several ones of them. So I wanted to see them all as pictures via graphviz. My problem with that was: smlang-rs generates only one picture (statemachine.svg). Also I wanted to give each statemachine a unique name. This patch addresses both issues. I've also bumped the version as this change is a bit significant in my opinion. Please advise, if it should be revised.

asmfreak commented 1 year ago

I've implemented proposed changes. I've also added derive functionality to states and events. Since it was conflicting with other feature (impl_display), I completely removed code for it, since the derive version has a broader scope.

ryan-summers commented 1 year ago

Looks like some tests are also failing