@@ -238,7 +238,7 @@ BEGIN { $build_subclass->(parent => '',
238
238
239
239
' map_alias_name_to_value' , # Hash: maps seen alias names to their value
240
240
241
- ' map_alias_value_to_name_seen_hash' , # Hash of hash of bools :
241
+ ' map_alias_value_to_name_seen_hash' , # Hash of Hash of Bools :
242
242
# indicates which alias names have been
243
243
# used for each value.
244
244
@@ -251,15 +251,15 @@ BEGIN { $build_subclass->(parent => '',
251
251
# name, map the short (PREFIX removed) name
252
252
# to the original name.
253
253
254
- ' overload_name_seen' , # Hash of bools : indicates overload method
254
+ ' overload_name_seen' , # Hash of Bools : indicates overload method
255
255
# names (such as '<=>') which have been
256
256
# listed by OVERLOAD (for newXS boot code
257
257
# emitting).
258
258
259
259
# Maintain the ATTRS parsing state across potentially multiple
260
260
# ATTRS keywords and or lines:
261
261
262
- ' attributes' , # Array of strings : all ATTRIBUTE keywords
262
+ ' attributes' , # Array of Strs : all ATTRIBUTE keywords
263
263
# (possibly multiple space-separated
264
264
# keywords per string).
265
265
@@ -278,7 +278,7 @@ BEGIN { $build_subclass->(parent => '',
278
278
# "2": empty prototype
279
279
# other: a specific prototype.
280
280
281
- ' SCOPE_enabled' , # "SCOPE: ENABLE" seen, in either the
281
+ ' SCOPE_enabled' , # Bool: "SCOPE: ENABLE" seen, in either the
282
282
# file or XSUB part of the XS file
283
283
284
284
)};
@@ -789,10 +789,10 @@ package ExtUtils::ParseXS::Node::ReturnType;
789
789
# extra keywords to process, such as NO_RETURN.
790
790
791
791
BEGIN { $build_subclass -> (parent => ' ' ,
792
- ' type' , # Str: the XSUB's C return type
793
- ' no_output' , # bool : saw 'NO_OUTPUT'
794
- ' extern_C' , # bool : saw 'extern C'
795
- ' static' , # bool : saw 'static'
792
+ ' type' , # Str: the XSUB's C return type
793
+ ' no_output' , # Bool : saw 'NO_OUTPUT'
794
+ ' extern_C' , # Bool : saw 'extern C'
795
+ ' static' , # Bool : saw 'static'
796
796
' use_early_targ' , # Bool: emit an early dTARG for backcompat
797
797
)};
798
798
@@ -879,23 +879,24 @@ package ExtUtils::ParseXS::Node::Param;
879
879
880
880
BEGIN { $build_subclass -> (parent => ' ' ,
881
881
# values derived from the XSUB's signature
882
- ' in_out' , # The IN/OUT/OUTLIST etc value (if any)
883
- ' var' , # the name of the parameter
884
- ' arg_num' , # The arg number (starting at 1) mapped to this param
885
- ' default' , # default value (if any)
886
- ' default_usage' , # how to report default value in "usage:..." error
887
- ' is_ansi' , # param's type was specified in signature
888
- ' is_length' , # param is declared as 'length(foo)' in signature
889
- ' has_length' , # this param has a matching 'length(foo)' param in sig
890
- ' len_name' , # the 'foo' in 'length(foo)' in signature
891
- ' is_synthetic' , # var like 'THIS' - we pretend it was in the sig
882
+ ' in_out' , # Str: The IN/OUT/OUTLIST etc value (if any)
883
+ ' var' , # Str: the name of the parameter
884
+ ' arg_num' , # Int The arg number (starting at 1) mapped to this param
885
+ ' default' , # Str: default value (if any)
886
+ ' default_usage' , # Str: how to report default value in "usage:..." error
887
+ ' is_ansi' , # Bool: param's type was specified in signature
888
+ ' is_length' , # Bool: param is declared as 'length(foo)' in signature
889
+ ' has_length' , # Bool: this param has a matching 'length(foo)'
890
+ # parameter in the signature
891
+ ' len_name' , # Str: the 'foo' in 'length(foo)' in signature
892
+ ' is_synthetic' , # Bool: var like 'THIS': we pretend it was in the sig
892
893
893
894
# values derived from both the XSUB's signature and/or INPUT line
894
- ' type' , # The C type of the parameter
895
- ' no_init' , # don't initialise the parameter
895
+ ' type' , # Str: The C type of the parameter
896
+ ' no_init' , # Bool: don't initialise the parameter
896
897
897
898
# derived values calculated later
898
- ' proto' , # overridden prototype char(s) (if any) from typemap
899
+ ' proto' , # Str: overridden prototype char(s) (if any) from typemap
899
900
)};
900
901
901
902
@@ -1101,18 +1102,18 @@ package ExtUtils::ParseXS::Node::IO_Param;
1101
1102
BEGIN { $build_subclass -> (parent => ' Param' ,
1102
1103
# values derived from the XSUB's INPUT line
1103
1104
1104
- ' init_op' , # initialisation type: one of =/+/;
1105
- ' init' , # initialisation template code
1106
- ' is_addr' , # INPUT var declared as '&foo'
1107
- ' is_alien' , # var declared in INPUT line, but not in signature
1108
- ' in_input' , # the parameter has appeared in an INPUT statement
1109
- ' defer' , # deferred initialisation template code
1105
+ ' init_op' , # Str: initialisation type: one of =/+/;
1106
+ ' init' , # Str: initialisation template code
1107
+ ' is_addr' , # Bool: INPUT var declared as '&foo'
1108
+ ' is_alien' , # Bool: var declared in INPUT line, but not in signature
1109
+ ' in_input' , # Bool: the parameter has appeared in an INPUT statement
1110
+ ' defer' , # Str: deferred initialisation template code
1110
1111
1111
1112
# values derived from the XSUB's OUTPUT line
1112
1113
#
1113
- ' in_output' , # the parameter has appeared in an OUTPUT statement
1114
- ' do_setmagic' , # 'SETMAGIC: ENABLE' was active for this parameter
1115
- ' output_code' , # the optional setting-code for this parameter
1114
+ ' in_output' , # Bool: the parameter has appeared in an OUTPUT statement
1115
+ ' do_setmagic' , # Bool: 'SETMAGIC: ENABLE' was active for this parameter
1116
+ ' output_code' , # Str: the optional setting-code for this parameter
1116
1117
1117
1118
# ArrayRefs: results of looking up typemaps (which are done in the
1118
1119
# parse phase, as the typemap definitions can in theory change
@@ -2140,15 +2141,15 @@ BEGIN { $build_subclass->(parent => '',
2140
2141
' names' , # Hash ref mapping variable names to Node::Param
2141
2142
# or Node::IO_Param objects
2142
2143
2143
- ' params_text' , # The original text of the sig, e.g.
2144
- # ' param1, int param2 = 0'
2144
+ ' params_text' , # Str: The original text of the sig, e.g.
2145
+ # " param1, int param2 = 0"
2145
2146
2146
2147
' seen_ellipsis' , # Bool: XSUB signature has ( ,...)
2147
2148
2148
- ' nargs' , # The number of args expected from caller
2149
- ' min_args' , # The minimum number of args allowed from caller
2149
+ ' nargs' , # Int: The number of args expected from caller
2150
+ ' min_args' , # Int: The minimum number of args allowed from caller
2150
2151
2151
- ' auto_function_sig_override' , # the C_ARGS value, if any
2152
+ ' auto_function_sig_override' , # Str: the C_ARGS value, if any
2152
2153
)};
2153
2154
2154
2155
@@ -2461,12 +2462,11 @@ package ExtUtils::ParseXS::Node::xbody;
2461
2462
# higher-level node.
2462
2463
2463
2464
BEGIN { $build_subclass -> (parent => ' ' ,
2464
- ' ioparams' , # per-body copy of params which accumulate extra
2465
- # info from any INPUT and OUTPUT sections (which can
2465
+ ' ioparams' , # Params object: per-body copy of params which accumulate
2466
+ # extra info from any INPUT and OUTPUT sections (which can
2466
2467
# vary between different CASEs)
2467
2468
2468
-
2469
- # Objects representing the various parts of an xbody. These
2469
+ # Node objects representing the various parts of an xbody. These
2470
2470
# are aliases of the same objects in @{$self->{kids}} for easier
2471
2471
# access.
2472
2472
' input_part' ,
@@ -2579,11 +2579,10 @@ package ExtUtils::ParseXS::Node::input_part;
2579
2579
2580
2580
BEGIN { $build_subclass -> (parent => ' ' ,
2581
2581
2582
- # Used during code generation:
2582
+ # Str: used during code generation:
2583
2583
# a multi-line string containing lines of code to be emitted *after*
2584
2584
# all INPUT and PREINIT keywords have been processed.
2585
2585
' deferred_code_lines' ,
2586
-
2587
2586
)};
2588
2587
2589
2588
@@ -3055,7 +3054,7 @@ package ExtUtils::ParseXS::Node::oneline;
3055
3054
# follows the keyword.
3056
3055
3057
3056
BEGIN { $build_subclass -> (parent => ' ' ,
3058
- ' text' , # any text following the keyword
3057
+ ' text' , # Str: any text following the keyword
3059
3058
)};
3060
3059
3061
3060
@@ -3098,8 +3097,8 @@ package ExtUtils::ParseXS::Node::CASE;
3098
3097
# Process the 'CASE:' keyword
3099
3098
3100
3099
BEGIN { $build_subclass -> (parent => ' oneline' ,
3101
- ' cond' , # the C code of the condition for the CASE, or ''
3102
- ' num' , # which CASE number this is (starting at 1)
3100
+ ' cond' , # Str: the C code of the condition for the CASE, or ''
3101
+ ' num' , # Int: which CASE number this is (starting at 1)
3103
3102
)};
3104
3103
3105
3104
@@ -3136,7 +3135,7 @@ package ExtUtils::ParseXS::Node::autocall;
3136
3135
# name
3137
3136
3138
3137
BEGIN { $build_subclass -> (parent => ' ' ,
3139
- ' args' , # string to use for auto function call arguments
3138
+ ' args' , # Str: text to use for auto function call arguments
3140
3139
)};
3141
3140
3142
3141
@@ -3232,7 +3231,7 @@ package ExtUtils::ParseXS::Node::enable;
3232
3231
# Base class for keywords which accept ENABLE/DISABLE as an argument
3233
3232
3234
3233
BEGIN { $build_subclass -> (parent => ' oneline' ,
3235
- ' enable' , # bool
3234
+ ' enable' , # Bool
3236
3235
)};
3237
3236
3238
3237
@@ -3393,7 +3392,7 @@ package ExtUtils::ParseXS::Node::multiline;
3393
3392
# follows the keyword.
3394
3393
3395
3394
BEGIN { $build_subclass -> (parent => ' ' ,
3396
- ' lines' , # Array ref of all lines until the next keyword
3395
+ ' lines' , # Array ref of all lines until the next keyword
3397
3396
)};
3398
3397
3399
3398
@@ -3431,7 +3430,7 @@ package ExtUtils::ParseXS::Node::multiline_merged;
3431
3430
# into a single line, 'text'.
3432
3431
3433
3432
BEGIN { $build_subclass -> (parent => ' multiline' ,
3434
- ' text' , # singe string contained all concatenated lines
3433
+ ' text' , # Str: singe string containing all concatenated lines
3435
3434
)};
3436
3435
3437
3436
@@ -3532,8 +3531,8 @@ package ExtUtils::ParseXS::Node::INTERFACE_MACRO;
3532
3531
# Handle INTERFACE_MACRO keyword
3533
3532
3534
3533
BEGIN { $build_subclass -> (parent => ' multiline_merged' ,
3535
- ' get_macro' , # name of macro to get interface
3536
- ' set_macro' , # name of macro to set interface
3534
+ ' get_macro' , # Str: name of macro to get interface
3535
+ ' set_macro' , # Str: name of macro to set interface
3537
3536
)};
3538
3537
3539
3538
@@ -3572,7 +3571,7 @@ package ExtUtils::ParseXS::Node::OVERLOAD;
3572
3571
# Handle OVERLOAD keyword
3573
3572
3574
3573
BEGIN { $build_subclass -> (parent => ' multiline_merged' ,
3575
- ' ops' , # has ref of overloaded op names
3574
+ ' ops' , # Hash ref of seen overloaded op names
3576
3575
)};
3577
3576
3578
3577
# Add all overload method names, like 'cmp', '<=>', etc, (possibly
@@ -3634,7 +3633,7 @@ package ExtUtils::ParseXS::Node::PROTOTYPE;
3634
3633
# Handle PROTOTYPE keyword
3635
3634
3636
3635
BEGIN { $build_subclass -> (parent => ' multiline' ,
3637
- ' prototype' , # 0 (disable), 1 (enable), 2 ("") or "$$@" etc
3636
+ ' prototype' , # Str: 0 (disable), 1 (enable), 2 ("") or "$$@" etc
3638
3637
)};
3639
3638
3640
3639
@@ -3998,7 +3997,7 @@ package ExtUtils::ParseXS::Node::keyline;
3998
3997
# their parent.
3999
3998
4000
3999
BEGIN { $build_subclass -> (parent => ' ' ,
4001
- ' line' , # text of current line
4000
+ ' line' , # Str: text of current line
4002
4001
)};
4003
4002
4004
4003
@@ -4029,7 +4028,8 @@ package ExtUtils::ParseXS::Node::ALIAS;
4029
4028
# Handle ALIAS keyword
4030
4029
4031
4030
BEGIN { $build_subclass -> (parent => ' keylines' ,
4032
- ' aliases' , # hashref of all alias => value pairs
4031
+ ' aliases' , # hashref of all alias => value pairs.
4032
+ # Populated by ALIAS_line::parse()
4033
4033
)};
4034
4034
4035
4035
sub parse {
@@ -4195,8 +4195,8 @@ package ExtUtils::ParseXS::Node::INPUT;
4195
4195
# block which can follow an xsub signature or CASE keyword.
4196
4196
4197
4197
BEGIN { $build_subclass -> (parent => ' keylines' ,
4198
- ' implicit' , # bool : this is an INPUT section at the start of the
4199
- # XSUB without an explicit 'INPUT' keyword
4198
+ ' implicit' , # Bool : this is an INPUT section at the start of the
4199
+ # XSUB/CASE, without an explicit 'INPUT' keyword
4200
4200
)};
4201
4201
4202
4202
# The inherited parse() method will call INPUT_line->parse() for each line
@@ -4228,11 +4228,11 @@ BEGIN { $build_subclass->(parent => 'keyline',
4228
4228
' param' , # The IO_Param object associated with this INPUT line.
4229
4229
4230
4230
# The parsed components of this INPUT line:
4231
- ' type' , # char *
4232
- ' is_addr' , # &
4233
- ' name' , # foo
4234
- ' init_op' , # =
4235
- ' init' , # SvIv($arg)
4231
+ ' type' , # Str: char *
4232
+ ' is_addr' , # Bool: &
4233
+ ' name' , # Str: foo
4234
+ ' init_op' , # Str: =
4235
+ ' init' , # Str: SvIv($arg)
4236
4236
)};
4237
4237
4238
4238
@@ -4481,11 +4481,11 @@ package ExtUtils::ParseXS::Node::OUTPUT_line;
4481
4481
# Handle one line from an OUTPUT keyword block
4482
4482
4483
4483
BEGIN { $build_subclass -> (parent => ' keyline' ,
4484
- ' param' , # the param object associated with this OUTPUT line.
4485
- ' is_setmagic' , # bool : the line is a SETMAGIC: line
4486
- ' do_setmagic' , # bool : the current SETMAGIC state
4487
- ' name' , # name of the parameter to output
4488
- ' code' , # optional setting code
4484
+ ' param' , # the IO_Param object associated with this OUTPUT line.
4485
+ ' is_setmagic' , # Bool : the line is a SETMAGIC: line
4486
+ ' do_setmagic' , # Bool : the current SETMAGIC state
4487
+ ' name' , # Str: name of the parameter to output
4488
+ ' code' , # Str: optional setting code
4489
4489
)};
4490
4490
4491
4491
0 commit comments