Microsoft/monaco-editor
View on GitHub[Bug] Language C highlights "class" as token
Open
#4,039 opened on Jun 23, 2023
bughelp wantedlanguages-basic
Repository metrics
- Stars
- (14,836 stars)
- PR merge metrics
- (Avg merge 17h 9m) (14 merged PRs in 30d)
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?
- Reproducible in the monaco editor playground
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
- Go to https://microsoft.github.io/monaco-editor/
- Select Language
c - 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