Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Parsing fails with java.lang.IllegalStateException #15

Open
unkadoug opened this issue Jan 22, 2021 · 0 comments
Open

Parsing fails with java.lang.IllegalStateException #15

unkadoug opened this issue Jan 22, 2021 · 0 comments

Comments

@unkadoug
Copy link

After editing replacementFile.json to fix the json parsing problem, an attempt to translate my own kotlin files to swift fails, as follows:

$ java -jar moshbit.kotlift.jar dullahan dull.swift/ replacementFile.json
[Replacement(from=val, to=let, multiple=true), Replacement(from=null, to=nil, multiple=true), Replacement(from=this, to=self, multiple=true), Replacement(from=Unit, to=Void, multiple=true), Replacement(from=Boolean, to=Bool, multiple=true), Replacement(from=Float, to=Double, multiple=true), Replacement(from=Long, to=Int64, multiple=true), Replacement(from=Int, to=Int32, multiple=true), Replacement(from=Short, to=Int16, multiple=true), Replacement(from=Byte, to=Int8, multiple=true), Replacement(from=println, to=print, multiple=true), Replacement(from=print(), to=print(""), multiple=true), Replacement(from=interface, to=protocol, multiple=true), Replacement(from=get(), to=get, multiple=true), Replacement(from=protected, to=internal, multiple=true), Replacement(from=Collection, to=Array, multiple=true), Replacement(from=.invoke, to=, multiple=true)]
[/home/dougm/scalableHealth/HS-Dullahan-K/src/main/kotlin/edu/rice/sh/healthsense/dullahan/Interpreter.kt, /home/dougm/scalableHealth/HS-Dullahan-K/src/main/kotlin/edu/rice/sh/healthsense/dullahan/program/Program.kt, /home/dougm/scalableHealth/HS-Dullahan-K/src/main/kotlin/edu/rice/sh/healthsense/dullahan/program/instructions.kt, /home/dougm/scalableHealth/HS-Dullahan-K/src/main/kotlin/edu/rice/sh/healthsense/dullahan/program/parseXmlCode.kt, /home/dougm/scalableHealth/HS-Dullahan-K/src/main/kotlin/edu/rice/sh/healthsense/dullahan/program/uiElements.kt]
Parsing... Exception in thread "main" java.lang.IllegalStateException: Structure tree should be empty, but is [com.moshbit.kotlift.Class@50040f0c]
at com.moshbit.kotlift.Transpiler.transpile(Transpiler.kt:636)
at com.moshbit.kotlift.Transpiler.parse(Transpiler.kt:17)
at com.moshbit.kotlift.MainKt.main(Main.kt:43)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant