From 351237271f8109b247ed28f58ca2f281d389c2be Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 16 May 2023 13:06:38 -0600 Subject: [PATCH] ktxt2 lix fix --- projects/_standalone/ktxt2/.haxerc | 4 ++++ .../_standalone/ktxt2/haxe_libraries/bad-nlp.hxml | 7 +++++++ .../ktxt2/haxe_libraries/haxe-strings.hxml | 5 +++++ .../_standalone/ktxt2/haxe_libraries/hscript.hxml | 5 +++++ .../_standalone/ktxt2/haxe_libraries/hxnodejs.hxml | 7 +++++++ .../ktxt2/haxe_libraries/kiss-vscode-api.hxml | 8 ++++++++ projects/_standalone/ktxt2/haxe_libraries/kiss.hxml | 12 ++++++++++++ .../_standalone/ktxt2/haxe_libraries/re-flex.hxml | 5 +++++ .../_standalone/ktxt2/haxe_libraries/tink_core.hxml | 3 +++ .../_standalone/ktxt2/haxe_libraries/tink_json.hxml | 4 ++++ .../_standalone/ktxt2/haxe_libraries/tink_macro.hxml | 4 ++++ .../ktxt2/haxe_libraries/tink_priority.hxml | 3 +++ .../ktxt2/haxe_libraries/tink_syntaxhub.hxml | 6 ++++++ .../ktxt2/haxe_libraries/tink_typecrawler.hxml | 4 ++++ projects/_standalone/ktxt2/haxe_libraries/uuid.hxml | 3 +++ .../_standalone/ktxt2/haxe_libraries/vscode.hxml | 4 ++++ projects/_standalone/ktxt2/haxe_libraries/yaml.hxml | 3 +++ projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.hx | 6 +++++- .../_standalone/ktxt2/src/ktxt2/KTxt2Editor.kiss | 2 +- .../src/ktxt2/conversions/FountainToHollywoo.kiss | 7 ++++--- 20 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 projects/_standalone/ktxt2/.haxerc create mode 100644 projects/_standalone/ktxt2/haxe_libraries/bad-nlp.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/haxe-strings.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/hscript.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/hxnodejs.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/kiss-vscode-api.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/kiss.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/re-flex.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_core.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_json.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_macro.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_priority.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_syntaxhub.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/tink_typecrawler.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/uuid.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/vscode.hxml create mode 100644 projects/_standalone/ktxt2/haxe_libraries/yaml.hxml diff --git a/projects/_standalone/ktxt2/.haxerc b/projects/_standalone/ktxt2/.haxerc new file mode 100644 index 00000000..dc3cec2f --- /dev/null +++ b/projects/_standalone/ktxt2/.haxerc @@ -0,0 +1,4 @@ +{ + "version": "4.3.1", + "resolveLibs": "scoped" +} \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/bad-nlp.hxml b/projects/_standalone/ktxt2/haxe_libraries/bad-nlp.hxml new file mode 100644 index 00000000..58be28f3 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/bad-nlp.hxml @@ -0,0 +1,7 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/bad-nlp#109301d23c4f1e9df34cd570f4249d6b9120b561" into bad-nlp/0.0.0/github/109301d23c4f1e9df34cd570f4249d6b9120b561 +# @run: haxelib run-dir bad-nlp "${HAXE_LIBCACHE}/bad-nlp/0.0.0/github/109301d23c4f1e9df34cd570f4249d6b9120b561" +-lib haxe-strings +-lib kiss +-lib yaml +-cp ${HAXE_LIBCACHE}/bad-nlp/0.0.0/github/109301d23c4f1e9df34cd570f4249d6b9120b561/src/ +-D bad-nlp=0.0.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/haxe-strings.hxml b/projects/_standalone/ktxt2/haxe_libraries/haxe-strings.hxml new file mode 100644 index 00000000..e5c6cbd9 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/haxe-strings.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "haxelib:/haxe-strings#7.0.2" into haxe-strings/7.0.2/haxelib +-cp ${HAXE_LIBCACHE}/haxe-strings/7.0.2/haxelib/src/ +-D haxe-strings=7.0.2 +--macro hx.strings.internal.Macros.addDefines() +--macro hx.strings.internal.Macros.configureNullSafety() diff --git a/projects/_standalone/ktxt2/haxe_libraries/hscript.hxml b/projects/_standalone/ktxt2/haxe_libraries/hscript.hxml new file mode 100644 index 00000000..106e1f88 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/hscript.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "haxelib:/hscript#2.5.0" into hscript/2.5.0/haxelib +# @run: haxelib run-dir hscript "${HAXE_LIBCACHE}/hscript/2.5.0/haxelib" +-cp ${HAXE_LIBCACHE}/hscript/2.5.0/haxelib/ +-D hscript=2.5.0 +--macro keep('IntIterator') \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/hxnodejs.hxml b/projects/_standalone/ktxt2/haxe_libraries/hxnodejs.hxml new file mode 100644 index 00000000..577e96a5 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/hxnodejs.hxml @@ -0,0 +1,7 @@ +# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib +-cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src +-D hxnodejs=12.1.0 +--macro allowPackage('sys') +# should behave like other target defines and not be defined in macro context +--macro define('nodejs') +--macro _internal.SuppressDeprecated.run() diff --git a/projects/_standalone/ktxt2/haxe_libraries/kiss-vscode-api.hxml b/projects/_standalone/ktxt2/haxe_libraries/kiss-vscode-api.hxml new file mode 100644 index 00000000..2ac3c99a --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/kiss-vscode-api.hxml @@ -0,0 +1,8 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/kiss-vscode-api#1540b8f5024d51994234b1d812e74db774f5cd94" into kiss-vscode-api/0.0.0/github/1540b8f5024d51994234b1d812e74db774f5cd94 +# @run: haxelib run-dir kiss-vscode-api "${HAXE_LIBCACHE}/kiss-vscode-api/0.0.0/github/1540b8f5024d51994234b1d812e74db774f5cd94" +-lib hxnodejs +-lib kiss +-lib re-flex +-lib vscode +-cp ${HAXE_LIBCACHE}/kiss-vscode-api/0.0.0/github/1540b8f5024d51994234b1d812e74db774f5cd94/src/ +-D kiss-vscode-api=0.0.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/kiss.hxml b/projects/_standalone/ktxt2/haxe_libraries/kiss.hxml new file mode 100644 index 00000000..0872245e --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/kiss.hxml @@ -0,0 +1,12 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/kiss#63576057ac6acada5580ec223e8886ad85f5416f" into kiss/0.0.1/github/63576057ac6acada5580ec223e8886ad85f5416f +# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/63576057ac6acada5580ec223e8886ad85f5416f" +-lib haxe-strings +-lib hscript +-lib tink_json +-lib tink_macro +-lib tink_syntaxhub +-lib uuid +-cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/63576057ac6acada5580ec223e8886ad85f5416f/src/ +-D kiss=0.0.1 +-w -WUnusedPattern +--macro kiss.KissFrontend.use() \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/re-flex.hxml b/projects/_standalone/ktxt2/haxe_libraries/re-flex.hxml new file mode 100644 index 00000000..cd684019 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/re-flex.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/re-flex#af60a7f889511361c10f34b93679637ff43cfa09" into re-flex/0.0.0/github/af60a7f889511361c10f34b93679637ff43cfa09 +# @run: haxelib run-dir re-flex "${HAXE_LIBCACHE}/re-flex/0.0.0/github/af60a7f889511361c10f34b93679637ff43cfa09" +-lib kiss +-cp ${HAXE_LIBCACHE}/re-flex/0.0.0/github/af60a7f889511361c10f34b93679637ff43cfa09/src/ +-D re-flex=0.0.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_core.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_core.hxml new file mode 100644 index 00000000..37a0d96a --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_core.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/tink_core#2.1.0" into tink_core/2.1.0/haxelib +-cp ${HAXE_LIBCACHE}/tink_core/2.1.0/haxelib/src +-D tink_core=2.1.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_json.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_json.hxml new file mode 100644 index 00000000..b167de7c --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_json.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_json#0.11.0" into tink_json/0.11.0/haxelib +-lib tink_typecrawler +-cp ${HAXE_LIBCACHE}/tink_json/0.11.0/haxelib/src +-D tink_json=0.11.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_macro.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_macro.hxml new file mode 100644 index 00000000..a9e19b1f --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_macro.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_macro#1.0.1" into tink_macro/1.0.1/haxelib +-lib tink_core +-cp ${HAXE_LIBCACHE}/tink_macro/1.0.1/haxelib/src +-D tink_macro=1.0.1 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_priority.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_priority.hxml new file mode 100644 index 00000000..98cfa803 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_priority.hxml @@ -0,0 +1,3 @@ +-D tink_priority=0.1.3 +# @install: lix --silent download "gh://github.com/haxetink/tink_priority#ea736d31dc788aae703a2aa415c25d5b80d0e7d1" into tink_priority/0.1.3/github/ea736d31dc788aae703a2aa415c25d5b80d0e7d1 +-cp ${HAXE_LIBCACHE}/tink_priority/0.1.3/github/ea736d31dc788aae703a2aa415c25d5b80d0e7d1/src diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_syntaxhub.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_syntaxhub.hxml new file mode 100644 index 00000000..e3c7d2b2 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_syntaxhub.hxml @@ -0,0 +1,6 @@ +# @install: lix --silent download "gh://github.com/haxetink/tink_syntaxhub#b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86" into tink_syntaxhub/0.6.0/github/b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86 +-lib tink_macro +-lib tink_priority +-cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.6.0/github/b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86/src +-D tink_syntaxhub=0.6.0 +--macro tink.SyntaxHub.use() \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/tink_typecrawler.hxml b/projects/_standalone/ktxt2/haxe_libraries/tink_typecrawler.hxml new file mode 100644 index 00000000..373aee96 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/tink_typecrawler.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_typecrawler#0.7.0" into tink_typecrawler/0.7.0/haxelib +-lib tink_macro +-cp ${HAXE_LIBCACHE}/tink_typecrawler/0.7.0/haxelib/src +-D tink_typecrawler=0.7.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/uuid.hxml b/projects/_standalone/ktxt2/haxe_libraries/uuid.hxml new file mode 100644 index 00000000..ff1269ba --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/uuid.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/uuid#2.4.1" into uuid/2.4.1/haxelib +-cp ${HAXE_LIBCACHE}/uuid/2.4.1/haxelib/src +-D uuid=2.4.1 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/vscode.hxml b/projects/_standalone/ktxt2/haxe_libraries/vscode.hxml new file mode 100644 index 00000000..1925a8ca --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/vscode.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/vscode#1.60.0" into vscode/1.60.0/haxelib +-lib hxnodejs +-cp ${HAXE_LIBCACHE}/vscode/1.60.0/haxelib/src +-D vscode=1.60.0 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/haxe_libraries/yaml.hxml b/projects/_standalone/ktxt2/haxe_libraries/yaml.hxml new file mode 100644 index 00000000..abd2e4c7 --- /dev/null +++ b/projects/_standalone/ktxt2/haxe_libraries/yaml.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/yaml#2.0.1" into yaml/2.0.1/haxelib +-cp ${HAXE_LIBCACHE}/yaml/2.0.1/haxelib/ +-D yaml=2.0.1 \ No newline at end of file diff --git a/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.hx b/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.hx index 7ff7036b..c85fdc9d 100644 --- a/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.hx +++ b/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.hx @@ -41,4 +41,8 @@ typedef Disposable = { }; @:build(kiss.Kiss.build()) -class KTxt2Editor {} +class KTxt2Editor { + static function main() { + _main(); + } +} diff --git a/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.kiss b/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.kiss index c47f8391..c8f4eb3b 100644 --- a/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.kiss +++ b/projects/_standalone/ktxt2/src/ktxt2/KTxt2Editor.kiss @@ -37,7 +37,7 @@ ,@b (setState ,s))) -(function main [] +(function _main [] (set _vscode (EditorExterns.acquireVsCodeApi)) (set window EditorExterns.window) (set document window.document) diff --git a/projects/_standalone/ktxt2/src/ktxt2/conversions/FountainToHollywoo.kiss b/projects/_standalone/ktxt2/src/ktxt2/conversions/FountainToHollywoo.kiss index 624b6143..091cd5c1 100644 --- a/projects/_standalone/ktxt2/src/ktxt2/conversions/FountainToHollywoo.kiss +++ b/projects/_standalone/ktxt2/src/ktxt2/conversions/FountainToHollywoo.kiss @@ -35,13 +35,14 @@ (and (isUpperCase name) {(stream.dropWhitespace) !(stream.isEmpty)})) ->stream (let [name (whenLet [(Some name) (stream.takeLine)] (.trim (name.replace "(CONT'D)" ""))) - &mut output ""] + &mut output []] (loop (let [wryly (ifLet [(Some w) (stream.takeBetween "(" ")\n")] w "") line (ifLet [(Some l) (stream.takeLine)] (l.trim) (break))] (when line - (+= output "NORMALSPEECH \"${name}\" \"${wryly}\" ##\"${line}\"##\n")))) - output))) + (output.push "NORMALSPEECH \"${name}\" \"${wryly}\" ##\"${line}\"##")))) + (output.push "") + (output.join "\n")))) (registerConversion (new ktxt2.StreamConversion "Label" "fountain" "hollywoo"