Function call parameters are sometimes highlighted as types #10

Closed
opened 2026-01-03 19:21:55 +01:00 by shitpoet · 1 comment
shitpoet commented 2026-01-03 19:21:55 +01:00 (Migrated from github.com)

As you write the code the colors of the parameters alternate between types and names (green and black in my case) on every comma, which is a bit distracting and the logic of the highlighting is mysterious.

Example:

Code:

#include <iostream>
#include <vector>

void partition(std::vector<int> &nums, bool(*pred)(int), size_t l, size_t r) {
    if (r - l < 2) {
        return;
    }

    size_t m = (l + r) / 2;
    
    partition(nums, pred, l, m);
    partition(nums, pred, l, 
}

int main() {
    return 0;
}

As you write the code the colors of the parameters alternate between types and names (green and black in my case) on every comma, which is a bit distracting and the logic of the highlighting is mysterious. Example: <img src='https://sshots.shitpoet.cc/2026-01-03--221442--285839884.png'> Code: ```cpp #include <iostream> #include <vector> void partition(std::vector<int> &nums, bool(*pred)(int), size_t l, size_t r) { if (r - l < 2) { return; } size_t m = (l + r) / 2; partition(nums, pred, l, m); partition(nums, pred, l, } int main() { return 0; } ```
marijnh commented 2026-01-05 09:44:30 +01:00 (Migrated from github.com)

This was caused by a bug in @lezer/lr. Version 1.1.5 should behave better.

This was caused by a bug in @lezer/lr. Version 1.1.5 should behave better.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/cpp#10
No description provided.