Closed BlackRam-oss closed 2 months ago
Constants are not considered by the Compiler. the constant values are not inserted into the compiler's Json
const story = new Compiler(test).Compile(); let json = story.ToJson(); let obj: InkStoryType try { obj = JSON.parse(json); } catch (e) { console.error("[Pixi’VN Ink] Error parsing ink file") return }
Il valore della costante doveva essere inserito nel json
CONST HASTINGS = "Hastings" CONST POIROT = "Poirot" CONST JAPP = "Japp" VAR current_chief_suspect = HASTINGS === review_evidence === { found_japps_bloodied_glove: ~ current_chief_suspect = POIROT } Current Suspect: {current_chief_suspect} ->DONE === found_japps_bloodied_glove found_japps_bloodied_glove ->DONE
json:
{ inkVersion: 21, listDefs: {}, root: [ [ [ "done", { "#n": "g-0", }, ], null, ], "done", { review_evidence: [ "ev", { "CNT?": "found_japps_bloodied_glove", }, "/ev", [ { "->": ".^.b", c: true, }, { b: [ "\n", "ev", "str", "^Poirot", "/str", "/ev", { "VAR=": "current_chief_suspect", re: true, }, { "->": ".^.^.^.4", }, null, ], }, ], "nop", "\n", "^Current Suspect: ", "ev", { "VAR?": "current_chief_suspect", }, "out", "/ev", "\n", "done", null, ], found_japps_bloodied_glove: [ "^found_japps_bloodied_glove", "\n", "done", { "#f": 1, }, ], "global decl": [ "ev", "str", "^Hastings", "/str", { "VAR=": "current_chief_suspect", }, "/ev", "end", null, ], }, ] }
Describe the bug
Constants are not considered by the Compiler. the constant values are not inserted into the compiler's Json
To Reproduce
Expected behavior
Il valore della costante doveva essere inserito nel json
Ink files
json:
Environment