Skip to content

[Bug]: Single quotes in integer literals break Projucer C++ source code editor syntax highlighting. #1654

@apomortsev

Description

@apomortsev

Detailed steps on how to reproduce the bug

Version: JUCE 8.0.12

Projucer C++ syntax highlighting parser algorithm breaks when encountering single quotes in integer literals (a C++14 feature), for example, when opening in Projucer:

startTimer (2'000);

it breaks highlighting for many lines down, until it recovers at another random single quote in the code.

What is the expected behaviour?

Highlighting parser should be aware of a possibility of programmers' using single quotes in integer literals such as:

int i1 = 123'456'789;
int h1 = 0x12'34'56'78;
int o1 = 01'23'45'67;
int b1 = 0b0110'1001'0101;

Operating systems

macOS

What versions of the operating systems?

MacOS Monterey 12.7.6

Architectures

x86_64

Stacktrace

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions