Skip to content

WIP: select: Fix syntax highlighting with select non-keyword #158

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

Closed
wants to merge 1 commit into from
Closed

Conversation

kc9jud
Copy link

@kc9jud kc9jud commented Feb 19, 2020

Fixes #149.

@kc9jud
Copy link
Author

kc9jud commented Feb 19, 2020

This may conflict with #157.

@pedro-ricardo pedro-ricardo self-assigned this Feb 24, 2020
@pedro-ricardo
Copy link
Collaborator

Hello there @kc9jud thank you for the time to look into this, I've found some examples in that your fix fails and the current highlight works.

program main

    select type (item => current%item)
    type is (integer)
        !...
    type is (logical)
        !...
    end select

    selecttype (item => current%item)
    typeis (integer)
        !...
    typeis (logical)
        !...
    endselect
  
end program main

This is your modification's output:

Screenshot_2020-02-24_14-04-07

This is the current highlight:

Screenshot_2020-02-24_14-03-47

The problem's core appear to be in the line continuation & not in the select rules.
If a variable is declared in the same line of a declaration statement, the highlight knows that it is a variable, but if it is in another line the problem happens.
Screenshot_2020-02-24_14-16-20 Screenshot_2020-02-24_14-16-42

I suggest you to test this in your code, move the select_named variable to the first line of the declaration and let's see if it still happens.

@pedro-ricardo pedro-ricardo mentioned this pull request Feb 24, 2020
12 tasks
@pedro-ricardo pedro-ricardo changed the title select: Fix syntax highlighting with select non-keyword WIP: select: Fix syntax highlighting with select non-keyword Feb 24, 2020
@pedro-ricardo
Copy link
Collaborator

I think I found it. 👍
Please check if the branch in PR #165 fixes your issue.
It should. If it solves your issue than please close this one.

Also, thanks for reporting and requesting the changes!

@pedro-ricardo
Copy link
Collaborator

pedro-ricardo commented Feb 27, 2020

@kc9jud, Let me know if the release branch solved your issue.
If it did, then please close this one.

@kc9jud
Copy link
Author

kc9jud commented Feb 27, 2020

This seems to have fixed my issue. Thanks!

@kc9jud kc9jud closed this Feb 27, 2020
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.

"select" in variable name confuses parser
2 participants