project-langx / X

A placeholder language with shareable bytecode IR.
2 stars 0 forks source link

[IMPL] The value is represented as a string which is a very bad design decision #37

Closed frankhart2018 closed 2 years ago

frankhart2018 commented 2 years ago

Describe the change Using string to represent value is a bad idea and it will cause challenges in the future. Porting to a separate class (Value) representation for the values will be useful. This will also fix the disallowed any expressions issue in mypy (added in PR for #35).

This requires changes to which of following?

This actually adds a new component:

A single PR should be submitted for all the parts. The commits need to be separate for all of them.

Note: You can only submit a patch if it is approved by one of the maintainers, otherwise the PR will be rejected.

Note: In the C, C++ and Python decompilers a namedtuple (ConstVal) is used to represent values, migrate this to Value too.