file-visitor.h 879 Bytes
Newer Older
1 2 3 4 5 6 7
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_TORQUE_FILE_VISITOR_H_
#define V8_TORQUE_FILE_VISITOR_H_

8
#include <deque>
9 10 11 12 13 14 15 16 17 18 19 20 21
#include <string>

#include "src/torque/ast.h"
#include "src/torque/global-context.h"
#include "src/torque/types.h"
#include "src/torque/utils.h"

namespace v8 {
namespace internal {
namespace torque {

class FileVisitor {
 public:
22
  TypeVector GetTypeVector(const std::vector<TypeExpression*>& v) {
23
    TypeVector result;
24
    for (TypeExpression* t : v) {
25
      result.push_back(Declarations::GetType(t));
26 27 28 29 30
    }
    return result;
  }

 protected:
31
  Signature MakeSignature(const CallableNodeSignature* signature);
32 33 34 35 36 37 38
};

}  // namespace torque
}  // namespace internal
}  // namespace v8

#endif  // V8_TORQUE_FILE_VISITOR_H_