diff options
author | Thomas Symalla <5754458+tsymalla@users.noreply.github.com> | 2023-01-31 06:07:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 06:07:22 +0100 |
commit | c8cf1576cd800d828bb98ea95d6619d1552ef815 (patch) | |
tree | 4ef17aca4ec29afb7e6eae14c5e50fe94e41fd70 /pygments/lexers/amdgpu.py | |
parent | d4403f0ee0581f8353c3cf0df0db0bf6a40a7c2b (diff) | |
download | pygments-git-c8cf1576cd800d828bb98ea95d6619d1552ef815.tar.gz |
Extend the AMDGPU lexer. (#2327)
Add support for scratch_ instructions, the attr*.* argument as well
as the off modifier. Without support for attr*.*, multiple v_interp
instructions are previously rendered incorrectly.
Diffstat (limited to 'pygments/lexers/amdgpu.py')
-rw-r--r-- | pygments/lexers/amdgpu.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/amdgpu.py b/pygments/lexers/amdgpu.py index 5356b225..9e4ea0fa 100644 --- a/pygments/lexers/amdgpu.py +++ b/pygments/lexers/amdgpu.py @@ -35,11 +35,12 @@ class AMDGPULexer(RegexLexer): (r'(([a-z_0-9])*:([a-z_0-9])*)', Name.Attribute), (r'(\[|\]|\(|\)|,|\:|\&)', Text), (r'([;#]|//).*?\n', Comment.Single), - (r'((s_)?(ds|buffer|flat|image)_[a-z0-9_]+)', Keyword.Reserved), + (r'((s_)?(scratch|ds|buffer|flat|image)_[a-z0-9_]+)', Keyword.Reserved), (r'(_lo|_hi)', Name.Variable), (r'(vmcnt|lgkmcnt|expcnt)', Name.Attribute), + (r'(attr[0-9].[a-z])', Name.Attribute), (words(( - 'op', 'vaddr', 'vdata', 'soffset', 'srsrc', 'format', + 'op', 'vaddr', 'vdata', 'off', 'soffset', 'srsrc', 'format', 'offset', 'offen', 'idxen', 'glc', 'dlc', 'slc', 'tfe', 'lds', 'lit', 'unorm'), suffix=r'\b'), Name.Attribute), (r'(label_[a-z0-9]+)', Keyword), |