Menu

#373 Does not support JavaScript ES6+

open
nobody
None
5
2016-07-09
2016-07-07
No

gets confused by declarations made with const or let instead of var. instead maps the key const instead of the actual variable name

Discussion

  • Masatake YAMATO

    Masatake YAMATO - 2016-07-08

    I don't understand what you mean.
    Following output is not enough for you?

    [ctags-github]$ cat /tmp/foo.js 
    let x = 1
    var y = 2
    const z = 3
    [ctags-github]$ ./ctags --fields=+K -o - /tmp/foo.js 
    x   /tmp/foo.js /^let x = 1$/;" variable
    y   /tmp/foo.js /^var y = 2$/;" variable
    z   /tmp/foo.js /^const z = 3$/;"   constant
    
     
  • Everett Ross

    Everett Ross - 2016-07-08

    Hi thank you for getting back to me. Unfortunately this is not the behavior I am experiencing.
    I am not at my computer today, but here is the gist of it:
    cat /tmp/foo.js
    const myFn = function(param1, param2) {
    console.log(arguments);
    }
    cat ./tags
    const /tmp/foo.js const myFn = function....
    Thanks

     
  • Masatake YAMATO

    Masatake YAMATO - 2016-07-09

    Universal-ctags(http://ctags.io), a project forked from exuberant-ctags captures myFn as a function

    [yamato@x201]~/var/ctags-github% cat /tmp/foo.js 
    cat /tmp/foo.js 
    const myFn = function(param1, param2) {
    console.log(arguments);
    }
    [yamato@x201]~/var/ctags-github% ./ctags -o - /tmp/foo.js 
    ./ctags -o - /tmp/foo.js 
    myFn    /tmp/foo.js /^const myFn = function(param1, param2) {$/;"   f
    
     

Log in to post a comment.