}
# Trim certain spaces in identifiers
- if ( $type eq 'i' ) {
+ if ( $type eq 'i' && $token =~ /\s/ ) {
if ( $token =~ /$SUB_PATTERN/ ) {
# clean up spaces in package identifiers, like
# "package Bob::Dog;"
- elsif ( substr( $token, 0, 7 ) eq 'package'
- && $token =~ /^package\s/ )
- {
+ elsif ( $token =~ /^(package|class)\s/ ) {
$token =~ s/\s+/ /g;
$rtoken_vars->[_TOKEN_] = $token;
$self->[_ris_special_identifier_token_]->{$token} =
'package';
-
}
# trim identifiers of trailing blanks which can occur
# some tests for default setting --use-feature=class, rt145706
class Example::Subclass1 : isa(Example::Base) { ... }
+
class Example::Subclass2 : isa(Example::Base 2.345) { ... }
+
class Example::Subclass3 : isa(Example::Base) 1.345 { ... }
field $y : param(the_y_value);
+
class Pointer 2.0 {
field $x : param;
field $y : param;
../snippets27.t olbxl.def
../snippets27.t olbxl.olbxl1
../snippets28.t olbxl.olbxl2
+../snippets28.t recombine5.def
+../snippets28.t recombine6.def
+../snippets28.t recombine7.def
+../snippets28.t recombine8.def
../snippets3.t ce_wn1.ce_wn
../snippets3.t ce_wn1.def
../snippets3.t colin.colin
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets28.t recombine5.def
-../snippets28.t recombine6.def
-../snippets28.t recombine7.def
-../snippets28.t recombine8.def
expect => <<'#17...........',
# some tests for default setting --use-feature=class, rt145706
class Example::Subclass1 : isa(Example::Base) { ... }
+
class Example::Subclass2 : isa(Example::Base 2.345) { ... }
+
class Example::Subclass3 : isa(Example::Base) 1.345 { ... }
field $y : param(the_y_value);
+
class Pointer 2.0 {
field $x : param;
field $y : param;