Assargadon / magritte-python

0 stars 0 forks source link

MADescriptionTranspiler_JS should work via metadescriptors #135

Open Assargadon opened 4 months ago

Assargadon commented 4 months ago

MADescriptionTranspiler_JS now uses the hardcoded list of fields to transpile. Even worse, these fields are expected to be presented in every description, and when a description has "extra" fields, a special trick is used (see visitSingleOptionDescription for example).

Instead, metadescriptors and their accessors should be used to iterate over the fields of concrete description-to-be-transpiled (some white list of field names may or may not be introduced).