hclbaur / sdt-core

SDT Core Implementation
The Unlicense
0 stars 0 forks source link

API hardening release #14

Open hclbaur opened 5 months ago

hclbaur commented 5 months ago

When creating a Transform by parsing an SDT spec, the result will be a Transform that is as good as the parser. When creating a transform by manually assembling Statements, the API allows constructs that the parser will (or should) not. For example, you could create a Choose statement containing a When statement and Otherwise statement, followed by another When statement. Or you could add a Param statement within an If statement, or overwrite it (see issue #12 ). This will cause all kinds of strange errors at run-time.

I need to "harden" the API so it doesn't allow you to create transforms that contain obvious errors. I may not be able to get it fool-proof but at least some level of protection is required.