package quickjs

  1. Overview
  2. Docs
Bindings for QuickJS (a Javascript Engine to be embedded https://bellard.org/quickjs)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

quickjs-0.3.0.tbz
sha256=acb988041c31dfd942e40ca0e33f699174296dc4c3743f5fb175dead70f176eb
sha512=c3ba606ac64380d6f8a35c6bd49f7ba869dcfad66c1b23829386aad2c7ed20064e5a8f6ecfc2d5abb761648240223938deaa78774f12df1a638f15c4017c3b66

doc/quickjs.c/Libregexp/index.html

Module LibregexpSource

Low-level bindings to QuickJS's libregexp - Regular Expression Engine

ES2023-compliant regex engine with Unicode support. These are raw C bindings; for a higher-level API, use Quickjs.RegExp.

Sourceval compile : int Ctypes_static.ptr -> char Ctypes_static.ptr -> int -> string Ctypes_static.ocaml -> Unsigned.size_t -> int -> unit Ctypes_static.ptr -> Unsigned.uint8 Ctypes_static.ptr Bindings.Libregexp__c_generated_functions__Function_description__Functions.return

Compile a regular expression pattern into bytecode. Returns pointer to bytecode buffer, or NULL on error with message in error_msg.

Sourceval exec : Unsigned.uint8 Ctypes_static.ptr Ctypes_static.ptr -> Unsigned.uint8 Ctypes_static.ptr -> Unsigned.uint8 Ctypes_static.ptr -> int -> int -> int -> unit Ctypes_static.ptr -> int Bindings.Libregexp__c_generated_functions__Function_description__Functions.return

Execute a compiled regex against input string. Returns: 1 = match, 0 = no match, -1 = error

Sourceval get_capture_count : Unsigned.uint8 Ctypes_static.ptr -> int Bindings.Libregexp__c_generated_functions__Function_description__Functions.return

Get number of capture groups (including group 0 for full match)

Sourceval get_groupnames : Unsigned.uint8 Ctypes_static.ptr -> char Ctypes_static.ptr option Bindings.Libregexp__c_generated_functions__Function_description__Functions.return

Get pointer to null-terminated group names

Get flags from compiled bytecode