Semantic code validation tips
- Ivaylo Fiziev
- May 2
- 2 min read

I already have a post (https://ifiziev.wixsite.com/psinside/post/semantic-code-validation) related to code validation but back then there was something missing. The tooltips ...
It took quite a while to get them into the SCL editor but better late than never. Still we have issues due to the text editor (https://bcgsoft.com/Products/Bcgedit) that we use. More specifically emphasizing statements/expressions since they are not considered a single human readable word. And the control can only emphasize human readable words. Why? Who knows? It is a strange limitation especially when it is supposed to work with programming languages. A much better control is this one: http://avalonedit.net/. It is definitely better when it comes to coding. The SCL debugger relies on it. Hopefully one day the SCL editor will do the same. The effort of doing so however is not small...
There is nothing special about the tooltips in general, but when used this way they are really helpful for the poor man trying to write code and fighting with the limitations of the editor. You hover the mouse over the emphasized text and a tooltip explaining the error appears next to the mouse cursor. Of course this is only possible if the token that we emphasize falls into the category of the human readable words ...

We check all identifiers for validity. This includes: variable names, field names, type names, function names. We also check for duplicated variable names. The good thing is that you get these checks even without running the code. e.g. it improves the usability.
In the future more checks will be added. Examples are: declared/actual argument type checks, malformed expressions checks, duplicated variable IDs checks etc.
Despite the limitations I hope you'll like this feature. It brings us closer to what a real code editor should be. Version 2509 will have it.
Bye!
Comments