kernel-doc (f7ea285b6266822bd63af2a3695f03e3357fd74f) | kernel-doc (346282db9c6bc7ce2dad8ae640494f3f88d23889) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 200 unchanged lines hidden (view full) --- 209my $anon_struct_union = 0; 210 211# match expressions used to find embedded type information 212my $type_constant = '\b``([^\`]+)``\b'; 213my $type_constant2 = '\%([-_\w]+)'; 214my $type_func = '(\w+)\(\)'; 215my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; 216my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 200 unchanged lines hidden (view full) --- 209my $anon_struct_union = 0; 210 211# match expressions used to find embedded type information 212my $type_constant = '\b``([^\`]+)``\b'; 213my $type_constant2 = '\%([-_\w]+)'; 214my $type_func = '(\w+)\(\)'; 215my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; 216my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params |
217my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params |
|
217my $type_env = '(\$\w+)'; 218my $type_enum = '\&(enum\s*([_\w]+))'; 219my $type_struct = '\&(struct\s*([_\w]+))'; 220my $type_typedef = '\&(typedef\s*([_\w]+))'; 221my $type_union = '\&(union\s*([_\w]+))'; 222my $type_member = '\&([_\w]+)(\.|->)([_\w]+)'; 223my $type_fallback = '\&([_\w]+)'; 224my $type_member_func = $type_member . '\(\)'; --- 19 unchanged lines hidden (view full) --- 244# rst-mode 245my @highlights_rst = ( 246 [$type_constant, "``\$1``"], 247 [$type_constant2, "``\$1``"], 248 # Note: need to escape () to avoid func matching later 249 [$type_member_func, "\\:c\\:type\\:`\$1\$2\$3\\\\(\\\\) <\$1>`"], 250 [$type_member, "\\:c\\:type\\:`\$1\$2\$3 <\$1>`"], 251 [$type_fp_param, "**\$1\\\\(\\\\)**"], | 218my $type_env = '(\$\w+)'; 219my $type_enum = '\&(enum\s*([_\w]+))'; 220my $type_struct = '\&(struct\s*([_\w]+))'; 221my $type_typedef = '\&(typedef\s*([_\w]+))'; 222my $type_union = '\&(union\s*([_\w]+))'; 223my $type_member = '\&([_\w]+)(\.|->)([_\w]+)'; 224my $type_fallback = '\&([_\w]+)'; 225my $type_member_func = $type_member . '\(\)'; --- 19 unchanged lines hidden (view full) --- 245# rst-mode 246my @highlights_rst = ( 247 [$type_constant, "``\$1``"], 248 [$type_constant2, "``\$1``"], 249 # Note: need to escape () to avoid func matching later 250 [$type_member_func, "\\:c\\:type\\:`\$1\$2\$3\\\\(\\\\) <\$1>`"], 251 [$type_member, "\\:c\\:type\\:`\$1\$2\$3 <\$1>`"], 252 [$type_fp_param, "**\$1\\\\(\\\\)**"], |
253 [$type_fp_param2, "**\$1\\\\(\\\\)**"], |
|
252 [$type_func, "\$1()"], 253 [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"], 254 [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"], 255 [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"], 256 [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"], 257 # in rst this can refer to any type 258 [$type_fallback, "\\:c\\:type\\:`\$1`"], 259 [$type_param, "**\$1**"] --- 1984 unchanged lines hidden --- | 254 [$type_func, "\$1()"], 255 [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"], 256 [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"], 257 [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"], 258 [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"], 259 # in rst this can refer to any type 260 [$type_fallback, "\\:c\\:type\\:`\$1`"], 261 [$type_param, "**\$1**"] --- 1984 unchanged lines hidden --- |