Added namespaced way to refer to types in schemas.

Also made proper namespacing work for enums.

You can now say namespace.MyTable as the type when declaring
a field that refers to a type in a different namespace.

Previously, it would work just referring to MyTable, however
with the recent commit fixing namespaced types this now
is ambiguous.

Change-Id: Ieaa3f4ac1662b8c4dc1f16e1898ea3cdb02e10fd
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-05-08 15:04:53 -07:00
parent ecb27817ca
commit 39833d7cf0
3 changed files with 35 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ table Monster {
/// multiline too
testarrayoftables:[Monster] (id: 11);
testarrayofstring:[string] (id: 10);
enemy:Monster (id:12);
enemy:MyGame.Example.Monster (id:12); // Test referring by full namespace.
test:Any (id: 8);
test4:[Test] (id: 9);
testnestedflatbuffer:[ubyte] (id:13, nested_flatbuffer: "Monster");