Windows console now supports supports ANSI escape codes, but we need to enable it using SetConsoleMode with ENABLE_VIRTUAL_TERMINAL_PROCESSING flag.
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.
Syntax hightlighting now works fine on Windows:
https://i.imgur.com/P0i04A7.png