-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Feature/hover-functions #49
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closes Type prefixed functions display wrong signature upon hover #22
Functions now all display the same signature: `type` `keywords` `function` `name(args)` `result(val)` - Submodule module procedure functions now display like so - functions without an explicit type or result now display like so - Nested functions i.e. using functions as args displays like so Closes Add support for Fortran scope/block snippets #47 Adds a series of hover unittests. Also renamed the result variables
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
==========================================
+ Coverage 81.01% 81.34% +0.33%
==========================================
Files 9 9
Lines 4288 4305 +17
==========================================
+ Hits 3474 3502 +28
+ Misses 814 803 -11
Continue to review full report at Codecov.
|
This was
linked to
issues
Feb 21, 2022
It required major rewrite of the function definition parsing Closes Functions with multiple keywords display incorrect hover #48 TODO: 1. Add tests about intrinsic functions 2. Add tests about functions returning arrays (this is actually a big deal) 2. touches on if hover should be displaying FORTRAN abiding code. I am leaning towards yes, so displaying ```fortran real dimension(10,10) function foo(arg) result(val) real, intent(in) :: arg ``` Does not seem the right thing for me to do. I think the hover request should return instead ```fortran real function foo(arg) result(val) real, intent(in) :: arg real, dimension(10,10) :: val ``` This way syntax highlighting in VSCode will not complain
Edit regex and replace to consider word boundaries
- Makes hover more robust - Adds extensive unittests for hover support of functions - Improves documentation of function hover
functions that do not use the word `result` but do define a variable that is the same as the function name previously failed to get refs A unittest has been added for this case
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a series of hovering bugs for functions.