pumascript / puma

Meta-programming framework for JavaScript based on LayerD concepts
MIT License
30 stars 28 forks source link

Groom and redesign type-inference branch for track promotion #107

Open Undre4m opened 7 years ago

Undre4m commented 7 years ago

Type-inference branch consists of a modified PumaScript runtime designed for type extrapolation and annotation.

Annotation in its current state is purely for demonstration and works by iterating through all state variables along the different contexts (which are no longer discarded but saved on a separate array) and inserting jsdoc-like decorations exhibiting the native, and/or extended data types the variable took along it's life cycle. This, though it doesn't seem to alter the main functionality should be restored and cleaned up for better results. E.g.: The escodegen library needed some modifications for comment generation, due to it not recognizing the traverse required modules, probably because of non compliance with UMD: (https://github.com/estools/escodegen/issues/300)[] This was solved in a far-from-orthodox manner and a proper solution should be looked for.

Also, type meta-information needs some tweaks and inference-engine should be mildly resigned for supporting future language definitions for cross-compilation.

Mostly all changes should be confined in a manner than updating from the main master branch doesn't conflict with the current track alterations.