about summary refs log tree commit diff stats
path: root/src/bindings/quickjs.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-04-30 12:19:24 +0200
committerbptato <nincsnevem662@gmail.com>2023-04-30 12:19:24 +0200
commita02c408f933aea6f405ed3c64ab151b01b33ae9e (patch)
tree4946f6b13da782a92a1ecc0f03402abacf2614b3 /src/bindings/quickjs.nim
parent05b64a1d8fa95381d756231f665c0b8c79787b67 (diff)
downloadchawan-a02c408f933aea6f405ed3c64ab151b01b33ae9e.tar.gz
WIP fetch
Diffstat (limited to 'src/bindings/quickjs.nim')
-rw-r--r--src/bindings/quickjs.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index 648abfb2..94b3c46e 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -264,6 +264,9 @@ const
   JS_GPN_ENUM_ONLY* = (1 shl 3)
   JS_GPN_SET_ENUM* = (1 shl 4)
 
+const
+  JS_PARSE_JSON_EXT* = (1 shl 0)
+
 template JS_CFUNC_DEF*(n: string, len: uint8, func1: JSCFunction): JSCFunctionListEntry = 
   JSCFunctionListEntry(name: cstring(n),
                        prop_flags: JS_PROP_WRITABLE or JS_PROP_CONFIGURABLE,
@@ -319,6 +322,8 @@ proc JS_NewPromiseCapability*(ctx: JSContext, resolving_funcs: ptr JSValue): JSV
 proc JS_SetOpaque*(obj: JSValue, opaque: pointer)
 proc JS_GetOpaque*(obj: JSValue, class_id: JSClassID): pointer
 proc JS_GetOpaque2*(ctx: JSContext, obj: JSValue, class_id: JSClassID): pointer
+proc JS_ParseJSON*(ctx: JSContext, buf: ptr char, buf_len: csize_t, filename: cstring): JSValue
+proc JS_ParseJSON2*(ctx: JSContext, buf: ptr char, buf_len: csize_t, filename: cstring, flags: cint): JSValue
 
 proc JS_NewClassID*(pclass_id: ptr JSClassID): JSClassID
 proc JS_NewClass*(rt: JSRuntime, class_id: JSClassID, class_def: ptr JSClassDef): cint