Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Comments inside C++ template arguments are sometimes not parsed as such #4253

Closed
1 of 2 tasks
OfekShilon opened this issue Nov 11, 2023 · 3 comments
Closed
1 of 2 tasks
Labels
bug Issue identified by VS Code Team member as probable bug grammars verified Verification succeeded

Comments

@OfekShilon
Copy link
Contributor

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

https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0-dev-20231025#XQAAAAKdAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzunzRgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKid_xhsXSuKhlGTxLUGE_paGdzKGZl7Nk25SIpp_ncCLxicsd1a8owg6BYQ3AeHyAvKoyxQF38Qeno_n3VUkZhJFr-Um4jLvm9WpAm8PLKf5d6R5PlE0fyTK74hQ2qlJn14eaQJX2i_Dyr2ych0qgPCYL1WkpZuwUpF1y6NTw2xs4p2APjti9EiwbvZ4C71gUCFTQPacKokwbZf5y_s6CnPwHMPID2euJf8jMiWHWJHsDUg4PC5QdRgcuPfEH3_0njQuJ8ZM-SE3_wtFAAA

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `#include <vector>

int main() {
              /* const */ int  i;
  std::vector</* const */ int> v;
}`;

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

Reproduction Steps

No response

Actual (Problematic) Behavior

std::vector</* const */ int> does not color the const as a comment.

With an additional space ( std::vector< /* const */ int> ) it does.

Expected Behavior

Commented code should be colored as such.

Additional Context

Coming originally from this compiler-explorer bug:
compiler-explorer/compiler-explorer#5299

@OfekShilon
Copy link
Contributor Author

ping?

@hediet hediet added this to the December / January 2024 milestone Dec 14, 2023
@hediet hediet added bug Issue identified by VS Code Team member as probable bug grammars labels Dec 14, 2023
@hediet hediet closed this as completed in d5a1a09 Dec 14, 2023
hediet added a commit that referenced this issue Dec 14, 2023
@TylerLeonhardt TylerLeonhardt added the verification-steps-needed Steps to verify are needed for verification label Jan 24, 2024
@TylerLeonhardt
Copy link
Member

@hediet can you give us some steps on how to verify?

@TylerLeonhardt
Copy link
Member

Actually I think I've figured it out. Looks verified.
image

@TylerLeonhardt TylerLeonhardt added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Jan 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug grammars verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants