Natools

natools-s_expressions-conditionals-strings-maps.sx at [60c4462e44]
Login

File src/natools-s_expressions-conditionals-strings-maps.sx artifact aa2bb08f0e part of check-in 60c4462e44


(Natools.Static_Maps.S_Expressions.Conditionals.Strings
   pure
   (test-function T)
   (extra-decl "\
   type Parametric_Condition is
     (Unknown_Parametric_Condition,
      Case_Insensitive,
      Case_Sensitive,
      Contains_All,
      Contains_Any,
      Is_Equal_To,
      Starts_With);

   type Simple_Condition is
     (Unknown_Simple_Condition,
      Is_ASCII,
      Is_Empty);")

   (Parametric_Condition
      (hash-package Natools.Static_Maps.S_Expressions.Conditionals.Strings.P)
      (function To_Parametric)
      (not-found Unknown_Parametric_Condition)
      (nodes
         (Case_Insensitive   case-insensitive)
         (Case_Sensitive   case-sensitive)
         (Contains_All   contains contains-all contains-all-of)
         (Contains_Any   contains-any contains-any-of)
         (Is_Equal_To   is is-equal-to "=")
         (Starts_With   starts-with)))

   (Simple_Condition
      (hash-package Natools.Static_Maps.S_Expressions.Conditionals.Strings.S)
      (function To_Simple)
      (not-found Unknown_Simple_Condition)
      (nodes
         (Is_ASCII   is-ascii)
         (Is_Empty   is-empty))))