brucou / slim

Compiles a Kingly state machine drawn with the professional graph editor yEd
4 stars 0 forks source link

dealing with non-printable characters #2

Closed brucou closed 4 years ago

brucou commented 4 years ago

This links to https://github.com/brucou/slim/issues/1

When writing a machine with the yed graph editor, we can use line returns to have the names of control states, or the labels for guards and actions fit in the graphical shape that we are using.

Those non-printable characters can lead to malform JavaScript when compiling, and anyways be less user-friendly on the API user side, as an API user would have to have exactly the same name including the non-printable characters. That is not so practical, nor readable inside a JS code base.

So the idea here is to:

This sould give simple and ergonomic rules for mapping labels in the graph to their implementing JavaScript function.

Also:

brucou commented 4 years ago

released in v0.7