Results 1 to 2 of 2

Thread: Javascript Parser

  1. #1
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Javascript Parser

    Is there a good Javascript parser, that can point out things like syntax errors, or a misspelled variable name? I know Javascript is not compiled, but this type of thing would be handy.

    Thanks

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by waynefrank
    Is there a good Javascript parser, that can point out things like syntax errors, or a misspelled variable name?
    JSLint is a tool that will parse scripts and point out syntax errors. It will also highlight code that could cause problems. I personally find that last feature annoying because I sometimes use 'questionable' constructs on purpose, but I appreciate why the warnings are given.

    It's not really possible to point out misspelt identifiers due to the nature of ECMAScript itself. There are very few truly standardised member names and, more importantly, new names can be introduced at any time. JSLint does, however, list identifiers and how often they are used which helps with discovering typos.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •