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

[FEATURE] Support switching CN comment syntaxes #135

Open
samcowger opened this issue Dec 2, 2024 · 0 comments
Open

[FEATURE] Support switching CN comment syntaxes #135

samcowger opened this issue Dec 2, 2024 · 0 comments
Assignees

Comments

@samcowger
Copy link
Contributor

CN delimits its specifications with a "magic comment" syntax, by default /*@ ... @*/. The VSCode plugin currently assumes that all CN specifications are written using this syntax. Because this syntax clashes with Frama-C's contract syntax, however, CN implemented an optional alternative syntax, /*$ ... $*/ (see rems-project/cerberus#263). The VSCode plugin should allow users to choose which syntax to use.

Note that choosing one comment syntax should make the plugin ignore comments written with the other syntax. The motivation here is to allow running CN and Frama-C plugins concurrently on a file containing both CN and Frama-C annotations. Users in this situation (assuming they've selected the $ syntax for CN) ought to see Frama-C-related workflows appear only for @-delimited blocks and CN-related integrations appear only for $-delimited blocks.

A basic implementation of this feature would set a user's choice of comment syntax globally. In the future, we may want an implementation to set this choice locally, to better support users who may have some projects where CN annotations are written with @, and others where they're written with $. The precise definition of locally is up for debate. Should it be per-file, per-directory, per-repository? Can the plugin try to automatically recognize which syntax is used?

cc @septract

@samcowger samcowger self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant