mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 13:34:13 +00:00
Fixed Lobster implementation to work with latest language features
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user