COVESA / ifex

The Interface Exchange Framework. Tools for processing interface/API descriptions in different formats, including the IFEX core format. Some example files are at: https://github.com/COVESA/vehicle_service_catalog.
Mozilla Public License 2.0
14 stars 17 forks source link

FIX: Prepare for additional fundamental data types in ifex AST (or related layer types) #109

Closed gunnar-mb closed 8 months ago

gunnar-mb commented 8 months ago

Currently the fundamental types used in ifex_ast.py are only [str, int] and the code reflects that.

The function ifex_ast_to_yaml is however reusable for new Layer Types, and those might use other data types.

To make the code more future-proof and complete:

This line in ifex_ast_construction

    if type(node) in [str, int]:

ought to be something like if is_builtin_type(node): instead. (or "simple" type because lists/maps are handled differently)