This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Data::Dumper version
[perl5.git] / keywords.c
index e68e9f5..624debc 100644 (file)
@@ -203,7 +203,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
           goto unknown;
       }
 
-    case 3: /* 28 tokens of length 3 */
+    case 3: /* 30 tokens of length 3 */
       switch (name[0])
       {
         case 'E':
@@ -320,13 +320,27 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
           goto unknown;
 
         case 'i':
-          if (name[1] == 'n' &&
-              name[2] == 't')
-          {                                       /* int              */
-            return -KEY_int;
-          }
+          switch (name[1])
+          {
+            case 'n':
+              if (name[2] == 't')
+              {                                   /* int              */
+                return -KEY_int;
+              }
 
-          goto unknown;
+              goto unknown;
+
+            case 's':
+              if (name[2] == 'a')
+              {                                   /* isa              */
+                return (all_keywords || FEATURE_ISA_IS_ENABLED ? -KEY_isa : 0);
+              }
+
+              goto unknown;
+
+            default:
+              goto unknown;
+          }
 
         case 'l':
           if (name[1] == 'o' &&
@@ -449,13 +463,27 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
           }
 
         case 't':
-          if (name[1] == 'i' &&
-              name[2] == 'e')
-          {                                       /* tie              */
-            return -KEY_tie;
-          }
+          switch (name[1])
+          {
+            case 'i':
+              if (name[2] == 'e')
+              {                                   /* tie              */
+                return -KEY_tie;
+              }
 
-          goto unknown;
+              goto unknown;
+
+            case 'r':
+              if (name[2] == 'y')
+              {                                   /* try              */
+                return (all_keywords || FEATURE_TRY_IS_ENABLED ? KEY_try : 0);
+              }
+
+              goto unknown;
+
+            default:
+              goto unknown;
+          }
 
         case 'u':
           if (name[1] == 's' &&
@@ -950,7 +978,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
           goto unknown;
       }
 
-    case 5: /* 39 tokens of length 5 */
+    case 5: /* 40 tokens of length 5 */
       switch (name[0])
       {
         case 'B':
@@ -1032,6 +1060,16 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
         case 'c':
           switch (name[1])
           {
+            case 'a':
+              if (name[2] == 't' &&
+                  name[3] == 'c' &&
+                  name[4] == 'h')
+              {                                   /* catch            */
+                return (all_keywords || FEATURE_TRY_IS_ENABLED ? KEY_catch : 0);
+              }
+
+              goto unknown;
+
             case 'h':
               switch (name[2])
               {
@@ -1903,7 +1941,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
           goto unknown;
       }
 
-    case 7: /* 29 tokens of length 7 */
+    case 7: /* 30 tokens of length 7 */
       switch (name[0])
       {
         case 'D':
@@ -1995,13 +2033,33 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
               goto unknown;
 
             case 'e':
-              if (name[2] == 'f' &&
-                  name[3] == 'i' &&
-                  name[4] == 'n' &&
-                  name[5] == 'e' &&
-                  name[6] == 'd')
-              {                                   /* defined          */
-                return KEY_defined;
+              if (name[2] == 'f')
+              {
+                switch (name[3])
+                {
+                  case 'a':
+                    if (name[4] == 'u' &&
+                        name[5] == 'l' &&
+                        name[6] == 't')
+                    {                             /* default          */
+                      return (all_keywords || FEATURE_SWITCH_IS_ENABLED ? KEY_default : 0);
+                    }
+
+                    goto unknown;
+
+                  case 'i':
+                    if (name[4] == 'n' &&
+                        name[5] == 'e' &&
+                        name[6] == 'd')
+                    {                             /* defined          */
+                      return KEY_defined;
+                    }
+
+                    goto unknown;
+
+                  default:
+                    goto unknown;
+                }
               }
 
               goto unknown;
@@ -3417,5 +3475,5 @@ unknown:
 }
 
 /* Generated from:
- * 1e6a65fdd2e2d8aec28927cb9cbfed6e8a33ba077f0114b420746a04b0df8792 regen/keywords.pl
+ * 3a4f2004642b00b871c01cbdc018f6ca5ead6b4e0b2b184120c60b0b62a229dd regen/keywords.pl
  * ex: set ro: */