hank-vscode show errors
Some checks failed
/ test (push) Failing after 47s

This commit is contained in:
2025-10-29 19:03:55 -05:00
parent e8f4d12ba3
commit 99c64198c8
2 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/NQN/hank#a7bd12074c88b29a58d68eba720c657f6a267cc6" into hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6
# @run: haxelib run-dir hank "${HAXE_LIBCACHE}/hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6"
-lib hscript
-lib utest
-cp ${HAXE_LIBCACHE}/hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6/
-cp /Users/nat/repos/hank
-D hank=0.0.8
--macro Sys.println("haxe_libraries/hank.hxml:4: [Warning] Using dev version of library hank")

View File

@@ -13,7 +13,9 @@
(localFunction elementFor [:Story story :Dynamic document]
(let [:Dynamic d (document.createElement "div")]
(loop
(case (story.nextFrame)
(case (try
(story.nextFrame)
(catch [e] (errorMessage "$e") Finished))
((HasText t) (let [p (document.createElement "p")]
(set p.innerHTML t)
(d.appendChild p)))
@@ -37,7 +39,9 @@
->[document type data]
(case type
("choose"
(story.choose data)
(try
(story.choose data)
(catch [e] (errorMessage "$e")))
(set document.body.innerHTML "")
(document.body.appendChild (elementFor story document)))
(never otherwise))))