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

gh-113317: Argument Clinic: Add libclinic.clanguage #117455

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 2, 2024

Add libclinic.lang_c module and move the following classes and functions there:

  • CLanguage
  • declare_parser()

Add libclinic.codegen and move the following classes there:

  • BlockPrinter
  • BufferSeries
  • Destination

Move these functions to libclinic.function:

  • permute_left_option_groups()
  • permute_optional_groups()
  • permute_right_option_groups()

@vstinner vstinner force-pushed the ac_clang branch 2 times, most recently from 21917ec to 04d91d6 Compare April 2, 2024 12:33
@vstinner
Copy link
Member Author

vstinner commented Apr 2, 2024

@erlend-aasland: I updated the PR to address your review. Please review the updated PR.

I used git rebase to rewrite the commit message and rename files.

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think libclinic.codegen makes sense. Also, it makes sense to put the option group stuff together with the parameter stuff (currently in function.py).

I realise that we already got a libclinic.language.py file with the PythonLanguage and Language classes. I'm fine with using clanguage.py instead of lang_c.py, as was your original suggestion. Up to you.

Add libclinic.clanguage module and move the following classes and
functions there:

* CLanguage
* declare_parser()

Add libclinic.codegen and move the following classes there:

* BlockPrinter
* BufferSeries
* Destination

Move the following functions to libclinic.function:

* permute_left_option_groups()
* permute_optional_groups()
* permute_right_option_groups()
@vstinner
Copy link
Member Author

vstinner commented Apr 3, 2024

I realise that we already got a libclinic.language.py file with the PythonLanguage and Language classes. I'm fine with using clanguage.py instead of lang_c.py, as was your original suggestion. Up to you.

I renamed the file to clanguage.py.

@vstinner vstinner enabled auto-merge (squash) April 3, 2024 17:47
@vstinner vstinner merged commit c43f6a4 into python:main Apr 3, 2024
38 checks passed
@vstinner vstinner deleted the ac_clang branch April 3, 2024 18:17
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
)

Add libclinic.clanguage module and move the following classes and
functions there:

* CLanguage
* declare_parser()

Add libclinic.codegen and move the following classes there:

* BlockPrinter
* BufferSeries
* Destination

Move the following functions to libclinic.function:

* permute_left_option_groups()
* permute_optional_groups()
* permute_right_option_groups()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants