translator: fixed proto runtime

This commit is contained in:
e5l
2016-08-11 15:49:31 +03:00
parent 1397ead8aa
commit cf8dace083
6 changed files with 2 additions and 12 deletions
@@ -1,4 +1,3 @@
package main.kotlin
/** /**
* Created by Dmitry Savvinov on 7/6/16. * Created by Dmitry Savvinov on 7/6/16.
* *
@@ -1,4 +1,3 @@
package main.kotlin
/** /**
* Created by user on 7/6/16. * Created by user on 7/6/16.
*/ */
@@ -1,4 +1,3 @@
package main.kotlin
/** /**
* Created by user on 8/8/16. * Created by user on 8/8/16.
*/ */
@@ -14,4 +13,4 @@ class KotlinInputStream(val buffer: ByteArray) {
fun isAtEnd(): Boolean { fun isAtEnd(): Boolean {
return pos >= buffer.size return pos >= buffer.size
} }
} }
@@ -1,4 +1,3 @@
package main.kotlin
/** /**
* Created by user on 8/8/16. * Created by user on 8/8/16.
*/ */
@@ -1,8 +1,3 @@
package main.kotlin
/**
* Created by user on 7/6/16.
*/
object WireFormat { object WireFormat {
// couple of constants for magic numbers // couple of constants for magic numbers
+1 -2
View File
@@ -1,4 +1,3 @@
package main.kotlin
/** /**
* Created by Dmitry Savvinov on 7/6/16. * Created by Dmitry Savvinov on 7/6/16.
* Enum for possible WireTypes. * Enum for possible WireTypes.
@@ -15,7 +14,7 @@ enum class WireType(val id: Int) {
UNDEFINED(6); // indicates error when parsing from Int UNDEFINED(6); // indicates error when parsing from Int
companion object { companion object {
fun from(value: Byte): WireType { fun from (value: Byte): WireType {
return when (value) { return when (value) {
0.toByte() -> VARINT 0.toByte() -> VARINT
1.toByte() -> FIX_64 1.toByte() -> FIX_64