Compare commits

..

No commits in common. "aba77569ac147166bc73415ad65798796f48680a" and "ae6ad3436464c3f40e8389fb14877a80cfa16911" have entirely different histories.

3 changed files with 10 additions and 32 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@ludus/ludus-js-pure",
"version": "0.1.16",
"version": "0.1.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@ludus/ludus-js-pure",
"version": "0.1.16",
"version": "0.1.15",
"license": "GPL-3.0",
"devDependencies": {
"shadow-cljs": "^2.26.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ludus/ludus-js-pure",
"version": "0.1.16",
"version": "0.1.15",
"description": "A Ludus interpreter in a pure JS function.",
"type": "module",
"main": "build/ludus.mjs",

View File

@ -49,37 +49,15 @@
(set (out :draw) (post :draw))
(-> out j/encode string))
# (comment
(do
(comment
# (do
(def source `
fn strip_punctuation {
("{x},{y}") -> strip_punctuation ("{x}{y}")
("{x}.{y}") -> strip_punctuation ("{x}{y}")
("{x};{y}") -> strip_punctuation ("{x}{y}")
("{x}:{y}") -> strip_punctuation ("{x}{y}")
("{x}?{y}") -> strip_punctuation ("{x}{y}")
("{x}!{y}") -> strip_punctuation ("{x}{y}")
(x) -> x
match :foo with {
:bar -> :baz
:baz -> :quux
"thing {foo}" -> "worste"
42 -> 23
}
fn trim_left {
(" {x}") -> trim_left ("{x}")
("\n{x}") -> trim_left ("{x}")
("\t{x}") -> trim_left ("{x}")
(x) -> x
}
fn trim_right {
("{x} ") -> trim_right ("{x}")
("{x}\n") -> trim_right ("{x}")
("{x}\t") -> trim_right ("{x}")
(x) -> x
}
fn trim (x) -> do x > trim_left > trim_right
trim_left ("
foo")
`)
(def out (-> source
ludus