Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
ace30451
Commit
ace30451
authored
Oct 19, 2015
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for JS generator in Xcode
parent
1917e577
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
project.pbxproj
build/Xcode/FlatBuffers.xcodeproj/project.pbxproj
+4
-0
idl_gen_text.cpp
src/idl_gen_text.cpp
+1
-1
idl_parser.cpp
src/idl_parser.cpp
+5
-5
No files found.
build/Xcode/FlatBuffers.xcodeproj/project.pbxproj
View file @
ace30451
...
...
@@ -13,6 +13,7 @@
61FF3C34FBEC4819A1C30F92
/* sample_text.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
ECCEBFFA6977404F858F9739
/* sample_text.cpp */
;
settings
=
{
COMPILER_FLAGS
=
""
;
};
};
8C303C591975D6A700D7C1C5
/* idl_gen_go.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8C303C581975D6A700D7C1C5
/* idl_gen_go.cpp */
;
};
8C6905FD19F835B400CB8866
/* idl_gen_fbs.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8C6905EC19F8357300CB8866
/* idl_gen_fbs.cpp */
;
};
8C78573E1BD5AE2C00C53C34
/* idl_gen_js.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8C78573D1BD5AE2C00C53C34
/* idl_gen_js.cpp */
;
};
8C8774631B703D4800E693F5
/* reflection.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8C8774621B703D4800E693F5
/* reflection.cpp */
;
};
8C8774641B703E1200E693F5
/* idl_gen_fbs.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8C6905EC19F8357300CB8866
/* idl_gen_fbs.cpp */
;
};
8CA854B31B04244A00040A06
/* idl_gen_python.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8CA854B21B04244A00040A06
/* idl_gen_python.cpp */
;
};
...
...
@@ -38,6 +39,7 @@
6AD24EEB3D024825A37741FF
/* test.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
test.cpp
;
path
=
tests/test.cpp
;
sourceTree
=
SOURCE_ROOT
;
};
8C303C581975D6A700D7C1C5
/* idl_gen_go.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
idl_gen_go.cpp
;
path
=
src/idl_gen_go.cpp
;
sourceTree
=
"<group>"
;
};
8C6905EC19F8357300CB8866
/* idl_gen_fbs.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
idl_gen_fbs.cpp
;
path
=
src/idl_gen_fbs.cpp
;
sourceTree
=
"<group>"
;
};
8C78573D1BD5AE2C00C53C34
/* idl_gen_js.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
idl_gen_js.cpp
;
path
=
src/idl_gen_js.cpp
;
sourceTree
=
"<group>"
;
};
8C8774621B703D4800E693F5
/* reflection.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
reflection.cpp
;
path
=
src/reflection.cpp
;
sourceTree
=
"<group>"
;
};
8CA854B21B04244A00040A06
/* idl_gen_python.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
idl_gen_python.cpp
;
path
=
src/idl_gen_python.cpp
;
sourceTree
=
"<group>"
;
};
8CD8717A19CB937D0012A827
/* idl_gen_general.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
name
=
idl_gen_general.cpp
;
path
=
src/idl_gen_general.cpp
;
sourceTree
=
"<group>"
;
};
...
...
@@ -54,6 +56,7 @@
28237E300FE042DEADA302D3
/* Source Files */
=
{
isa
=
PBXGroup
;
children
=
(
8C78573D1BD5AE2C00C53C34
/* idl_gen_js.cpp */
,
8CA854B21B04244A00040A06
/* idl_gen_python.cpp */
,
8C6905EC19F8357300CB8866
/* idl_gen_fbs.cpp */
,
8CD8717A19CB937D0012A827
/* idl_gen_general.cpp */
,
...
...
@@ -263,6 +266,7 @@
A9C9A99F719A4ED58DC2D2FC
/* idl_parser.cpp in Sources */
,
8CA854B31B04244A00040A06
/* idl_gen_python.cpp in Sources */
,
8CD8717B19CB937D0012A827
/* idl_gen_general.cpp in Sources */
,
8C78573E1BD5AE2C00C53C34
/* idl_gen_js.cpp in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
src/idl_gen_text.cpp
View file @
ace30451
...
...
@@ -62,7 +62,7 @@ template<typename T> void Print(T val, Type type, int /*indent*/,
}
if
(
type
.
base_type
==
BASE_TYPE_BOOL
)
{
text
+=
val
?
"true"
:
"false"
;
text
+=
val
!=
0
?
"true"
:
"false"
;
}
else
{
text
+=
NumToString
(
val
);
}
...
...
src/idl_parser.cpp
View file @
ace30451
...
...
@@ -1046,14 +1046,14 @@ void Parser::ParseDecl() {
BaseType
basetype
)
{
auto
len
=
strlen
(
suffix
);
for
(
auto
it
=
fields
.
begin
();
it
!=
fields
.
end
();
++
it
)
{
auto
&
name
=
(
*
it
)
->
name
;
if
(
name
.
length
()
>
len
&&
name
.
compare
(
name
.
length
()
-
len
,
len
,
suffix
)
==
0
&&
auto
&
f
name
=
(
*
it
)
->
name
;
if
(
f
name
.
length
()
>
len
&&
fname
.
compare
(
f
name
.
length
()
-
len
,
len
,
suffix
)
==
0
&&
(
*
it
)
->
value
.
type
.
base_type
!=
BASE_TYPE_UTYPE
)
{
auto
field
=
struct_def
.
fields
.
Lookup
(
name
.
substr
(
0
,
name
.
length
()
-
len
));
fname
.
substr
(
0
,
f
name
.
length
()
-
len
));
if
(
field
&&
field
->
value
.
type
.
base_type
==
basetype
)
Error
(
"Field "
+
name
+
Error
(
"Field "
+
f
name
+
" would clash with generated functions for field "
+
field
->
name
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment