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

Add lexer for Soong (Android.bp) config files #2659

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

JonathonReinhart
Copy link
Contributor

@JonathonReinhart JonathonReinhart commented Mar 7, 2024

This adds a lexer for Android.bp files which are used by the Soong Android build system.

https://source.android.com/docs/setup/build

Here is an example of a full Android.bp file: platform/frameworks/base/Android.bp.

@JonathonReinhart
Copy link
Contributor Author

Hi @Anteru @jeanas, friendly ping! Is there anything I can do to advance this?

@Anteru
Copy link
Collaborator

Anteru commented Mar 24, 2024

Just came back from travel, looking into this now.

@Anteru Anteru added the A-lexing area: changes to individual lexers label Mar 24, 2024
@Anteru Anteru added this to the 2.18.0 milestone Mar 24, 2024
@JonathonReinhart
Copy link
Contributor Author

Thanks @Anteru. I fixed up the check and regexlint errors.

pygments/lexers/soong.py Outdated Show resolved Hide resolved
pygments/lexers/soong.py Outdated Show resolved Hide resolved
pygments/lexers/soong.py Outdated Show resolved Hide resolved
@JonathonReinhart
Copy link
Contributor Author

Thanks for the review, @Anteru! Your comment about whitespace helped me realize there was a deficiency in my previous version (multi-line lists weren't handled correctly). I've corrected this and added a test.

Please take another look!

pygments/lexers/soong.py Outdated Show resolved Hide resolved
pygments/lexers/soong.py Outdated Show resolved Hide resolved
pygments/lexers/soong.py Show resolved Hide resolved
pygments/lexers/soong.py Show resolved Hide resolved
@JonathonReinhart
Copy link
Contributor Author

Thanks @jeanas. All comments have been resolved.

Copy link
Contributor

@jeanas jeanas left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@jeanas jeanas merged commit 3fb3ff6 into pygments:master Apr 4, 2024
13 checks passed
@JonathonReinhart JonathonReinhart deleted the jrr-add-soong branch April 8, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants