Skip to main content

Libraries

A library parses a .dsl file and gives what is in it: the calls, their arguments and their blocks. There is one for Java and one for npm, both named dsl-lang. Both use the parser of the language server, so they read a file exactly as the editor does, and they give the same things under the same names.

PackageFor
Javacommunity.flock.dsl:dsl-lang on Maven CentralJava 17 and later, and Kotlin
npm@flock/dsl-langNode.js and, with a bundler, a browser

Both pages read this script:

services.dsl
service("orders") {
replicas(3)
routes {
post("/orders", auth = true)
}
}

A library knows no function names: which functions a DSL has and what they take is up to the DSL. The DSL tells what the syntax is.