Source code can be augmented in many ways to provide useful feedback for a programmer. It would be great to see existing source code editors augmented to provide these features.
- Code Reviewing
- Highlight lines not covered by unit tests.
- Highlight code which has been changed since the last review.
- Hyperlink function names to source code bodies.
- Inline documentation (including images/eps and other kinds of markup).
- Bug Fixing
- Highlight code based on its age.
- Highlight and link code based on program flow/coverage.
- Augment variable names with values (i.e. in a bubble).
- Highlight code based on execution time.
- Augment function definitions with execution details (such as execution time, memory contention issues, threading issues).
Some of these features could be integrated by using the history of the source code exposed by a source code management system, other features would require a well defined compiler framework.
One option would be to expose a common format for marking up source code. This could be a separate file which annotates sequences of characters with meta-data which could then be used by the editor for highlighting source code. Various tools could produce this standard output and this could be used by the editor to augment the source code text.
Syntax Augmentation Format
This file format is very simple and is designed so that it can be generated and parsed very easily. It is designed to annotate specific parts of a text file with information such as
I hope to add this functionality to jQuery.Syntax as a concept demonstration.