-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using whole ctags_target_for_gcc_minus_e for prototype generation #131
Conversation
if (saveLine || startsWithHashtag(line)) { | ||
minimizedString += line + "\n" | ||
} | ||
if (containsAny(line, tofind)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no isLineDirective()
check here? Sounds like it could somehow trigger unintended matches when the sketch location somehow occurs in the included code somewhere?
I finally got around to reviewing this. I think the idea is great and it should indeed solve all kinds of ctags problems, but I have some doubts about the current implementation (as indicated in the previous comments). |
Hi Matthjis, |
e1ed222
to
db89809
Compare
Ctags is FULL of bugs on c++ parsing (and c++ syntax is a nightmare), sketches are usually way more simple (and easier to debug). Using a simplified version of the ctags_target_for_gcc_minus_e file which only contains preprocessor directives and the sketch lines helps avoiding most ctags subtle bugs. Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
2d7a5be
to
8d2eec4
Compare
…duplicates Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
TestCTagsRunner* use the #line directive generated file as source instead than # $linenumber. Searching fot the '#' as first char make tests passing Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
8d2eec4
to
95d67a3
Compare
Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
I separated the fix and testcase into #154 (I merged them into a single commit) and added a bit more verbose commit message. |
I've improved (pretty much redid) the main subject of this PR in #156, so I'm closing this one in favor of that one. |
Ctags is FULL of bugs on c++ parsing (and c++ syntax is a nightmare), sketches are usually way more simple (and easier to debug).
Using a simplified version of the ctags_target_for_gcc_minus_e file which only contains preprocessor directives and the sketch lines helps avoiding most ctags subtle bugs.