TextField Source Editor

How can I achieve a source code editor in SwiftUI like Xcode, highlighting all the keywords and things like that. I've tried Regex + AttributedString... To hard... Anyone has any idea?

TextField Source Editor
 
 
Q