chromium/third_party/flatbuffers/src/src/idl_gen_ts.cpp

/*
 * Copyright 2014 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "idl_gen_ts.h"

#include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <unordered_map>
#include <unordered_set>

#include "flatbuffers/code_generators.h"
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/flatc.h"
#include "flatbuffers/idl.h"
#include "flatbuffers/util.h"
#include "idl_namer.h"

namespace flatbuffers {
namespace {
struct ImportDefinition {};

struct NsDefinition {};

Namer::Config TypeScriptDefaultConfig() {}

std::set<std::string> TypescriptKeywords() {}

enum AnnotationType {};

template<typename T> struct SupportsObjectAPI : std::false_type {};

template<> struct SupportsObjectAPI<StructDef> : std::true_type {};

}  // namespace

namespace ts {
// Iterate through all definitions we haven't generate code for (enums, structs,
// and tables) and output them to a single file.
class TsGenerator : public BaseGenerator {};  // namespace ts
}  // namespace ts

static bool GenerateTS(const Parser &parser, const std::string &path,
                       const std::string &file_name) {}

static std::string TSMakeRule(const Parser &parser, const std::string &path,
                              const std::string &file_name) {}

namespace {

class TsCodeGenerator : public CodeGenerator {};
}  // namespace

std::unique_ptr<CodeGenerator> NewTsCodeGenerator() {}

}  // namespace flatbuffers