5.7.2.5. Pattern

Patterns; used for matching variants in match statements.
Start ocaml section to src/flx_ast.mli[6 /8 ] Next Prev First Last
   247: # 478 "./lpsrc/flx_types.ipk"
   248: and float_pat =
   249:   | Float_plus of string * string (** type, value *)
   250:   | Float_minus of string * string
   251:   | Float_inf  (** infinity *)
   252:   | Float_minus_inf (** negative infinity *)
   253: 
   254: and pattern_t =
   255:   [
   256:   | `PAT_nan of range_srcref
   257:   | `PAT_none of range_srcref
   258: 
   259:   (* constants *)
   260:   | `PAT_int of range_srcref * string * bigint
   261:   | `PAT_string of range_srcref * string
   262: 
   263:   (* ranges *)
   264:   | `PAT_int_range of range_srcref * string * bigint * string * bigint
   265:   | `PAT_string_range of range_srcref * string * string
   266:   | `PAT_float_range of range_srcref * float_pat * float_pat
   267: 
   268:   (* other *)
   269:   | `PAT_coercion of range_srcref * pattern_t * typecode_t
   270: 
   271:   | `PAT_name of range_srcref * id_t
   272:   | `PAT_tuple of range_srcref * pattern_t list
   273:   | `PAT_any of range_srcref
   274:   | `PAT_regexp of range_srcref * string * id_t list
   275:     (* second list is group bindings 1 .. n-1: EXCLUDES 0 cause we can use 'as' for that ?? *)
   276:   | `PAT_const_ctor of range_srcref * qualified_name_t
   277:   | `PAT_nonconst_ctor of range_srcref * qualified_name_t * pattern_t
   278:   | `PAT_as of range_srcref * pattern_t * id_t
   279:   | `PAT_when of range_srcref * pattern_t * expr_t
   280:   | `PAT_record of range_srcref * (id_t * pattern_t) list
   281:   ]
   282: 
End ocaml section to src/flx_ast.mli[6]