solidity-ide
solidity-ide copied to clipboard
How can we improve the pragma-awareness of our language infrastructure?
Solidity versions change quite frequently. Versions changes have usually impact on:
- scoping
- quick-fixes
- builtin declaration
- [the grammar]
Currently we use the same language infrastructure regardless of the Solidity version. With respect to the upcoming changes (0.5.0) we want to have the flexibility to make the infrastructure more flexible.
Issue #148 proposed a solution for dynamically creating builtin declarations based on the version of a SourceUnit that surrounds a given element.
This solution is not optimal since it only covers a small portion of the expected differences between versions. It also is not very elegant and in regards to usage and maintainability.
I would propose to move the "pragma check" to the earliest point possible, basically resource level, and then use assisted injection to create the proper infrastructure specific to the version.
Problem: how to react on version changes during editing?