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 new lexer for DAX #2335

Merged
merged 10 commits into from
Feb 13, 2023
Merged

Add new lexer for DAX #2335

merged 10 commits into from
Feb 13, 2023

Conversation

GD-L
Copy link
Contributor

@GD-L GD-L commented Feb 2, 2023

Includes new lexer for DAX syntax. Inspired by Highlighter Brush from SQLBI
https://github.com/sql-bi/SyntaxHighlighterBrushDax

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.

Thank you for working on this.

Here are some comments. Also, please add a test file under tests/examplefiles/dax/ and run pytest --update-goldens tests/examplefiles/dax/ to populate it with the expected tokens, then commit tests/examplefiles/dax.

pygments/lexers/_dax_builtins.py Outdated Show resolved Hide resolved
pygments/lexers/_dax_builtins.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
@jeanas
Copy link
Contributor

jeanas commented Feb 2, 2023

You also need to run make mapfiles and commit the resulting change to pygments/lexers/_mapping.py.

@GD-L
Copy link
Contributor Author

GD-L commented Feb 2, 2023

You also need to run make mapfiles and commit the resulting change to pygments/lexers/_mapping.py.

This was included: https://github.com/pygments/pygments/pull/2335/files#diff-1fcf14767c363b55c2b7e1612366433010e2509ea8d34509cfa36125d9989daa

Remove dax builtins, and commit examples & output.
@GD-L GD-L requested a review from jeanas February 3, 2023 15:36
pygments/lexers/dax.py Outdated Show resolved Hide resolved
pygments/lexers/dax.py Outdated Show resolved Hide resolved
@jeanas
Copy link
Contributor

jeanas commented Feb 12, 2023

@GD-L One last question, afterwards should be good to go.

@GD-L
Copy link
Contributor Author

GD-L commented Feb 13, 2023

@jeanas Thanks for your help, learned a lot doing this!

@jeanas jeanas merged commit 4ae9e07 into pygments:master Feb 13, 2023
@jeanas
Copy link
Contributor

jeanas commented Feb 13, 2023

Thanks for your contribution!

@Anteru Anteru added this to the 2.15.0 milestone Mar 25, 2023
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

Successfully merging this pull request may close these issues.

4 participants