Skip to content

Introduce __FIXME__ token

Sean Leavey requested to merge feature/fixme-token into develop

This MR introduces a __FIXME__ token used by the unparser to indicate Python values with no KatScript analogs.

When a user tries to unparse a model containing an invalid value, such as a np.nan, the unparser will generate a __FIXME__ token in place of the value and a warning will be emitted. If the user tries to parse a script containing a __FIXME__ value, a syntax error will then be displayed highlighting the location of the invalid value.

This fixes #393 (closed) as well as implements the suggestion from @afreise to inject a placeholder value into the generated script in this circumstance.

Merge request reports