Menu

Warning for @end statement

2006-12-06
2013-05-28
  • Peter Sherwood

    Peter Sherwood - 2006-12-06

    hello,

    With the following simple piece of code:

    /*@cc_on
      @if (@_jscript_version >= 5)
        try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
          try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) {
            xmlhttp = false;
          }
        }
      @else
          xmlhttp = false;
      @end
    @*/

    I get the following warning:
    lint warning: couldn't understand control comment using /*@keyword@*/ syntax
    @*/

    The rest of the JScript it seems to have understood. How should the end comment be written?

    Peter

     
    • Matthias Miller

      Matthias Miller - 2006-12-07

      Hi Peter. In your configuration file, change "+legacy_control_comments" to "-legacy_control_comments". This will cause JavaScript Lint to completely ignore the code in the conditional comment.

      Regards,

      Matthias Miller

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.