Microsoft/monaco-editor

[Bug] Language C highlights "class" as token

開放

#4,039 建立於 2023年6月23日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (4,064 個分叉)batch import
bughelp wantedlanguages-basic

倉庫指標

星標
 (46,002 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南