danipen / TextMateSharp

A port of tm4e to bring TextMate grammars to dotnet ecosystem
MIT License
100 stars 19 forks source link

Inconsistent behavior between TextMateSharp and vs-code #75

Open Futuremappermydud opened 3 weeks ago

Futuremappermydud commented 3 weeks ago

Describe the bug A clear and concise description of what the bug is.

The exact same syntax grammar in vscode does not produce the same output in TextMateSharp.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Use the provided grammar file with the code

namespace Test;

using UnityEngine.*;

import testVector3 -> Vector3;
import object -> Component;

function Update()
{
    /*
    let x = 5 + 5;
    let b = x;
    */
    object.text = "hi";
}

ascent.tmLanguage.json

Expected behavior A clear and concise description of what you expected to happen.

I expected the colors and scopes shown to be the same.

Screenshots If applicable, add screenshots to help explain your problem.

VSCode: image

My code: image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

This is shoved into unity and then converted into highlighting with rich text tags.

danipen commented 2 weeks ago

Please, could you check if https://github.com/danipen/TextMateSharp/pull/73 fixes the issue? Thanks!

Futuremappermydud commented 2 weeks ago

Please, could you check if #73 fixes the issue? Thanks!

Unfortunately I'm already using that version ):