korken89 / smlang-rs

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

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

Closed ASMfreaK closed 11 months 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 11 months 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 11 months ago

Looks like some tests are also failing