Skip to content

Fix select highlight after & operator #165

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

Merged
merged 2 commits into from
Feb 27, 2020
Merged

Conversation

pedro-ricardo
Copy link
Collaborator

The error reported in #149 was in the line-continuation-operator pattern that was missing from both name-list and attribute-list scopes used in declaration statements.

Before this change:

Screenshot_2020-02-24_20-42-50

After this change:

Screenshot_2020-02-24_20-43-29

@kc9jud
Copy link

kc9jud commented Feb 25, 2020

This does not completely fix #149. Here's a snippet which will cause this to fail:

      namelist /inputlist/
     $     Nprotons, Nneutrons, Nshell, fmass, hbomeg,
     $     Nmin, deltaN, Nmax, WTmax, TwoMj, parity, Hrank, NormOrd,
     $     TBMEfile, Trelfile, Hrelfile, Vnnfile,
     $     strTrel, lamHcm, strVnn,
     $     neivals, maxits, startit, selectpiv, tol,
     $     numTBops, obdme, IFLAG_mode, blksize,
     $     uniqueID, orbitalfile, partitioningfile,
     $     DistrDiagTiles, reduce_solver_threads,
     $     checkpoint, write_matrix, observables_only,
     $     initvec_index, initvec_smwffilename
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!     Reading input file
      inquire(file='mfdn.input', exist=input)
      if (input) then
         open(unit=inputunit, file='mfdn.input',
     $        status='old', action='read')
         read(inputunit, nml=inputlist)
         close(unit=inputunit, status='keep')
      else
         print*, 'No inputfile...'
         ! call cancelall(000)
         stop
      endif

Note, this is fixed-format Fortran, not free-format.

@pedro-ricardo
Copy link
Collaborator Author

@kc9jud, Thanks for the feedback ... I think that's because you have a different line-continuation-operator . I was not especting that $ there.

@pedro-ricardo
Copy link
Collaborator Author

Meh ... More stuff wrong, besides that $ over there that is confusing me, the namelist is just a keyword highlighted it does not behave like a declaration statement

@pedro-ricardo
Copy link
Collaborator Author

@kc9jud, I'm not able to transform the namelist in a declaration that will recognize and highlight the \groups\ and variables. It should not be difficult tho, I just don't understand the scopes enough to make it.
Therefore I separated the select-construct scope into 3 different ones, restricting them a little bit more (similar to what you did before).
This will solve the select in variables but will not do anything about that $ or the namelist scope.
Could you check it now?

@krvajal
Copy link
Collaborator

krvajal commented Feb 27, 2020

Is this good enough to be merged @pedro-ricardo? Even it it not cover all the cases it is already an improvement. Or I am missing something?

@pedro-ricardo
Copy link
Collaborator Author

Yep, That's basicaly it 👍

@krvajal krvajal self-requested a review February 27, 2020 11:32
@krvajal krvajal merged commit 1fcefd5 into release/2.1.2 Feb 27, 2020
@pedro-ricardo pedro-ricardo deleted the hotfix/highlight branch February 27, 2020 11:38
@pedro-ricardo pedro-ricardo mentioned this pull request Feb 27, 2020
13 tasks
pedro-ricardo added a commit that referenced this pull request May 15, 2020
### Check List
- Highlight
- [x] `select` keyword - *Merge #165 to fix #149*
- [x] `rank` keyword -  *Merge #165*
- [x] `forall` keyword - *Merge #170 to fix #169*
- Symbol List
- [x] Symbols bug in VSCode +1.40 - *Merge #161 to fix #154*
- [x] Symbols classification - *Merge #141 to fix #140*
- [x] Long named symbols - *Merge #151*
- Settings
- [x] Add more options - *Merge #152*
- Dependencies
- [x] Merge `dependabot` PR's
    - [x] lodash - *Merge #144*
    - [x] mixin-deep - *Merge #146*
    - [x] handlebars - *Merge #155* 
- Code Completion
- [x] Array constructor - *Fix #148*
- New Features
- [x] Breakpoints - *Merge #150*
krvajal pushed a commit that referenced this pull request Dec 11, 2020
… (#203)

while also providing a more elegant solution to commit
a4eaca4
for PR #165.
gnikit added a commit to gnikit/vscode-fortran-support that referenced this pull request Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants