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

Fix function attributes and attribute groups on LLVM #986

Merged
merged 4 commits into from
Jun 21, 2019

Conversation

robin850
Copy link
Contributor

Hello,

This pull request fixes a few problems with the LLVM lexer.

  • Adds missing function attribute keywords and the attributes keyword itself. Since some of them were already present, this script has been used to compute the difference. The list of function attributes is available here.

    Also, the alignstack keyword has been placed before align in the list to avoid the former being highlighted as a combination of align and c.

  • Properly highlight the attribute groups' ID as global variable as Pygments does.

Before

capture d ecran 2018-09-10 a 18 16 39

After

capture d ecran 2018-09-10 a 18 17 09

The patch is split into 3 different commits to make things easy to understand but if you want me to squash them, I can do it.

Have a nice day !

robin850 and others added 4 commits September 10, 2018 18:16
Specifically move the `alignstack` keyword, before the `align` one
because otherwise, the former get partially highlighted as `align`
and `c`.

Also add the `attributes` keyword that defines attribute groups.
Highlight attribute groups' ID as global variables as Pygments
does.
spec/visual/samples/llvm Show resolved Hide resolved
@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed maintainer-action The PR has been reviewed but action by a maintainer is required and removed author-action The PR has been reviewed but action by the author is needed labels Jun 18, 2019
@pyrmont pyrmont merged commit 6e0f34d into rouge-ruby:master Jun 21, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jun 21, 2019

Thanks for helping make Rouge a better library, @robin850! :)

@pyrmont pyrmont removed the maintainer-action The PR has been reviewed but action by a maintainer is required label Jun 21, 2019
@robin850 robin850 deleted the llvm-fixes branch June 21, 2019 09:05
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.

2 participants