Skip to content

[Bug] Language C highlights "class" as token #4039

Open

Description

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

Monaco Editor Playground Link

Monaco Editor Playground Code

const value = `typedef struct {
	xchar class;
} foo;`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "cpp",
});

Reproduction Steps

  1. Go to https://microsoft.github.io/monaco-editor/
  2. Select Language c
  3. Write
typedef struct {
    int class;
}

Actual (Problematic) Behavior

See that class is highlighted as keyword

Expected Behavior

class is no keyword in C, it should be highlighted like any other variable

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitieslanguages-basic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions