Loading ...
Sorry, an error occurred while loading the content.

2004Re: /*jslint is seen as a reserved word

Expand Messages
  • Douglas Crockford
    Mar 4, 2011
      --- In jslint_com@yahoogroups.com, "Woomla" <woomla@...> wrote:
      > This code gives a message: Problem at line 5 character 9: Expected an identifier and instead saw '/*jslint' (a reserved word). That's correct and it's my intention to allow bitwise operator &.
      >
      >
      > (function () {
      > "use strict";
      >
      > String.implement({
      > /*jslint bitwise: false*/
      > getByteAt: function (index) {
      > return this.charCodeAt(index) & 0xFF;
      > }
      > });
      > }());
      >
      > If I move the /*jslint before String.implement, it is ok. But I guess it should be fine on the line in this example as well, shouldn't it?


      No it shouldn't. JSLint allows those directives at statement position only.
    • Show all 8 messages in this topic