I’m writing a Javascript syntax highlighter and I am not 100% I have everything.
So far I have:
- Comments (// and /* */)
- Regex
- Number Highlighting
- Quotes (” and ‘)
I also have keyword highlighting:
- if
- else
- new
- var
- function
- for
- return
- this
- do
- while
- true
- false
Am I missing any constructs or keywords that would be essential to highlight? Better yet, if you have some list of all keywords and constructs that would be even better.
You are missing a few, e.g.:
in,switch,break,try,catch,finally,throw,void,with, etc..You can find a comprehensive list in the Specification: