hql-lang
v0.2.1
Published
HQL language runtime and JavaScript compiler
Maintainers
Readme
HQL
HQL is a Lisp-family language that compiles to JavaScript.
This package contains the standalone HQL language runtime and compiler entry point. Host products can embed HQL through explicit adapters without making the language package depend on a host runtime, binary, or agent SDK.
Browser
import { run, transpile } from "hql-lang/browser";No-build HTML pages can load auto.js from an npm CDN and run inline HQL:
<script
type="module"
src="https://unpkg.com/[email protected]/auto.js">
</script>
<script type="text/hql">
(js-call console "log" (+ 1 2))
</script>Development loader (in-browser type-checking)
auto.js runs your HQL but does not type-check it. During development, point at
dev.js instead: same zero-config <script>, same app.hql, but it runs the
full TypeScript type-check in the browser (diagnostics print to the console; the
app still runs). It is larger (it bundles the compiler + type libraries), so it
is for the edit→refresh loop only — ship auto.js to production.
<script
type="module"
src="https://unpkg.com/[email protected]/dev.js">
</script>