translator: fixed proto runtime
This commit is contained in:
@@ -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,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
|
||||||
|
|||||||
Reference in New Issue
Block a user