Markus Mottl avatar Markus Mottl committed f7f6e25

Added FIRSTLINE-flag; fixed incomplete handling of AUTO_CALLOUT-flag

Comments (0)

Files changed (2)

   | `NO_UTF8_CHECK
   | `NO_AUTO_CAPTURE
   | `AUTO_CALLOUT
+  | `FIRSTLINE
   ]
 
 let int_of_cflag = function
   | `NO_AUTO_CAPTURE -> 0x1000
   | `NO_UTF8_CHECK -> 0x2000
   | `AUTO_CALLOUT -> 0x4000
+  | `FIRSTLINE -> 0x40000
 
 let coll_icflag icflag flag = int_of_cflag flag lor icflag
 let cflags flags = List.fold_left coll_icflag 0 flags
   | 0x0800 -> `UTF8
   | 0x1000 -> `NO_AUTO_CAPTURE
   | 0x2000 -> `NO_UTF8_CHECK
+  | 0x4000 -> `AUTO_CALLOUT
+  | 0x40000 -> `FIRSTLINE
   | _ -> failwith "Pcre.cflag_list: unknown compilation flag"
 
 let all_cflags =
   [
     0x0001; 0x0002; 0x0004; 0x0008; 0x0010; 0x0020;
-    0x0040; 0x0200; 0x0800; 0x1000; 0x2000;
+    0x0040; 0x0200; 0x0800; 0x1000; 0x2000; 0x4000; 0x40000;
   ]
 
 let cflag_list icflags =
   | `NO_AUTO_CAPTURE (** Disables the use of numbered capturing parentheses *)
   | `AUTO_CALLOUT    (** Automatically inserts callouts with id 255
                          before each pattern item *)
+  | `FIRSTLINE       (** Unanchored patterns must match before/at first NL *)
   ]
 
 val cflags : cflag list -> icflag
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.