mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 14:12:02 +00:00
FlatBuffers implementation for the Lobster programming language
Language, see: http://strlen.com/lobster/ and https://github.com/aardappel/lobster
This commit is contained in:
40
tests/namespace_test/namespace_test1_generated.lobster
Normal file
40
tests/namespace_test/namespace_test1_generated.lobster
Normal file
@@ -0,0 +1,40 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
include "flatbuffers.lobster"
|
||||
|
||||
namespace NamespaceA_NamespaceB
|
||||
|
||||
enum +
|
||||
EnumInNestedNS_A = 0,
|
||||
EnumInNestedNS_B = 1,
|
||||
EnumInNestedNS_C = 2
|
||||
|
||||
struct TableInNestedNS
|
||||
|
||||
struct StructInNestedNS
|
||||
|
||||
struct TableInNestedNS : flatbuffers_handle
|
||||
def foo():
|
||||
buf_.flatbuffers_field_int32(pos_, 4, 0)
|
||||
|
||||
def GetRootAsTableInNestedNS(buf:string): 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()
|
||||
|
||||
struct StructInNestedNS : flatbuffers_handle
|
||||
def a():
|
||||
buf_.read_int32_le(pos_ + 0)
|
||||
def b():
|
||||
buf_.read_int32_le(pos_ + 4)
|
||||
|
||||
def CreateStructInNestedNS(b_:flatbuffers_builder, a:int, b:int):
|
||||
b_.Prep(4, 8)
|
||||
b_.PrependInt32(b)
|
||||
b_.PrependInt32(a)
|
||||
return b_.Offset()
|
||||
|
||||
Reference in New Issue
Block a user