Basic syntax coloring is easy: just reuse your tokenizer. You already need a tokenizer for your compiler or interpreter. Assign colors to keywords, strings, numbers, and comments. For this simple syntax coloring you don't need to parse, only tokenize, and for pretty much all languages you can do it on a per-line basis.
Auto-formatting is also easy: just don't do it. Does a toy language really need it? I have two languages with syntax coloring and zero languages with auto-formatting. I think syntax coloring is table stakes but auto-formatting is not. You can have an interesting toy language without auto-formatting.
Auto-formatting is also easy: just don't do it. Does a toy language really need it? I have two languages with syntax coloring and zero languages with auto-formatting. I think syntax coloring is table stakes but auto-formatting is not. You can have an interesting toy language without auto-formatting.