Skip to content

Syntax highlighting fails when using for...to inside a computation expression #2680

Closed

Description

@dhwed

If you use a for...to expression inside of a computation expression, the syntax highlighting is wrong:

image

I'm using VS 2017 RTM with the VisualFSharpOpenSource.vsix compiled from master.

Here's the code from the screenshot:

module SyntaxHighlightingBug =
    let list1 = [ for x in [0;1] do yield x ]
    let list2 = [ for x = 0 to 1 do yield x ]
    let list3 = [ for x = 0 to 1 do yield x.ToString() ]
    let list4 =
        [ for x = 0 to 1 do // comment
            let x = x // comment
            yield x // comment
        ]
    let list5 =
        [ for x = 0 to 1 do // comment
            let x = x.ToString() // comment
            yield x // comment
        ]

Activity

  1. vasily-kirichenko commented on Mar 22, 2017

    @vasily-kirichenko
    Contributor

    I can reproduce it on master

    image

    @dsyme I'm really puzzled with this. Any tips what could go wrong?

  2. cloudRoutine commented on Mar 22, 2017

    @cloudRoutine
    Contributor

    @vasily-kirichenko
    https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ExtensibilityTools


    adds this toolbar on the bottom

    it lets you see the classifiers so that leads me to believe it's the semantic colorization function that's acting up

  3. vasily-kirichenko commented on Mar 22, 2017

    @vasily-kirichenko
    Contributor

    Fixed in #2681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions