appliedengdesign / vscode-gcode-syntax

G Code Language Extension for Visual Studio Code. Turn VSCode into a fully capable G-Code editor, including language support & more.
MIT License
86 stars 25 forks source link

Highlighting not working properly #40

Closed GotAnAccount closed 2 years ago

GotAnAccount commented 2 years ago

Describe the bug Highlighting is applied on letters only in whole words for a LinuxCNC g-code file.

For example: o sub Both letters "t" are highlited blue and should not.

To Reproduce Steps to reproduce the behavior:

  1. Simply open a g-code file and view.

Expected behavior No highting should normally happen for these words.

Screenshots Capture

Environment / Version: Version : 1.68.1 Validation : 30d9c6cd9483b2cc586687151bcbcd635f373630 Date : 2022-06-14T12:48:58.283Z Electron : 17.4.7 Chromium: 98.0.4758.141 Node.js : 16.13.0 V8 : 9.8.177.13-electron.0 Système d’exploitation : Windows_NT x64 10.0.19044

Additional context g-code file from this site: https://www.projectsbybrian.tech/s/PrintNC.zip open file from "macros" folder.

mikecentola commented 2 years ago

I'll look into this ASAP. Thanks!

mikecentola commented 2 years ago

Fixed in v0.7.2

GotAnAccount commented 2 years ago

Hi,

Thank you for the changes. I updated it (v0.7.2) and I can still see some use cases where the problem still seems to exist.

Here is the screenshot for the "while" and "endsub" cases: image

Here is the screenshot for the "if" and "gt 0" and another "endsub": image

mikecentola commented 2 years ago

Okay I'll push changes for the t/f/b regex tonight or tomorrow. Sorry for the delay. I was on vacation :)

mikecentola commented 2 years ago

@GotAnAccount Just pushed v0.7.3 with a bunch of fixes that should make editing the LinuxCNC ngc templates much nicer and more colorful :)

Let me know if it's working and we can close this issue out!

GotAnAccount commented 2 years ago

Perfect. I'll check it out later today. Thx

GotAnAccount commented 2 years ago

OK, confirmed the changes did fix the issue.

Thanks Mike for your excellent work!

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.