V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
file-visitor.h
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_TORQUE_FILE_VISITOR_H_
6 #define V8_TORQUE_FILE_VISITOR_H_
7 
8 #include <deque>
9 #include <string>
10 
11 #include "src/torque/ast.h"
12 #include "src/torque/global-context.h"
13 #include "src/torque/types.h"
14 #include "src/torque/utils.h"
15 
16 namespace v8 {
17 namespace internal {
18 namespace torque {
19 
20 class FileVisitor {
21  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  return result;
28  }
29 
30  protected:
31  std::string GetParameterVariableFromName(const std::string& name) {
32  return std::string("p_") + name;
33  }
34 
35  Signature MakeSignature(const CallableNodeSignature* signature);
36 };
37 
38 } // namespace torque
39 } // namespace internal
40 } // namespace v8
41 
42 #endif // V8_TORQUE_FILE_VISITOR_H_
Definition: libplatform.h:13