Git Product home page Git Product logo

Comments (7)

gorillamoe avatar gorillamoe commented on June 8, 2024

I can't reproduce it. This looks 100% correct, doesn't it?

screenshot from 2016-08-15 20-57-20

from coffeetags.

masatake avatar masatake commented on June 8, 2024

I'm not sure whther it is correct or not because I don't know vim.
What i know well is command output.

As far as reading your screenshot, move is listed only once at Animal. Is it o.k. for you?
I expect move are enumerated at Animal, Snake, and Horse.

from coffeetags.

masatake avatar masatake commented on June 8, 2024

This new behavior was introduced in 8211acf

Author: hikerpig <[email protected]>
Date:   Tue Apr 7 10:35:42 2015 +0800

    when found a token, walk through the tree find identical one

I tried a small patch:

iff --git a/lib/CoffeeTags/parser.rb b/lib/CoffeeTags/parser.rb
index 127682a..3019700 100644
--- a/lib/CoffeeTags/parser.rb
+++ b/lib/CoffeeTags/parser.rb
@@ -191,6 +191,7 @@ module Coffeetags
           # should find token through the tree first
           token_name = token[1]
           existing_token = @tree.find {|o| o[:name] == token_name}
+          existing_token = nil
           if existing_token
             o = existing_token
           else

With this patch I got:

!_TAG_FILE_FORMAT   2   /extended format/
!_TAG_FILE_SORTED   0   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Łukasz Korecki /[email protected]/
!_TAG_PROGRAM_NAME  CoffeeTags  //
!_TAG_PROGRAM_URL   https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
!_TAG_PROGRAM_VERSION   0.6.0   //
Animal  input.coffee    /^class Animal$/;"  c   line:3  language:coffee
Horse   input.coffee    /^class Horse extends Animal$/;"    c   line:14 language:coffee
Snake   input.coffee    /^class Snake extends Animal$/;"    c   line:9  language:coffee
constructor input.coffee    /^  constructor: (@name) ->$/;" p   line:4  language:coffee object:Animal
move    input.coffee    /^  move: (meters) ->$/;"   p   line:6  language:coffee object:Animal
move    input.coffee    /^  move: ->$/;"    p   line:10 language:coffee object:Snake
move    input.coffee    /^  move: ->$/;"    p   line:15 language:coffee object:Horse

This is what I want.

from coffeetags.

masatake avatar masatake commented on June 8, 2024

It seems that only tagging the initial move is natural for CoffeeScript users.

from coffeetags.

lukaszkorecki avatar lukaszkorecki commented on June 8, 2024

@masatake would a config option work for your case? I can see both ways of generating tags make sense (at the cost of generating bigger tags file)

from coffeetags.

masatake avatar masatake commented on June 8, 2024

Hmm.... I'm not user of neither coffeescript nor coffeetags. I'm running coffeetags as a backend of Universal-ctags; a test case in Universal-ctags detects the issue I reported here. So I don't have string option about the option.

As far as reading the comment from the real user (@alohadings), the behaviour of the current version is good enough.

from coffeetags.

lukaszkorecki avatar lukaszkorecki commented on June 8, 2024

@masatake cool, let's leave this closed then

from coffeetags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.