Skip to content

Commit

Permalink
Removing PR kaitai-io#134 for now, because things are more complicate…
Browse files Browse the repository at this point in the history
…d for KS and its support for other languages and use-cases than I expected. I was able to rewrite my KS for now because of the usage of FMPP, so don't rely in this fix anymore. this way I'm more back in line with master again.
  • Loading branch information
tschoening committed Apr 1, 2018
1 parent 54c74d0 commit cfc7712
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class JavaCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
out.puts(s"${privateMemberName(id)} = new ${kaitaiType2JavaType(ArrayType(dataType))}();")
out.puts("{")
out.inc
out.puts(s"${kaitaiType2JavaType(dataType)} ${translator.doName(Identifier.ITERATOR)} = null;")
out.puts(s"${kaitaiType2JavaType(dataType)} ${translator.doName("_")};")
out.puts("int i = 0;")
out.puts("do {")
out.inc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ class RubyCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
if (needRaw)
out.puts(s"${privateMemberName(RawIdentifier(id))} = []")
out.puts(s"${privateMemberName(id)} = []")
out.puts(s"${translator.doName(Identifier.ITERATOR)} = nil")
out.puts("i = 0")
out.puts("begin")
out.inc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class RubyTranslator(provider: TypeProvider) extends BaseTranslator(provider) {

override def doName(s: String) = {
s match {
case Identifier.ITERATOR => "_it"
case Identifier.INDEX => "i" // FIXME: probably would clash with attribute named "i"
case _ => s
}
Expand Down

0 comments on commit cfc7712

Please sign in to comment.