So I am writing a code editor, and to include syntax highlighting. researching online, I still didn’t understand the code and thought it was complex. My goal is just to detect where those keywords are. I got the coloring part down but I want it to be able to detect those keywords without being inefficient.
I was thinking of using a while loop that checks the document for the keywords forever, but I thought that might be too inefficient for most computers.
Shaun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3