Identifying ECMAScript identifiers

Ariya Hidayat ariya.hidayat at gmail.com
Fri Mar 8 17:59:50 PST 2013


> RegEx is slower. I suggest using if statements on char codes and < and > to
> check it's within the range of z-a etc ...

If you check Yusuke's links, that is exactly what Esprima is doing.
The use of regular expression is reserved only for the slow/uncommon
code path.


-- 
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
http://gplus.to/ariyahidayat


More information about the es-discuss mailing list