mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
TypeScript support (#4232)
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
adc50051e0
commit
28e7dbd3d3
@@ -135,6 +135,20 @@ std::string BaseGenerator::WrapInNameSpace(const Definition &def) const {
|
||||
return WrapInNameSpace(def.defined_namespace, def.name);
|
||||
}
|
||||
|
||||
std::string BaseGenerator::GetNameSpace(const Definition &def) const {
|
||||
const Namespace *ns = def.defined_namespace;
|
||||
if (CurrentNameSpace() == ns) return "";
|
||||
std::string qualified_name = qualifying_start_;
|
||||
for (auto it = ns->components.begin(); it != ns->components.end(); ++it) {
|
||||
qualified_name += *it;
|
||||
if (std::next(it) != ns->components.end()) {
|
||||
qualified_name += qualifying_separator_;
|
||||
}
|
||||
}
|
||||
|
||||
return qualified_name;
|
||||
}
|
||||
|
||||
// Generate a documentation comment, if available.
|
||||
void GenComment(const std::vector<std::string> &dc, std::string *code_ptr,
|
||||
const CommentConfig *config, const char *prefix) {
|
||||
|
||||
Reference in New Issue
Block a user