Skip to content

Instantly share code, notes, and snippets.

@kangax
Created October 5, 2010 22:20
Show Gist options
  • Select an option

  • Save kangax/612451 to your computer and use it in GitHub Desktop.

Select an option

Save kangax/612451 to your computer and use it in GitHub Desktop.
({ if: bar }); // <-- "if" should not be highlighted as reserved word here
({ foo: function foo(){} }); // <-- "foo" before ":" should be highlighted as in `({ foo: function(){} })`
JSON; // <-- should be highlighted, just like other built-ins — `Object`, `Function`, `String`, etc.
console.debug, console.profile; // <-- should be highlighted just like `console.log`, `console.info`, etc.
!/^foo$/.test(t); // <-- should highlight regexp literal, just like it does w/o preceding `!`
({ get foo(){ }, set foo(){ } }); // <-- should understand new ES5 accessors syntax (highlight `get` same way as function identifier)
[].map(); // <-- should highlight `map` just like it highlights `slice` in the same context
Date.now(); // <-- should highlight `now` just like it highlights `parse` in the same context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment