Skip to content

[BUG] Syntax Highlighting Incorrect When Using Backslash ('\') to Delineate String Literals #167

@RDGInfoSys

Description

@RDGInfoSys

Describe the bug
A number of mvBASIC flavors support the use of backslashes ('') to delineate string literals for example:
A.STRING = \It's easy to use single (') and double (") quotes when using backslashes to define strings\

Unfortunately, the MV Basic Extension doesn't track the string inside the backslashes and unmatched single and double quotes continue to disrupt syntax highlighting throughout the rest of the code.

To Reproduce
Steps to reproduce the behavior:

  1. Use backslashes to delineate a string literal
  2. See error

Expected behavior
Syntax highlighting when backslashes to define string literals should behave the same way as it currently does if single or double quotes are nested inside string literals.

Screenshots
Screen Shot 2022-03-10 at 5 33 17 PM

Versions of applicable software
Detail on the versions of any and all pieces of software that are part of your environment, such as:

  • Host OS : Windows 10 Enterprise
  • Remote OS: n/a
  • Extension: MV Basic 2.1.3
  • IDE: VS Code 1.65.0

Code samples and/or reproducible test cases
STRING1 = \Here is a string with a single quote: '\
STRING2 = \Here is a string with a double quote: "\
IF STRING1 = STRING2 THEN
CRT "I shouldn't see this"
ELSE
CRT 'I should see "this".'
END

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions