() define scope and data, just like in the grammar definition.
The language relies on a powerful concept: Paths and Groups. Unlike C-style languages with statements, Chimerix flows through transformations.
; Defining a list of constants
Config = [
"localhost"
8080
true
]
Comments start with a semicolon ;. This keeps the hash # free for other operators or
macros if needed in the future.
Uniquely, Chimerix uses special string literals called "Paragraphs" and "Cat Strings". Why? Because documentation matters.
doc = ,,,
header This is a raw doc
It can contain multi-line text
without escaping quotes.
,,,
; A mock implementation of a router
Router = (
get = (path, handler) ->
register:"GET":path:handler
)
App = Router.(
route = get:"/home":(res -> res:send:"Hello")
)