hegemonic / catharsis

A JavaScript parser for Google Closure Compiler and JSDoc type expressions.
MIT License
54 stars 14 forks source link

Allow property names with special characters #21

Closed hegemonic closed 11 years ago

hegemonic commented 11 years ago

If you parse a name expression whose name contains special characters (for example, chat."#channel".open), Catharsis throws an error, even though this namepath is perfectly legal.

Need to investigate which characters are legal in property names and make sure we allow all of them.

This issue blocks jsdoc3/jsdoc#395.

hegemonic commented 11 years ago

According to Section A.3 of the ECMAScript 5 spec, a property name can be an IdentifierName, StringLiteral, or NumericLiteral. The latter two were missing from the Catharsis grammar, so I'm adding them.

I'm also leaving Keyword and FutureReservedWord in there, which may or may not be the right thing to do.