Fixed Lobster implementation to work with latest language features

This commit is contained in:
aardappel
2019-05-22 11:48:10 -07:00
parent b04736f9bd
commit 30ac512a54
9 changed files with 309 additions and 312 deletions

View File

@@ -1,36 +1,35 @@
// automatically generated by the FlatBuffers compiler, do not modify
include "flatbuffers.lobster"
import flatbuffers
namespace NamespaceA_NamespaceB
enum +
EnumInNestedNS_A = 0,
EnumInNestedNS_B = 1,
enum EnumInNestedNS:
EnumInNestedNS_A = 0
EnumInNestedNS_B = 1
EnumInNestedNS_C = 2
struct TableInNestedNS
class TableInNestedNS
struct StructInNestedNS
class StructInNestedNS
struct TableInNestedNS : flatbuffers_handle
class TableInNestedNS : flatbuffers_handle
def foo():
buf_.flatbuffers_field_int32(pos_, 4, 0)
return buf_.flatbuffers_field_int32(pos_, 4, 0)
def GetRootAsTableInNestedNS(buf:string): TableInNestedNS { buf, buf.flatbuffers_indirect(0) }
def GetRootAsTableInNestedNS(buf:string): return TableInNestedNS { buf, buf.flatbuffers_indirect(0) }
def TableInNestedNSStart(b_:flatbuffers_builder):
b_.StartObject(1)
def TableInNestedNSAddFoo(b_:flatbuffers_builder, foo:int):
b_.PrependInt32Slot(0, foo, 0)
def TableInNestedNSEnd(b_:flatbuffers_builder):
b_.EndObject()
return b_.EndObject()
struct StructInNestedNS : flatbuffers_handle
class StructInNestedNS : flatbuffers_handle
def a():
buf_.read_int32_le(pos_ + 0)
return buf_.read_int32_le(pos_ + 0)
def b():
buf_.read_int32_le(pos_ + 4)
return buf_.read_int32_le(pos_ + 4)
def CreateStructInNestedNS(b_:flatbuffers_builder, a:int, b:int):
b_.Prep(4, 8)