Skip to content

Minor hotfixes #53

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
Apr 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions syntaxes/fortran_free-form.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3631,7 +3631,7 @@
"begin": "(?i)\\s*\\b([a-z]\\w*)\\b",
"beginCaptures": {
"1": {
"name": "entity.name.module.fortran"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change of name. What is being captured here is the name of the module, not of a class.

Copy link
Collaborator Author

@pedro-ricardo pedro-ricardo Apr 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because inside "use-statement": rule, on line 4427 it is written "name": "entity.name.class.fortran" this means that use will highlight the following name as class. And as issue #51 requested, module should highlight the following name that same way as use does.
But It could be done the other way around. To just correct the "use-statement": rule to highlight the following name as module instead of class.
I chose the previous because entity.name.module.fortran has the same color as non-highlighted text.

"name": "entity.name.class.module.fortran"
}
},
"end": "(?ix)\\b(?:(end\\s*module)(?:\\s+(\\1))?|(end))\\b \\s*([^;!\\n]+)?(?=[;!\\n])",
Expand All @@ -3640,7 +3640,7 @@
"name": "keyword.other.endmodule.fortran"
},
"2": {
"name": "entity.name.module.fortran"
"name": "entity.name.class.module.fortran"
},
"3": {
"name": "keyword.other.endmodule.fortran"
Expand Down Expand Up @@ -4424,7 +4424,7 @@
"begin": "(?i)\\s*\\b([a-z]\\w*)\\b",
"beginCaptures": {
"1": {
"name": "entity.name.class.fortran"
"name": "entity.name.class.module.fortran"
}
},
"end": "(?=[;!\\n])",
Expand Down