Javascript lexer modification

From: Brian Schott <briancsch....at.gmail.com>
Date: Thu, 16 Feb 2012 12:57:32 -0800

After being hit by the "trailing comma of death"[1] too many times on
a project at work, I've modified the javascript lexer to make my life
a bit better.

Add this somewhere in the lexer file:
local trailing_comma_of_death = token(l.ERROR, ',' * ws^0 * '}')

and this in the M._rules table:
{ 'error', trailing_comma_of_death},

[1] http://www.enterprisedojo.com/2010/12/19/beware-the-trailing-comma-of-death/
Received on Thu 16 Feb 2012 - 15:57:32 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:29:45 EST