Skip to content
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

Syntax highlighting trouble with Linq #1106

Closed
aadnehovda opened this issue Jan 5, 2017 · 1 comment
Closed

Syntax highlighting trouble with Linq #1106

aadnehovda opened this issue Jan 5, 2017 · 1 comment

Comments

@aadnehovda
Copy link

aadnehovda commented Jan 5, 2017

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-1-003177)

Product Information:
 Version:            1.0.0-preview2-1-003177
 Commit SHA-1 hash:  a2df9c2576

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64

VS Code version: 1.8.1

C# Extension version: 1.6.2

Steps to reproduce

This is the code I'm writing (using Sprache parser combinator):

private static readonly Parser<Node> NodeParser =
    from name in NodeName.Token()
    from type in NodeValueType.Token()
    from eq in Parse.Char('=')
    from value in QuotedString.Token()
    from lcurl in Parse.Char('{').Token()
    from children in Parse.Ref(() => ChildrenNodesParser)
    from rcurl in Parse.Char('}').Token()
    select new Node
        {
            Name = name,
            Type = type,
            Value = value,
            Children = children
        };

Expected behavior

Correct syntax highlighting in Linq queries.

Actual behavior

The syntax highlighting breaks at from eq in Parse.Char('=').

See picture:
image

@DustinCampbell
Copy link
Member

This will look much better in the next release:

image

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

No branches or pull requests

2 participants