This is a js parser / interpreter in vb6 with x64 number support, COM integration and built in debugging capabilities.
This was built with claude.ai and took about 44 hrs work which is wild for what it is.
Ive already burned through 15 context size limits already.
I am using it in one of my projects and it is stable. I havent had any big problems yet, just some tweaks and small oversights. It should be pretty complete and well tested, but its big, so there will be bugs.
Compiles as a 640k ActiveX dll and has a handful of example projects to show how to use it.
Couple nuances of this engine:
- print is fancy, it can dump arrays and json objects directly
- not case sensitive myVal and myval are the same (dont care actually good)
- function aliases for built in functions is currently unsupported test = alert wont work (works with js declared fx easy fix im sure)
- no regex support (never happening - use a COM object)
- ParseJsonString will look inside string values and auto convert to number including 0x hex, even 64 bit (slightly naughty but perfect for me)
- we use true 64 bit numbers for bigint, not the js spec 53 bit
- COM methods can return native json objects directly to engine: Set myComFunc = json.ParseToCVal(s)
- COM methods can return 64bit numbers directly to engine: Dim v As New CValue: v.LoadNumFromStr(str): Set myComFunc = v
- COM methods can return vb arrays without a problem, auto converted to js array (suck that ms script control)
- can attach js helper functions to COM objects or override COM methods while still able to call real one.
- demo code created on how to sink events, not yet wired into script engine
See the (oldish) readme for the highlights and info below
Dependencies:
- core engine all vb6
- 64 bit numbers requires utypes.dll (open source C std dll)
- COM integration uses dynproxy.dll (open source C std dll - vb CallByName was to limited)
- these dlls are both loaded on demand and included in the git repo
Putting this out under MIT license because we should have all had this forever ago!
I dont really like git, but I made a public repo for this to help everyone track the latest changes. I dont use a dev or release branch so I will try to always keep repo with stable pushs only. That may not be possible if I have to make big changes, but the zip attached below will always be a stable snapshot. It may be a little older as its more work to sync manually.