ctags icon indicating copy to clipboard operation
ctags copied to clipboard

html: parse javascript broken by php

Open jafl opened this issue 3 years ago • 7 comments
trafficstars

The html parser needs to be able to use php as a guest parser.

jafl avatar Sep 27 '22 02:09 jafl

Codecov Report

Base: 82.80% // Head: 82.81% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (b0ac451) compared to base (5dc6ad1). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3490      +/-   ##
==========================================
+ Coverage   82.80%   82.81%   +0.01%     
==========================================
  Files         222      222              
  Lines       53757    53801      +44     
==========================================
+ Hits        44511    44555      +44     
  Misses       9246     9246              
Impacted Files Coverage Δ
main/promise.c 100.00% <100.00%> (ø)
parsers/html.c 99.33% <100.00%> (+0.07%) :arrow_up:
parsers/php.c 98.02% <100.00%> (+0.01%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 27 '22 03:09 codecov[bot]

(I'm working on #3491).

masatake avatar Sep 27 '22 20:09 masatake

Could you rebase this pull request on the latest master?

masatake avatar Sep 27 '22 22:09 masatake

Instead of introducing the new test case, how about extending parser-php.r/run-guest.d/ ?

masatake avatar Sep 27 '22 22:09 masatake

@masatake The difference between this and your previous commit is that there is <?php ... ?> in the middle of the JavaScript block. Without my change, the functions in the JavaScript block are not tagged.

jafl avatar Sep 27 '22 23:09 jafl

Looks good for me. Thank you.

masatake avatar Sep 28 '22 08:09 masatake

Do you like this crazy mechanism for stacking parsers?

More crazy items can be found in https://github.com/universal-ctags/ctags/issues/1577 . When the JavaScript parser supports destructing binding, I will work on supporting VUE again.

masatake avatar Sep 28 '22 09:09 masatake

@jafl don't you merge this?

masatake avatar Oct 16 '22 08:10 masatake

@masatake I thought you were working on a different solution to this issue?

jafl avatar Oct 16 '22 20:10 jafl

@masatake I thought you were working on a different solution to this issue?

Sorry for making you be confused. I will work on the extra solution after you merge this pull request. So I would like you to merge this pull request if you are o.k.

masatake avatar Oct 16 '22 23:10 masatake

Thank you!

masatake avatar Oct 17 '22 17:10 masatake