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

Use Flags object on file format flags #13598

Open
nijel opened this issue Jan 20, 2025 · 0 comments
Open

Use Flags object on file format flags #13598

nijel opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
enhancement Adding or requesting a new feature.

Comments

@nijel
Copy link
Member

nijel commented Jan 20, 2025

Describe the problem

The current flags interface in file formats (TranslationUnit) returns strings. The only reason for this is that this API predates the introduction of the Flags object. This makes inheritance unnecessary complex and brings in repeated Flags parsing and serializing.

Describe the solution you would like

  • Change TranslationUnit.flags to return Flags objects.
  • Change the overriden methods to extend super() return value to ease implementation of features like Automatic flags based on string location #13597.
  • Add explicit flags serialization to string in Unit.update_source_unit.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

No response

@nijel nijel added the enhancement Adding or requesting a new feature. label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants