Skip to main content
Question

MV BASIC Extension still does not support "\" as a string quote

  • June 3, 2026
  • 3 replies
  • 32 views

Gregor Scott
Forum|alt.badge.img+4

We use UniVerse which allows strings to be quoted with backslashes.

I just realised that the backslash quoted strings in MV BASIC are not recognised as strings, and then found it has been a bug since 2022

[BUG] Syntax Highlighting Incorrect When Using Backslash ('\') to Delineate String Literals · Issue #167 · mvextensions/mvbasic

Not having correct string detection causes flow-on false-positive errors to be presented which make using MV BASIC less valuable as you have to sort through those reports just in case it is hiding a real problem.

I used Bing’s search to understand what is needed to sort this out.

Bing’s AI indicates this is the snippet needed

{

  "name": "string.quoted.backslash.mvbasic",

  "begin": "\\\\",

  "end": "\\\\"

}

and that it should live in the syntaxes/mvbasic.tmLanguage.json file within the rocketsoftware.mvbasic extension folder.

I have not tried this, but if it is as simple as that could it be corrected in the next MV BASIC extension release?

3 replies

Dave Weinstein
Forum|alt.badge.img

Hi Gregor,

This seems to work for me in Rocket MV BASIC extension version 2.10.0.

What version are you on?

The linked github page is to an extension that is not Rocket MV BASIC. The maintainers may or may not see this post.

Regards,

Dave Weinstein


Doug Averch
Forum|alt.badge.img+1
  • Participating Frequently
  • June 3, 2026

I am running Universe 14.2.1 with a different editor. Is this what you are looking for:

 


Gregor Scott
Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • June 5, 2026

The wrong link is my bad - I should have checked that more closely.

 

I think I have a different issue causing the string matching to fail

 

This is where the backslash-quoted string is working correctly

 

This is where the string detection falls apart

 

I think the compiler directives $IFDEF and $ENDIF are causing issues with the syntax detection for backslash-quoted strings. The double-quoted strings are detected ok, though.