Try to make better diagnostics
Opened this issue · 0 comments
genericptr commented
Right now there is a sub standard implementation for diagnostics that doesn't work well enough. CodeTools is simply not good enough as it only returns a single error and stops but maybe we can run the node tree and find errors to show which don't stop the parser (see TCodeToolManager.CheckSyntax
).
Some ideas to custom syntax checking:
- Detect if units exist.
- Detect if types or identifiers in code blocks exist.
- Detect invalid mode switches.
- Optional: detect if case is wrong for known identifiers.
- Wrong number of parameters (or types? in function calls (no overloads match)