AnkiApp can make flashcards that automatically highlight computer source code. Here's a quick guide showing how, for the programming language C#. To use this feature for other languages, change references to "C#" to the language of your choice.
First, create a new deck.
When creating a new deck, there's a menu option to "Change Layout". Clicking that option will bring you to the screen shown below.
This screen lets you alter the Layout for the deck, which determines how cards are displayed.
This screen allows you to create new cards by entering content for the fields available in this deck: "code" and "meaning". The code you type in the "code" field should automatically be highlighted as C# code, in the preview on the right side.