Closed doehyunbaek closed 10 months ago
I tried to solve the first problem with https://github.com/es-meta/esmeta/pull/180/commits/7ccad177a77bb5e2ef23f254068886b4dff07a36
Currently checking e2e test failing.
a8d0643 fixes the e2e test.
I merged this PR after refactoring the code. Thanks! Because of the dependency issue, I dropped the feature for version-dependent support of the type model. This PR only supports the JSON-based management of the type model.
Currently has two problems.
Currently, TyModel is hardcode into TyModel.scala and is being used globally.
Usages of global TyModel is as follows:
This is also related to hack in NameTy, as there are circular dependencies between NameTy functions and TyModel, before you just hardcoded TyModel and as it was provided from the start it did not cause problem. Now, as TyModel itself should also be parsed out of json and NameTy functions are invoked when parsing, it causes problem.
It seems that to resolve above two problems, you should make above three usage sites not to use global TyModel but version-dependent TyModel as parameter, currently working on this solution.