DIY programming language LK, inspired by Lua.
MIT License
| English
go
go install github.com/lollipopkit/lk@latest
lk --help
# REPL
lk
# .lk(c)
lk <file>
# .lk
lk -c <file>
# .lk
lk -a <file>
// http
resp, code, err := http.req(
'POST', // Method
'https://http.lolli.tech/post', // URL
{'accept': 'application/json'}, // Headers
{'foo': 'bar'} // Body
)
if err != nil {
errorf('http req: %s', err) // error(f)
}
printf('code: %d, body: %s', code, resp)
// json
obj, err := json(resp)
if err != nil {
errorf('json parse: %s', err)
}
foo := obj['json']['foo']
//
if foo != nil and foo:match('[bar]{3}') {
printf('match: %s', foo)
}
//
/* */
repeat
, until
, goto
, ..
(concat
)`
range
( paris
)a ? b : c
a == nil ? b : a
-> a ?? b
shy a = b
-> a := b
shy a = fn(b) {rt c}
-> shy a = fn(b) => c
a++
a+=b
=
-> :
, eg: {a = 'a'}
-> {a: 'a'}
0
metatable
a.0
( a[0]
)lk args.lk arg1
-> os.args
== [lk, args.lk, arg1]
)./lk
LANG.md
test
lollipopkit 2023 GPL v3