diff options
author | Georg Brandl <georg@python.org> | 2012-08-19 09:54:13 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-08-19 09:54:13 +0200 |
commit | ebfece1dc1fa6f29a70cd8e7f5ab389edc2c4f5e (patch) | |
tree | 396672c44dfcb3a8127ca36c857031c166219a0e | |
parent | aa9f19df4fa42c9ca353744eb7abe4f8a6f57988 (diff) | |
download | pygments-ebfece1dc1fa6f29a70cd8e7f5ab389edc2c4f5e.tar.gz |
CUDA: fix merging mistakes and add attribution/changelog entries.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 36 |
3 files changed, 22 insertions, 16 deletions
@@ -85,6 +85,7 @@ Other contributors, listed alphabetically, are: * Benjamin Peterson -- Test suite refactoring * Dominik Picheta -- Nimrod lexer * Clément Prévost -- UrbiScript lexer +* Kashif Rasul -- CUDA lexer * Justin Reidy -- MXML lexer * Norman Richards -- JSON lexer * Lubomir Rintel -- GoodData MAQL and CL lexers @@ -16,6 +16,7 @@ Version 1.6 * Lasso (PR#95) * BUGS-like languages (PR#89) * Rust (PR#67) + * CUDA (PR#75) - Fix Template Haskell highlighting (PR#63) diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 8313ad95..5dd91991 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -2976,31 +2976,35 @@ class RustLexer(RegexLexer): } } + class CUDALexer(CLexer): """ - For NVIDIA `CUDA™ <http://developer.nvidia.com/category/zone/cuda-zone>`_ source. + For NVIDIA `CUDA™ <http://developer.nvidia.com/category/zone/cuda-zone>`_ + source. + + *New in Pygments 1.6.* """ name = 'CUDA' filenames = ['*.cu', '*.cuh'] aliases = ['cuda', 'cu'] mimetypes = ['text/x-cuda'] - tokens = { - 'root': [ - ], - } - function_qualifiers = ['__device__', '__global__', '__host__', '__noinline__', '__forceinline__'] - variable_qualifiers = ['__device__', '__constant__', '__shared__', '__restrict__'] - vector_types = ['char1', 'uchar1', 'char2', 'uchar2', 'char3', 'uchar3', 'char4', 'uchar4', - 'short1', 'ushort1', 'short2', 'ushort2', 'short3', 'ushort3', 'short4', 'ushort4', - 'int1', 'uint1', 'int2', 'uint2', 'int3', 'uint3', 'int4', 'uint4', - 'long1', 'ulong1', 'long2', 'ulong2', 'long3', 'ulong3', 'long4', 'ulong4', - 'longlong1', 'ulonglong1', 'longlong2', 'ulonglong2', - 'float1', 'float2', 'float3', 'float4', + function_qualifiers = ['__device__', '__global__', '__host__', + '__noinline__', '__forceinline__'] + variable_qualifiers = ['__device__', '__constant__', '__shared__', + '__restrict__'] + vector_types = ['char1', 'uchar1', 'char2', 'uchar2', 'char3', 'uchar3', + 'char4', 'uchar4', 'short1', 'ushort1', 'short2', 'ushort2', + 'short3', 'ushort3', 'short4', 'ushort4', 'int1', 'uint1', + 'int2', 'uint2', 'int3', 'uint3', 'int4', 'uint4', 'long1', + 'ulong1', 'long2', 'ulong2', 'long3', 'ulong3', 'long4', + 'ulong4', 'longlong1', 'ulonglong1', 'longlong2', + 'ulonglong2', 'float1', 'float2', 'float3', 'float4', 'double1', 'double2', 'dim3'] variables = ['gridDim', 'blockIdx', 'blockDim', 'threadIdx', 'warpSize'] - functions = ['__threadfence_block', '__threadfence', '__threadfence_system', '__syncthreads', - '__syncthreads_count', '__syncthreads_and', '__syncthreads_or'] + functions = ['__threadfence_block', '__threadfence', '__threadfence_system', + '__syncthreads', '__syncthreads_count', '__syncthreads_and', + '__syncthreads_or'] execution_confs = ['<<<', '>>>'] def get_tokens_unprocessed(self, text): @@ -3019,4 +3023,4 @@ class CUDALexer(CLexer): token = Keyword.Reserved elif value in self.functions: token = Name.Function - yield index, token, value>>>>>>> other + yield index, token, value |