Skip to content
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

Fix handling of locals #1294

Merged
merged 2 commits into from Apr 14, 2024
Merged

Fix handling of locals #1294

merged 2 commits into from Apr 14, 2024

Conversation

b4n
Copy link
Member

@b4n b4n commented Nov 21, 2023

This is a two-parts fix required for usage with 2.0:

8cad88d: Fix a crash when encountering an unknown tag type (e.g. locals)
3af0bf5: Add support for locals, and do something useful with them by default.

Without the first one, triggering documentation generation when a local is the "current" symbol crashes the plugin (and thus Geany).
Without the second one in addition, it's annoying because locals "catch" the generation request, although in most cases they should be skipped.

Both of these are particularly important with 2.0 because we now generate locals for purpose of improved scope completion, and thus we have a lot of them for parsers supporting it (e.g. the C and C++ one, which is the main default target of the plugin).

Since Geany 2.0 a lot of those are reported for several languages,
including C.  Those should usually not be documented, but their parent
should be instead, otherwise they "get in the way" of triggering
documentation of their parent.

Add support for the "local" match rule for local variables, and update
the default rules to use the FORWARD policy for them.  It's not
actually the parent documenting the child, but the effect is the same
as the user probably wanted to document the parent rather than the
local.
@elextr
Copy link
Member

elextr commented Nov 22, 2023

LGBI.

@b4n
Copy link
Member Author

b4n commented Nov 25, 2023

@frlan note that this might warrant a point release, because basically using this plugin with 2.0 will crash geany (it might not, but it's effectively more likely to crash than not in real use)

Sorry I didn't catch that in time 😕

@frlan frlan merged commit 95d4f6f into geany:master Apr 14, 2024
2 checks passed
@b4n
Copy link
Member Author

b4n commented Apr 21, 2024

@frlan do you plan on making a point-release, given the above-mentioned reasons?

@frlan
Copy link
Member

frlan commented Apr 21, 2024

I did not yet plan any – maybe a point-release of Geany would be useful, too – but we should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants