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

Update LLVM lexer to use keywords of LLVM 12.0. #1824

Merged
merged 1 commit into from
May 31, 2021

Conversation

frasercrmck
Copy link
Contributor

@frasercrmck frasercrmck commented May 28, 2021

The keywords are based on the extraction of keywords the LLVM 12.0 lexer
source code. They were taken from the KEYWORD and INSTKEYWORD macros
for the 'Keyword' tokens, and 'Type' tokens were from the TYPEKEYWORD
macro. The keywords were then sorted against the current set.

Due to formatting issues in the arrays, the actual Type diff is:

+x86_mmx
+x86_amx

and the Keyword diff is:

+aarch64_sve_vector_pcs
+aarch64_vector_pcs
+alwaysInline
+amdgpu_gfx
+blockcount
+byref
+callbr
+canAutoHide
+cfguard_checkcc
+dso_local_equivalent
+fneg
+mustprogress
+nocallback
+nofree
+noInline
+nomerge
+noprofile
+nosync
+noundef
+null_pointer_is_valid
+param
+params
+partition
+preallocated
+sanitize_memtag
+speculative_load_hardening
+tailcc
+typeidCompatibleVTable
+varFlags
+vcall_visibility
+virtFunc
+vscale
+vTableFuncs
+x

@frasercrmck
Copy link
Contributor Author

I couldn't see any existing tests for the LLVM lexer.

I might have also messed up the formatting. Please advice if there's a style I've missed.

The keywords are based on the extraction of keywords the LLVM 12.0 lexer
source code. They were taken from the `KEYWORD` and `INSTKEYWORD` macros
for the 'Keyword' tokens, and 'Type' tokens were from the `TYPEKEYWORD`
macro. The keywords were then sorted against the current set.

Due to formatting issues in the arrays, the actual Type diff is:

``` diff
+x86_mmx
+x86_amx
```

and the Keyword diff is:

``` diff
+aarch64_sve_vector_pcs
+aarch64_vector_pcs
+alwaysInline
+amdgpu_gfx
+blockcount
+byref
+callbr
+canAutoHide
+cfguard_checkcc
+dso_local_equivalent
+fneg
+mustprogress
+nocallback
+nofree
+noInline
+nomerge
+noprofile
+nosync
+noundef
+null_pointer_is_valid
+param
+params
+partition
+preallocated
+sanitize_memtag
+speculative_load_hardening
+tailcc
+typeidCompatibleVTable
+varFlags
+vcall_visibility
+virtFunc
+vscale
+vTableFuncs
+x
```
@Anteru Anteru self-assigned this May 31, 2021
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label May 31, 2021
@Anteru Anteru added this to the 2.10 milestone May 31, 2021
@Anteru Anteru merged commit 7c759ea into pygments:master May 31, 2021
@Anteru
Copy link
Collaborator

Anteru commented May 31, 2021

Merged, thanks!

@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Aug 8, 2021
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.

None yet

2 participants