Skip to content

Highlighting of variables and functions with fortran keywords as name #401

Open
@plevold

Description

@plevold

Functions or variables named the same as a fortran keyword is highlighted differently than other functions or arrays in some situations. I appreciate that this might be a quite challenging task, but it would be really nice if the syntax highlighting could identify if the token is actually a reserved keyword or if it's a variable or function with the same name.

Screenshots
image

Code sample

program main
    integer :: module
    integer :: if

    if = format()
    if (if == 1) then
        if (format() == 1) then
            module = 3
        end if
    end if

contains

    integer function format()
        format = 1
    end function
end program

To Reproduce
Paste code above

Fortran Form
Free form, but strictly speaking also fixed form

Build info (please complete the following information):

  • OS: Windows 10
  • Extension Version 2.6.2
  • Visual Studio Code Version 1.65.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions