silkapp / rest

Packages for defining APIs, running them, generating client code and documentation.
http://silkapp.github.io/rest
390 stars 52 forks source link

Reserved keywords in javascript #140

Closed jumi99 closed 8 years ago

jumi99 commented 8 years ago

There are reserved keywords in javascript that, depending on the parser, cannot be used as identifiers. For example "export" is a reserved keyword and the default browser in android 2.3 will refuse to parse any javascript that uses export as an identifier. It would be nice if rest-gen could rename them when generating code, or at least give an error.

bergmark commented 8 years ago

Do you have a decent list of names to replace?

hesselink commented 8 years ago

There's a list here, for example.

bergmark commented 8 years ago

The following are reserved as future keywords by older ECMAScript specifications

hesselink commented 8 years ago

Fixed in https://github.com/silkapp/rest/commit/6e9d1d92cce09810f165688303ce0b20d96be94d.