cimplec / sim-c

A dynamically typed high-level front end for C

Home Page:https://cimplec.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Generalize prec_to_type and type_to_prec dictionary

frankhart2018 opened this issue · comments

Describe the solution you'd like
Two dictionaries called prec_to_type and type_to_prec have been created multiple times in the parser, these map an integer precedence to typename and typename to precedence integer respectively. If there is requirement of adding a new typename with precedence in between these values then one will have to change all these dictionaries. It would thus be better to have a single dictionary in parser_constants.py which can be used everywhere.