Reputation:
I'm writing a Javascript syntax highlighter and I am not 100% I have everything.
So far I have:
I also have keyword highlighting:
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.
Upvotes: 2
Views: 702
Reputation: 44346
See this for a list of present and possible future reserved words: http://javascript.about.com/library/blreserved.htm .
Also note that you can highlight operators as well. Some editors do that. Semicolons and parentheses may or may not be highlighted. It all depends on how you want you highlighting to look.
Upvotes: 2
Reputation: 33232
https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words
Upvotes: 2
Reputation: 827316
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:
Upvotes: 5