/src/hermes/lib/Parser/JSParserImpl.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) Meta Platforms, Inc. and affiliates. |
3 | | * |
4 | | * This source code is licensed under the MIT license found in the |
5 | | * LICENSE file in the root directory of this source tree. |
6 | | */ |
7 | | |
8 | | #ifndef HERMES_PARSER_JSPARSERIMPL_H |
9 | | #define HERMES_PARSER_JSPARSERIMPL_H |
10 | | |
11 | | #include "hermes/AST/Config.h" |
12 | | #include "hermes/AST/Context.h" |
13 | | #include "hermes/AST/ESTree.h" |
14 | | #include "hermes/Parser/JSLexer.h" |
15 | | #include "hermes/Parser/JSParser.h" |
16 | | #include "hermes/Parser/PreParser.h" |
17 | | #include "hermes/Support/Compiler.h" |
18 | | |
19 | | #include "llvh/ADT/ArrayRef.h" |
20 | | #include "llvh/ADT/Optional.h" |
21 | | #include "llvh/ADT/SmallVector.h" |
22 | | #include "llvh/ADT/StringRef.h" |
23 | | #include "llvh/Support/DataTypes.h" |
24 | | |
25 | | #include <utility> |
26 | | |
27 | | namespace hermes { |
28 | | namespace parser { |
29 | | namespace detail { |
30 | | |
31 | | using llvh::ArrayRef; |
32 | | using llvh::None; |
33 | | using llvh::Optional; |
34 | | |
35 | | /// A convenience class to encapsulate passing multiple boolean parameters |
36 | | /// between parser functions. |
37 | | class Param { |
38 | | unsigned flags_; |
39 | | |
40 | | public: |
41 | 686k | constexpr Param() : flags_(0) {} |
42 | 5.45M | constexpr explicit Param(unsigned f) : flags_(f) {} |
43 | | |
44 | 0 | constexpr Param operator+(Param b) const { |
45 | 0 | return Param{flags_ | b.flags_}; |
46 | 0 | } |
47 | 0 | constexpr Param operator-(Param b) const { |
48 | 0 | return Param{flags_ & ~(b.flags_)}; |
49 | 0 | } |
50 | | |
51 | | /// \return true if any of the flags in \p p are set in this instance. |
52 | 3.40M | bool has(Param p) const { |
53 | 3.40M | return flags_ & p.flags_; |
54 | 3.40M | } |
55 | | |
56 | | /// \return true if all of the flags in \p p are set in this instance. |
57 | 0 | bool hasAll(Param p) const { |
58 | 0 | return (flags_ & p.flags_) == p.flags_; |
59 | 0 | } |
60 | | |
61 | | /// \return \p p if at least on of its bits is set in this instance, |
62 | | /// otherwise returns an empty param. |
63 | 5.45M | constexpr Param get(Param p) const { |
64 | 5.45M | return Param{flags_ & p.flags_}; |
65 | 5.45M | } |
66 | | |
67 | | template <typename... T> |
68 | | constexpr Param get(Param p, T... tail) const { |
69 | | return Param{get(p).flags_ | get(tail...).flags_}; |
70 | | } |
71 | | }; |
72 | | |
73 | | /// If set, "in" is recognized as a binary operator in RelationalExpression. |
74 | | static constexpr Param ParamIn{1 << 0}; |
75 | | static constexpr Param ParamReturn{1 << 1}; |
76 | | static constexpr Param ParamDefault{1 << 2}; |
77 | | static constexpr Param ParamTagged{1 << 3}; |
78 | | |
79 | | /// An EcmaScript 5.1 parser. |
80 | | /// It is a standard recursive descent LL(1) parser with no tricks. The only |
81 | | /// complication, is the need to communicate information to the lexer whether |
82 | | /// a regexp is allowed or not. |
83 | | /// We go to some effort to avoid the need for more than one token lookahead |
84 | | /// for performance. Some things (like recognizing a label) would have been |
85 | | /// simplified with larger lookahead. |
86 | | class JSParserImpl { |
87 | | public: |
88 | | explicit JSParserImpl( |
89 | | Context &context, |
90 | | std::unique_ptr<llvh::MemoryBuffer> input); |
91 | | |
92 | | explicit JSParserImpl(Context &context, uint32_t bufferId, ParserPass pass); |
93 | | |
94 | | JSParserImpl(Context &context, llvh::StringRef input) |
95 | | : JSParserImpl( |
96 | | context, |
97 | 0 | llvh::MemoryBuffer::getMemBuffer(input, "JavaScript")) {} |
98 | | |
99 | | JSParserImpl(Context &context, llvh::MemoryBufferRef input) |
100 | 0 | : JSParserImpl(context, llvh::MemoryBuffer::getMemBuffer(input)) {} |
101 | | |
102 | 0 | Context &getContext() { |
103 | 0 | return context_; |
104 | 0 | } |
105 | | |
106 | 0 | JSLexer &getLexer() { |
107 | 0 | return lexer_; |
108 | 0 | } |
109 | | |
110 | 204k | bool isStrictMode() const { |
111 | 204k | return lexer_.isStrictMode(); |
112 | 204k | } |
113 | | |
114 | 99.7k | void setStrictMode(bool mode) { |
115 | 99.7k | lexer_.setStrictMode(mode); |
116 | 99.7k | } |
117 | | |
118 | 199k | llvh::SmallVector<UniqueString *, 1> &getSeenDirectives() { |
119 | 199k | return seenDirectives_; |
120 | 199k | } |
121 | | |
122 | | /// Copy the seen directives from a vector of \c UniqueString* into a vector |
123 | | /// of \c SmallString to be stored in \c PreParseFunctionInfo safely. |
124 | | llvh::SmallVector<llvh::SmallString<24>, 1> copySeenDirectives() const; |
125 | | |
126 | | Optional<ESTree::ProgramNode *> parse(); |
127 | | |
128 | 0 | void seek(SMLoc startPos) { |
129 | 0 | lexer_.seek(startPos); |
130 | 0 | tok_ = lexer_.advance(); |
131 | 0 | } |
132 | | |
133 | | /// Parse the given buffer id, indexing all functions and storing them in the |
134 | | /// \p Context. On failure returns nullptr. |
135 | | /// On success, returns a pointer to the \c JSParserImpl object that can be |
136 | | /// queried for various attributes of the just pre-parsed file, e.g. static |
137 | | /// builtins or magic URLs. |
138 | | static std::shared_ptr<JSParserImpl> preParseBuffer( |
139 | | Context &context, |
140 | | uint32_t bufferId); |
141 | | |
142 | | /// Parse the AST of a specified function type at a given starting point. |
143 | | /// This is used for lazy compilation to parse and compile the function on |
144 | | /// the first call. |
145 | | Optional<ESTree::NodePtr> parseLazyFunction( |
146 | | ESTree::NodeKind kind, |
147 | | bool paramYield, |
148 | | bool paramAwait, |
149 | | SMLoc start); |
150 | | |
151 | | /// Return true if the parser detected 'use static builtin' directive from the |
152 | | /// source. |
153 | 154 | bool getUseStaticBuiltin() const { |
154 | 154 | return useStaticBuiltin_; |
155 | 154 | } |
156 | | |
157 | | private: |
158 | | /// Called when the parser detects 'use static builtin' directive from the |
159 | | /// source. |
160 | 0 | void setUseStaticBuiltin() { |
161 | 0 | useStaticBuiltin_ = true; |
162 | 0 | } |
163 | | |
164 | | /// Called during construction to initialize Identifiers used for parsing, |
165 | | /// such as "var". The lexer and parser uses these to avoid passing strings |
166 | | /// around. |
167 | | void initializeIdentifiers(); |
168 | | |
169 | | /// Current compilation context. |
170 | | Context &context_; |
171 | | /// Source error and buffer manager. |
172 | | SourceErrorManager &sm_; |
173 | | /// Source code lexer. |
174 | | JSLexer lexer_; |
175 | | /// Current token. |
176 | | const Token *tok_{}; |
177 | | /// The current parser mode (see \p ParserPass). |
178 | | ParserPass pass_{FullParse}; |
179 | | /// Function offsets. PreParse mode fills it in, LazyParse mode uses it |
180 | | /// to skip spans while parsing. |
181 | | PreParsedBufferInfo *preParsed_{nullptr}; |
182 | | |
183 | | /// Track the parser recursion depth to avoid stack overflow. |
184 | | /// We don't have to track it precisely as long as we increment it once in |
185 | | /// every possible recursion cycle. |
186 | | unsigned recursionDepth_{0}; |
187 | | |
188 | | /// Self-explanatory: the maximum depth of parser recursion. |
189 | | static constexpr unsigned MAX_RECURSION_DEPTH = |
190 | | #ifdef HERMES_LIMIT_STACK_DEPTH |
191 | | 128 |
192 | | #elif defined(_MSC_VER) && defined(HERMES_SLOW_DEBUG) |
193 | | 128 |
194 | | #elif defined(_MSC_VER) && defined(__clang__) && !defined(NDEBUG) |
195 | | 128 |
196 | | #elif defined(_MSC_VER) |
197 | | 512 |
198 | | #else |
199 | | 1024 |
200 | | #endif |
201 | | ; |
202 | | |
203 | | /// Set when the parser sees the 'use static builtin' directive in any scope. |
204 | | bool useStaticBuiltin_{false}; |
205 | | |
206 | | /// Set when the parser is inside a generator function. |
207 | | /// This is used when checking if `yield` is a valid Identifier name. |
208 | | bool paramYield_{false}; |
209 | | |
210 | | /// Set when the parser is inside an async function. |
211 | | /// This is used when checking if `await` is a valid Identifier name. |
212 | | bool paramAwait_{false}; |
213 | | |
214 | | /// Appended when the parser has seen an directive being visited in the |
215 | | /// current function scope (It's intended to be used with |
216 | | /// `SaveStrictModeAndSeenDirectives`). |
217 | | /// This is used to store directives for lazy functions in the preParse pass, |
218 | | /// so we can recover directive nodes back in the lazyParse pass. |
219 | | llvh::SmallVector<UniqueString *, 1> seenDirectives_{}; |
220 | | |
221 | | #if HERMES_PARSE_JSX |
222 | | /// Incremented when inside a JSX tag and decremented when leaving it. |
223 | | /// Used to know whether to lex JS values or JSX text. |
224 | | uint32_t jsxDepth_{0}; |
225 | | #endif |
226 | | |
227 | | #if HERMES_PARSE_FLOW |
228 | | bool allowAnonFunctionType_{false}; |
229 | | Optional<UniqueString *> parseRenderTypeOperator(); |
230 | | #endif |
231 | | #if HERMES_PARSE_FLOW || HERMES_PARSE_TS |
232 | | bool allowConditionalType_{false}; |
233 | | #endif |
234 | | |
235 | | // Certain known identifiers which we need to use when constructing the |
236 | | // ESTree or when parsing; |
237 | | UniqueString *getIdent_; |
238 | | UniqueString *setIdent_; |
239 | | UniqueString *initIdent_; |
240 | | UniqueString *useStrictIdent_; |
241 | | UniqueString *showSourceIdent_; |
242 | | UniqueString *hideSourceIdent_; |
243 | | UniqueString *sensitiveIdent_; |
244 | | UniqueString *useStaticBuiltinIdent_; |
245 | | UniqueString *letIdent_; |
246 | | UniqueString *ofIdent_; |
247 | | UniqueString *fromIdent_; |
248 | | UniqueString *asIdent_; |
249 | | UniqueString *implementsIdent_; |
250 | | UniqueString *interfaceIdent_; |
251 | | UniqueString *packageIdent_; |
252 | | UniqueString *privateIdent_; |
253 | | UniqueString *protectedIdent_; |
254 | | UniqueString *publicIdent_; |
255 | | UniqueString *staticIdent_; |
256 | | UniqueString *methodIdent_; |
257 | | UniqueString *constructorIdent_; |
258 | | UniqueString *yieldIdent_; |
259 | | UniqueString *newIdent_; |
260 | | UniqueString *importIdent_; |
261 | | UniqueString *targetIdent_; |
262 | | UniqueString *metaIdent_; |
263 | | UniqueString *valueIdent_; |
264 | | UniqueString *typeIdent_; |
265 | | UniqueString *asyncIdent_; |
266 | | UniqueString *awaitIdent_; |
267 | | UniqueString *assertIdent_; |
268 | | |
269 | | #if HERMES_PARSE_FLOW |
270 | | |
271 | | UniqueString *typeofIdent_; |
272 | | UniqueString *keyofIdent_; |
273 | | UniqueString *declareIdent_; |
274 | | UniqueString *protoIdent_; |
275 | | UniqueString *opaqueIdent_; |
276 | | UniqueString *plusIdent_; |
277 | | UniqueString *minusIdent_; |
278 | | UniqueString *moduleIdent_; |
279 | | UniqueString *exportsIdent_; |
280 | | UniqueString *esIdent_; |
281 | | UniqueString *commonJSIdent_; |
282 | | UniqueString *mixinsIdent_; |
283 | | UniqueString *thisIdent_; |
284 | | |
285 | | UniqueString *anyIdent_; |
286 | | UniqueString *mixedIdent_; |
287 | | UniqueString *emptyIdent_; |
288 | | UniqueString *booleanIdent_; |
289 | | UniqueString *boolIdent_; |
290 | | UniqueString *numberIdent_; |
291 | | UniqueString *stringIdent_; |
292 | | UniqueString *voidIdent_; |
293 | | UniqueString *nullIdent_; |
294 | | UniqueString *symbolIdent_; |
295 | | UniqueString *bigintIdent_; |
296 | | |
297 | | UniqueString *mappedTypeOptionalIdent_; |
298 | | UniqueString *mappedTypePlusOptionalIdent_; |
299 | | UniqueString *mappedTypeMinusOptionalIdent_; |
300 | | |
301 | | UniqueString *checksIdent_; |
302 | | UniqueString *assertsIdent_; |
303 | | UniqueString *impliesIdent_; |
304 | | |
305 | | UniqueString *componentIdent_; |
306 | | UniqueString *hookIdent_; |
307 | | UniqueString *rendersIdent_; |
308 | | UniqueString *rendersMaybeOperator_; |
309 | | UniqueString *rendersStarOperator_; |
310 | | |
311 | | UniqueString *matchIdent_; |
312 | | UniqueString *underscoreIdent_; |
313 | | #endif |
314 | | |
315 | | #if HERMES_PARSE_TS |
316 | | UniqueString *readonlyIdent_; |
317 | | UniqueString *neverIdent_; |
318 | | UniqueString *undefinedIdent_; |
319 | | UniqueString *unknownIdent_; |
320 | | #endif |
321 | | |
322 | | #if HERMES_PARSE_FLOW || HERMES_PARSE_TS |
323 | | UniqueString *namespaceIdent_; |
324 | | UniqueString *isIdent_; |
325 | | UniqueString *inferIdent_; |
326 | | UniqueString *constIdent_; |
327 | | #endif |
328 | | |
329 | | /// String representation of all tokens. |
330 | | UniqueString *tokenIdent_[NUM_JS_TOKENS]; |
331 | | |
332 | 2.68M | UniqueString *getTokenIdent(TokenKind kind) const { |
333 | 2.68M | return tokenIdent_[(unsigned)kind]; |
334 | 2.68M | } |
335 | | |
336 | | /// Allocate an ESTree node of a certain type with supplied location and |
337 | | /// construction arguments. All nodes are allocated using the supplied |
338 | | /// allocator. |
339 | | template <class Node, class StartLoc, class EndLoc> |
340 | 11.4M | Node *setLocation(StartLoc start, EndLoc end, Node *node) { |
341 | 11.4M | node->setStartLoc(getStartLoc(start)); |
342 | 11.4M | node->setEndLoc(getEndLoc(end)); |
343 | 11.4M | node->setDebugLoc(getStartLoc(start)); |
344 | 11.4M | return node; |
345 | 11.4M | } Unexecuted instantiation: hermes::ESTree::BlockStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BlockStatementNode, hermes::ESTree::FunctionDeclarationNode*, hermes::ESTree::FunctionDeclarationNode*>(hermes::ESTree::FunctionDeclarationNode*, hermes::ESTree::FunctionDeclarationNode*, hermes::ESTree::BlockStatementNode*) hermes::ESTree::TemplateElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TemplateElementNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::TemplateElementNode*) Line | Count | Source | 340 | 786k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 786k | node->setStartLoc(getStartLoc(start)); | 342 | 786k | node->setEndLoc(getEndLoc(end)); | 343 | 786k | node->setDebugLoc(getStartLoc(start)); | 344 | 786k | return node; | 345 | 786k | } |
Unexecuted instantiation: hermes::ESTree::PrivateNameNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::PrivateNameNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::PrivateNameNode*) hermes::ESTree::LogicalExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::LogicalExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::LogicalExpressionNode*) Line | Count | Source | 340 | 30.0k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 30.0k | node->setStartLoc(getStartLoc(start)); | 342 | 30.0k | node->setEndLoc(getEndLoc(end)); | 343 | 30.0k | node->setDebugLoc(getStartLoc(start)); | 344 | 30.0k | return node; | 345 | 30.0k | } |
Unexecuted instantiation: hermes::ESTree::TSAsExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSAsExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSAsExpressionNode*) Unexecuted instantiation: hermes::ESTree::AsConstExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AsConstExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AsConstExpressionNode*) Unexecuted instantiation: hermes::ESTree::AsExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AsExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AsExpressionNode*) hermes::ESTree::BinaryExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BinaryExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BinaryExpressionNode*) Line | Count | Source | 340 | 1.47M | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.47M | node->setStartLoc(getStartLoc(start)); | 342 | 1.47M | node->setEndLoc(getEndLoc(end)); | 343 | 1.47M | node->setDebugLoc(getStartLoc(start)); | 344 | 1.47M | return node; | 345 | 1.47M | } |
hermes::ESTree::ProgramNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ProgramNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ProgramNode*) Line | Count | Source | 340 | 439 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 439 | node->setStartLoc(getStartLoc(start)); | 342 | 439 | node->setEndLoc(getEndLoc(end)); | 343 | 439 | node->setDebugLoc(getStartLoc(start)); | 344 | 439 | return node; | 345 | 439 | } |
hermes::ESTree::FunctionLikeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::FunctionLikeNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::FunctionLikeNode*) Line | Count | Source | 340 | 4.05k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 4.05k | node->setStartLoc(getStartLoc(start)); | 342 | 4.05k | node->setEndLoc(getEndLoc(end)); | 343 | 4.05k | node->setDebugLoc(getStartLoc(start)); | 344 | 4.05k | return node; | 345 | 4.05k | } |
Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::IdentifierNode*) hermes::ESTree::BlockStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BlockStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BlockStatementNode*) Line | Count | Source | 340 | 80 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 80 | node->setStartLoc(getStartLoc(start)); | 342 | 80 | node->setEndLoc(getEndLoc(end)); | 343 | 80 | node->setDebugLoc(getStartLoc(start)); | 344 | 80 | return node; | 345 | 80 | } |
hermes::ESTree::BlockStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BlockStatementNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::BlockStatementNode*) Line | Count | Source | 340 | 4.05k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 4.05k | node->setStartLoc(getStartLoc(start)); | 342 | 4.05k | node->setEndLoc(getEndLoc(end)); | 343 | 4.05k | node->setDebugLoc(getStartLoc(start)); | 344 | 4.05k | return node; | 345 | 4.05k | } |
hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::IdentifierNode*) Line | Count | Source | 340 | 7.61k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 7.61k | node->setStartLoc(getStartLoc(start)); | 342 | 7.61k | node->setEndLoc(getEndLoc(end)); | 343 | 7.61k | node->setDebugLoc(getStartLoc(start)); | 344 | 7.61k | return node; | 345 | 7.61k | } |
hermes::ESTree::VariableDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::VariableDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::VariableDeclarationNode*) Line | Count | Source | 340 | 3.65k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 3.65k | node->setStartLoc(getStartLoc(start)); | 342 | 3.65k | node->setEndLoc(getEndLoc(end)); | 343 | 3.65k | node->setDebugLoc(getStartLoc(start)); | 344 | 3.65k | return node; | 345 | 3.65k | } |
hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::IdentifierNode*) Line | Count | Source | 340 | 3.56M | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 3.56M | node->setStartLoc(getStartLoc(start)); | 342 | 3.56M | node->setEndLoc(getEndLoc(end)); | 343 | 3.56M | node->setDebugLoc(getStartLoc(start)); | 344 | 3.56M | return node; | 345 | 3.56M | } |
Unexecuted instantiation: hermes::ESTree::PrivateNameNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::PrivateNameNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::PrivateNameNode*) hermes::ESTree::VariableDeclaratorNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::VariableDeclaratorNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::VariableDeclaratorNode*) Line | Count | Source | 340 | 3.64k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 3.64k | node->setStartLoc(getStartLoc(start)); | 342 | 3.64k | node->setEndLoc(getEndLoc(end)); | 343 | 3.64k | node->setDebugLoc(getStartLoc(start)); | 344 | 3.64k | return node; | 345 | 3.64k | } |
hermes::ESTree::EmptyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EmptyNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::EmptyNode*) Line | Count | Source | 340 | 1.07k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.07k | node->setStartLoc(getStartLoc(start)); | 342 | 1.07k | node->setEndLoc(getEndLoc(end)); | 343 | 1.07k | node->setDebugLoc(getStartLoc(start)); | 344 | 1.07k | return node; | 345 | 1.07k | } |
hermes::ESTree::ArrayPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrayPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ArrayPatternNode*) Line | Count | Source | 340 | 1.81k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.81k | node->setStartLoc(getStartLoc(start)); | 342 | 1.81k | node->setEndLoc(getEndLoc(end)); | 343 | 1.81k | node->setDebugLoc(getStartLoc(start)); | 344 | 1.81k | return node; | 345 | 1.81k | } |
Unexecuted instantiation: hermes::ESTree::RestElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::RestElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::RestElementNode*) Unexecuted instantiation: hermes::ESTree::ObjectPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectPatternNode*) Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*) hermes::ESTree::PropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::PropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::PropertyNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
hermes::ESTree::EmptyStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EmptyStatementNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::EmptyStatementNode*) Line | Count | Source | 340 | 453k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 453k | node->setStartLoc(getStartLoc(start)); | 342 | 453k | node->setEndLoc(getEndLoc(end)); | 343 | 453k | node->setDebugLoc(getStartLoc(start)); | 344 | 453k | return node; | 345 | 453k | } |
hermes::ESTree::LabeledStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::LabeledStatementNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*, hermes::ESTree::LabeledStatementNode*) Line | Count | Source | 340 | 133k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 133k | node->setStartLoc(getStartLoc(start)); | 342 | 133k | node->setEndLoc(getEndLoc(end)); | 343 | 133k | node->setDebugLoc(getStartLoc(start)); | 344 | 133k | return node; | 345 | 133k | } |
hermes::ESTree::ExpressionStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExpressionStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExpressionStatementNode*) Line | Count | Source | 340 | 2.31M | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2.31M | node->setStartLoc(getStartLoc(start)); | 342 | 2.31M | node->setEndLoc(getEndLoc(end)); | 343 | 2.31M | node->setDebugLoc(getStartLoc(start)); | 344 | 2.31M | return node; | 345 | 2.31M | } |
hermes::ESTree::IfStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IfStatementNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::IfStatementNode*) Line | Count | Source | 340 | 1 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1 | node->setStartLoc(getStartLoc(start)); | 342 | 1 | node->setEndLoc(getEndLoc(end)); | 343 | 1 | node->setDebugLoc(getStartLoc(start)); | 344 | 1 | return node; | 345 | 1 | } |
Unexecuted instantiation: hermes::ESTree::WhileStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::WhileStatementNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::WhileStatementNode*) Unexecuted instantiation: hermes::ESTree::DoWhileStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DoWhileStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DoWhileStatementNode*) hermes::ESTree::Node* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::Node, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::Node*) Line | Count | Source | 340 | 21 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 21 | node->setStartLoc(getStartLoc(start)); | 342 | 21 | node->setEndLoc(getEndLoc(end)); | 343 | 21 | node->setDebugLoc(getStartLoc(start)); | 344 | 21 | return node; | 345 | 21 | } |
Unexecuted instantiation: hermes::ESTree::ForStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ForStatementNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::ForStatementNode*) Unexecuted instantiation: hermes::ESTree::ContinueStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ContinueStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ContinueStatementNode*) Unexecuted instantiation: hermes::ESTree::BreakStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BreakStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BreakStatementNode*) hermes::ESTree::ReturnStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ReturnStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ReturnStatementNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
Unexecuted instantiation: hermes::ESTree::WithStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::WithStatementNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::WithStatementNode*) Unexecuted instantiation: hermes::ESTree::SwitchCaseNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SwitchCaseNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::SwitchCaseNode*) Unexecuted instantiation: hermes::ESTree::SwitchStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SwitchStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::SwitchStatementNode*) hermes::ESTree::ThrowStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ThrowStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ThrowStatementNode*) Line | Count | Source | 340 | 6 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 6 | node->setStartLoc(getStartLoc(start)); | 342 | 6 | node->setEndLoc(getEndLoc(end)); | 343 | 6 | node->setDebugLoc(getStartLoc(start)); | 344 | 6 | return node; | 345 | 6 | } |
hermes::ESTree::CatchClauseNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CatchClauseNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::CatchClauseNode*) Line | Count | Source | 340 | 1 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1 | node->setStartLoc(getStartLoc(start)); | 342 | 1 | node->setEndLoc(getEndLoc(end)); | 343 | 1 | node->setDebugLoc(getStartLoc(start)); | 344 | 1 | return node; | 345 | 1 | } |
hermes::ESTree::TryStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TryStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TryStatementNode*) Line | Count | Source | 340 | 1 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1 | node->setStartLoc(getStartLoc(start)); | 342 | 1 | node->setEndLoc(getEndLoc(end)); | 343 | 1 | node->setDebugLoc(getStartLoc(start)); | 344 | 1 | return node; | 345 | 1 | } |
hermes::ESTree::DebuggerStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DebuggerStatementNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::DebuggerStatementNode*) Line | Count | Source | 340 | 80 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 80 | node->setStartLoc(getStartLoc(start)); | 342 | 80 | node->setEndLoc(getEndLoc(end)); | 343 | 80 | node->setDebugLoc(getStartLoc(start)); | 344 | 80 | return node; | 345 | 80 | } |
hermes::ESTree::ThisExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ThisExpressionNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::ThisExpressionNode*) Line | Count | Source | 340 | 1.99k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.99k | node->setStartLoc(getStartLoc(start)); | 342 | 1.99k | node->setEndLoc(getEndLoc(end)); | 343 | 1.99k | node->setDebugLoc(getStartLoc(start)); | 344 | 1.99k | return node; | 345 | 1.99k | } |
Unexecuted instantiation: hermes::ESTree::NullLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NullLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::NullLiteralNode*) Unexecuted instantiation: hermes::ESTree::BooleanLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BooleanLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::BooleanLiteralNode*) hermes::ESTree::NumericLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NumericLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::NumericLiteralNode*) Line | Count | Source | 340 | 788k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 788k | node->setStartLoc(getStartLoc(start)); | 342 | 788k | node->setEndLoc(getEndLoc(end)); | 343 | 788k | node->setDebugLoc(getStartLoc(start)); | 344 | 788k | return node; | 345 | 788k | } |
hermes::ESTree::BigIntLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BigIntLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::BigIntLiteralNode*) Line | Count | Source | 340 | 199 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 199 | node->setStartLoc(getStartLoc(start)); | 342 | 199 | node->setEndLoc(getEndLoc(end)); | 343 | 199 | node->setDebugLoc(getStartLoc(start)); | 344 | 199 | return node; | 345 | 199 | } |
hermes::ESTree::StringLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::StringLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::StringLiteralNode*) Line | Count | Source | 340 | 139 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 139 | node->setStartLoc(getStartLoc(start)); | 342 | 139 | node->setEndLoc(getEndLoc(end)); | 343 | 139 | node->setDebugLoc(getStartLoc(start)); | 344 | 139 | return node; | 345 | 139 | } |
hermes::ESTree::RegExpLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::RegExpLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::RegExpLiteralNode*) Line | Count | Source | 340 | 8.12k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 8.12k | node->setStartLoc(getStartLoc(start)); | 342 | 8.12k | node->setEndLoc(getEndLoc(end)); | 343 | 8.12k | node->setDebugLoc(getStartLoc(start)); | 344 | 8.12k | return node; | 345 | 8.12k | } |
hermes::ESTree::CoverEmptyArgsNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverEmptyArgsNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::CoverEmptyArgsNode*) Line | Count | Source | 340 | 146 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 146 | node->setStartLoc(getStartLoc(start)); | 342 | 146 | node->setEndLoc(getEndLoc(end)); | 343 | 146 | node->setDebugLoc(getStartLoc(start)); | 344 | 146 | return node; | 345 | 146 | } |
Unexecuted instantiation: hermes::ESTree::CoverRestElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverRestElementNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::CoverRestElementNode*) Unexecuted instantiation: hermes::ESTree::TypeCastExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeCastExpressionNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::TypeCastExpressionNode*) hermes::ESTree::ArrayExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrayExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ArrayExpressionNode*) Line | Count | Source | 340 | 1.71k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.71k | node->setStartLoc(getStartLoc(start)); | 342 | 1.71k | node->setEndLoc(getEndLoc(end)); | 343 | 1.71k | node->setDebugLoc(getStartLoc(start)); | 344 | 1.71k | return node; | 345 | 1.71k | } |
hermes::ESTree::ObjectExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectExpressionNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
hermes::ESTree::SpreadElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SpreadElementNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::SpreadElementNode*) Line | Count | Source | 340 | 4 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 4 | node->setStartLoc(getStartLoc(start)); | 342 | 4 | node->setEndLoc(getEndLoc(end)); | 343 | 4 | node->setDebugLoc(getStartLoc(start)); | 344 | 4 | return node; | 345 | 4 | } |
hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, llvh::SMRange, llvh::SMRange>(llvh::SMRange, llvh::SMRange, hermes::ESTree::IdentifierNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::IdentifierNode*) Unexecuted instantiation: hermes::ESTree::PropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::PropertyNode, llvh::SMLoc, hermes::ESTree::IdentifierNode*>(llvh::SMLoc, hermes::ESTree::IdentifierNode*, hermes::ESTree::PropertyNode*) hermes::ESTree::FunctionExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::FunctionExpressionNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::FunctionExpressionNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
Unexecuted instantiation: hermes::ESTree::PropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::PropertyNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::PropertyNode*) Unexecuted instantiation: hermes::ESTree::CoverInitializerNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverInitializerNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::CoverInitializerNode*) hermes::ESTree::TemplateLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TemplateLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TemplateLiteralNode*) Line | Count | Source | 340 | 575k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 575k | node->setStartLoc(getStartLoc(start)); | 342 | 575k | node->setEndLoc(getEndLoc(end)); | 343 | 575k | node->setDebugLoc(getStartLoc(start)); | 344 | 575k | return node; | 345 | 575k | } |
Unexecuted instantiation: hermes::ESTree::SuperNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SuperNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::SuperNode*) Unexecuted instantiation: hermes::ESTree::MetaPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MetaPropertyNode, hermes::ESTree::IdentifierNode*, llvh::SMLoc>(hermes::ESTree::IdentifierNode*, llvh::SMLoc, hermes::ESTree::MetaPropertyNode*) Unexecuted instantiation: hermes::ESTree::ImportExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ImportExpressionNode*) hermes::ESTree::TaggedTemplateExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TaggedTemplateExpressionNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::TaggedTemplateExpressionNode*) Line | Count | Source | 340 | 8.82k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 8.82k | node->setStartLoc(getStartLoc(start)); | 342 | 8.82k | node->setEndLoc(getEndLoc(end)); | 343 | 8.82k | node->setDebugLoc(getStartLoc(start)); | 344 | 8.82k | return node; | 345 | 8.82k | } |
Unexecuted instantiation: hermes::ESTree::SpreadElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SpreadElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::SpreadElementNode*) Unexecuted instantiation: hermes::ESTree::MetaPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MetaPropertyNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::MetaPropertyNode*) hermes::ESTree::NewExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NewExpressionNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::NewExpressionNode*) Line | Count | Source | 340 | 181 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 181 | node->setStartLoc(getStartLoc(start)); | 342 | 181 | node->setEndLoc(getEndLoc(end)); | 343 | 181 | node->setDebugLoc(getStartLoc(start)); | 344 | 181 | return node; | 345 | 181 | } |
hermes::ESTree::UnaryExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::UnaryExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::UnaryExpressionNode*) Line | Count | Source | 340 | 1.11M | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 1.11M | node->setStartLoc(getStartLoc(start)); | 342 | 1.11M | node->setEndLoc(getEndLoc(end)); | 343 | 1.11M | node->setDebugLoc(getStartLoc(start)); | 344 | 1.11M | return node; | 345 | 1.11M | } |
hermes::ESTree::UpdateExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::UpdateExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::UpdateExpressionNode*) Line | Count | Source | 340 | 41 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 41 | node->setStartLoc(getStartLoc(start)); | 342 | 41 | node->setEndLoc(getEndLoc(end)); | 343 | 41 | node->setDebugLoc(getStartLoc(start)); | 344 | 41 | return node; | 345 | 41 | } |
Unexecuted instantiation: hermes::ESTree::TSTypeAssertionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeAssertionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeAssertionNode*) Unexecuted instantiation: hermes::ESTree::AwaitExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AwaitExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AwaitExpressionNode*) Unexecuted instantiation: hermes::ESTree::CoverTypedIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverTypedIdentifierNode, llvh::SMLoc, llvh::SMRange>(llvh::SMLoc, llvh::SMRange, hermes::ESTree::CoverTypedIdentifierNode*) hermes::ESTree::ConditionalExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ConditionalExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ConditionalExpressionNode*) Line | Count | Source | 340 | 6.04k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 6.04k | node->setStartLoc(getStartLoc(start)); | 342 | 6.04k | node->setEndLoc(getEndLoc(end)); | 343 | 6.04k | node->setDebugLoc(getStartLoc(start)); | 344 | 6.04k | return node; | 345 | 6.04k | } |
Unexecuted instantiation: hermes::ESTree::CoverTypedIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverTypedIdentifierNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::CoverTypedIdentifierNode*) Unexecuted instantiation: hermes::ESTree::YieldExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::YieldExpressionNode, llvh::SMRange, llvh::SMRange>(llvh::SMRange, llvh::SMRange, hermes::ESTree::YieldExpressionNode*) Unexecuted instantiation: hermes::ESTree::YieldExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::YieldExpressionNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::YieldExpressionNode*) Unexecuted instantiation: hermes::ESTree::ClassDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassDeclarationNode, llvh::SMLoc, hermes::ESTree::ClassBodyNode*>(llvh::SMLoc, hermes::ESTree::ClassBodyNode*, hermes::ESTree::ClassDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ClassExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassExpressionNode, llvh::SMLoc, hermes::ESTree::ClassBodyNode*>(llvh::SMLoc, hermes::ESTree::ClassBodyNode*, hermes::ESTree::ClassExpressionNode*) Unexecuted instantiation: hermes::ESTree::ClassBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ClassBodyNode*) hermes::ESTree::StaticBlockNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::StaticBlockNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::StaticBlockNode*) Line | Count | Source | 340 | 2 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 2 | node->setStartLoc(getStartLoc(start)); | 342 | 2 | node->setEndLoc(getEndLoc(end)); | 343 | 2 | node->setDebugLoc(getStartLoc(start)); | 344 | 2 | return node; | 345 | 2 | } |
Unexecuted instantiation: hermes::ESTree::VarianceNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::VarianceNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::VarianceNode*) Unexecuted instantiation: hermes::ESTree::ClassPrivatePropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassPrivatePropertyNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::ClassPrivatePropertyNode*) hermes::ESTree::ClassPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassPropertyNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::ClassPropertyNode*) Line | Count | Source | 340 | 166 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 166 | node->setStartLoc(getStartLoc(start)); | 342 | 166 | node->setEndLoc(getEndLoc(end)); | 343 | 166 | node->setDebugLoc(getStartLoc(start)); | 344 | 166 | return node; | 345 | 166 | } |
Unexecuted instantiation: hermes::ESTree::MethodDefinitionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MethodDefinitionNode, llvh::SMRange, hermes::ESTree::BlockStatementNode*>(llvh::SMRange, hermes::ESTree::BlockStatementNode*, hermes::ESTree::MethodDefinitionNode*) hermes::ESTree::AssignmentPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AssignmentPatternNode, hermes::ESTree::AssignmentExpressionNode*, hermes::ESTree::AssignmentExpressionNode*>(hermes::ESTree::AssignmentExpressionNode*, hermes::ESTree::AssignmentExpressionNode*, hermes::ESTree::AssignmentPatternNode*) Line | Count | Source | 340 | 16 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 16 | node->setStartLoc(getStartLoc(start)); | 342 | 16 | node->setEndLoc(getEndLoc(end)); | 343 | 16 | node->setDebugLoc(getStartLoc(start)); | 344 | 16 | return node; | 345 | 16 | } |
hermes::ESTree::ArrowFunctionExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrowFunctionExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ArrowFunctionExpressionNode*) Line | Count | Source | 340 | 95.1k | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 95.1k | node->setStartLoc(getStartLoc(start)); | 342 | 95.1k | node->setEndLoc(getEndLoc(end)); | 343 | 95.1k | node->setDebugLoc(getStartLoc(start)); | 344 | 95.1k | return node; | 345 | 95.1k | } |
Unexecuted instantiation: hermes::ESTree::ArrayPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrayPatternNode, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*>(hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::ArrayPatternNode*) Unexecuted instantiation: hermes::ESTree::ObjectPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectPatternNode, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*>(hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::ObjectPatternNode*) Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*>(hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::CoverTypedIdentifierNode*, hermes::ESTree::IdentifierNode*) Unexecuted instantiation: hermes::ESTree::ArrayPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrayPatternNode, hermes::ESTree::ArrayPatternNode*, hermes::ESTree::Node*>(hermes::ESTree::ArrayPatternNode*, hermes::ESTree::Node*, hermes::ESTree::ArrayPatternNode*) Unexecuted instantiation: hermes::ESTree::ObjectPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectPatternNode, hermes::ESTree::ObjectPatternNode*, hermes::ESTree::Node*>(hermes::ESTree::ObjectPatternNode*, hermes::ESTree::Node*, hermes::ESTree::ObjectPatternNode*) Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*, hermes::ESTree::IdentifierNode*) Unexecuted instantiation: hermes::ESTree::RestElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::RestElementNode, hermes::ESTree::SpreadElementNode*, hermes::ESTree::SpreadElementNode*>(hermes::ESTree::SpreadElementNode*, hermes::ESTree::SpreadElementNode*, hermes::ESTree::RestElementNode*) Unexecuted instantiation: hermes::ESTree::AssignmentPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AssignmentPatternNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::AssignmentPatternNode*) Unexecuted instantiation: hermes::ESTree::CoverTrailingCommaNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CoverTrailingCommaNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::CoverTrailingCommaNode*) hermes::ESTree::SequenceExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SequenceExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::SequenceExpressionNode*) Line | Count | Source | 340 | 983 | Node *setLocation(StartLoc start, EndLoc end, Node *node) { | 341 | 983 | node->setStartLoc(getStartLoc(start)); | 342 | 983 | node->setEndLoc(getEndLoc(end)); | 343 | 983 | node->setDebugLoc(getStartLoc(start)); | 344 | 983 | return node; | 345 | 983 | } |
Unexecuted instantiation: hermes::ESTree::ImportAttributeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportAttributeNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::ImportAttributeNode*) Unexecuted instantiation: hermes::ESTree::ImportDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ImportDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ImportDefaultSpecifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportDefaultSpecifierNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::ImportDefaultSpecifierNode*) Unexecuted instantiation: hermes::ESTree::ImportNamespaceSpecifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportNamespaceSpecifierNode, llvh::SMLoc, hermes::ESTree::IdentifierNode*>(llvh::SMLoc, hermes::ESTree::IdentifierNode*, hermes::ESTree::ImportNamespaceSpecifierNode*) Unexecuted instantiation: hermes::ESTree::ImportSpecifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ImportSpecifierNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ImportSpecifierNode*) Unexecuted instantiation: hermes::ESTree::ExportNamespaceSpecifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportNamespaceSpecifierNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExportNamespaceSpecifierNode*) Unexecuted instantiation: hermes::ESTree::ExportNamedDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportNamedDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExportNamedDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportAllDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportAllDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExportAllDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportDefaultDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportDefaultDeclarationNode, llvh::SMLoc, hermes::ESTree::FunctionDeclarationNode*>(llvh::SMLoc, hermes::ESTree::FunctionDeclarationNode*, hermes::ESTree::ExportDefaultDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportDefaultDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportDefaultDeclarationNode, llvh::SMLoc, hermes::ESTree::ClassDeclarationNode*>(llvh::SMLoc, hermes::ESTree::ClassDeclarationNode*, hermes::ESTree::ExportDefaultDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportDefaultDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportDefaultDeclarationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::ExportDefaultDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportDefaultDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportDefaultDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExportDefaultDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportNamedDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportNamedDeclarationNode, llvh::SMLoc, hermes::ESTree::VariableDeclarationNode*>(llvh::SMLoc, hermes::ESTree::VariableDeclarationNode*, hermes::ESTree::ExportNamedDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportNamedDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportNamedDeclarationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::ExportNamedDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ExportSpecifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExportSpecifierNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::Node*, hermes::ESTree::ExportSpecifierNode*) Unexecuted instantiation: hermes::ESTree::ExpressionStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExpressionStatementNode, hermes::ESTree::StringLiteralNode*, llvh::SMLoc>(hermes::ESTree::StringLiteralNode*, llvh::SMLoc, hermes::ESTree::ExpressionStatementNode*) Unexecuted instantiation: hermes::ESTree::DeclareVariableNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareVariableNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareVariableNode*) Unexecuted instantiation: hermes::ESTree::DeclareComponentNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareComponentNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareComponentNode*) Unexecuted instantiation: hermes::ESTree::ComponentDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ComponentDeclarationNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::ComponentDeclarationNode*) Unexecuted instantiation: hermes::ESTree::ComponentParameterNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ComponentParameterNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ComponentParameterNode*) Unexecuted instantiation: hermes::ESTree::TypeOperatorNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeOperatorNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeOperatorNode*) Unexecuted instantiation: hermes::ESTree::ComponentTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ComponentTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ComponentTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::ComponentTypeParameterNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ComponentTypeParameterNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ComponentTypeParameterNode*) Unexecuted instantiation: hermes::ESTree::HookDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::HookDeclarationNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::HookDeclarationNode*) Unexecuted instantiation: hermes::ESTree::SequenceExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SequenceExpressionNode, llvh::SMRange, llvh::SMRange>(llvh::SMRange, llvh::SMRange, hermes::ESTree::SequenceExpressionNode*) Unexecuted instantiation: hermes::ESTree::MatchStatementCaseNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchStatementCaseNode, llvh::SMLoc, hermes::ESTree::BlockStatementNode*>(llvh::SMLoc, hermes::ESTree::BlockStatementNode*, hermes::ESTree::MatchStatementCaseNode*) Unexecuted instantiation: hermes::ESTree::MatchStatementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchStatementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchStatementNode*) Unexecuted instantiation: hermes::ESTree::MatchExpressionCaseNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchExpressionCaseNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::MatchExpressionCaseNode*) Unexecuted instantiation: hermes::ESTree::MatchExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchExpressionNode*) Unexecuted instantiation: hermes::ESTree::MatchOrPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchOrPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchOrPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchAsPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchAsPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchAsPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchLiteralPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchLiteralPatternNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::MatchLiteralPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchWildcardPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchWildcardPatternNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::MatchWildcardPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchIdentifierPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchIdentifierPatternNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::MatchIdentifierPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchMemberPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchMemberPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchMemberPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchUnaryPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchUnaryPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchUnaryPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchBindingPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchBindingPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchBindingPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchRestPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchRestPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchRestPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchObjectPatternPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchObjectPatternPropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchObjectPatternPropertyNode*) Unexecuted instantiation: hermes::ESTree::MatchObjectPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchObjectPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchObjectPatternNode*) Unexecuted instantiation: hermes::ESTree::MatchArrayPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MatchArrayPatternNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MatchArrayPatternNode*) Unexecuted instantiation: hermes::ESTree::DeclareOpaqueTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareOpaqueTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareOpaqueTypeNode*) Unexecuted instantiation: hermes::ESTree::DeclareTypeAliasNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareTypeAliasNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareTypeAliasNode*) Unexecuted instantiation: hermes::ESTree::OpaqueTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::OpaqueTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::OpaqueTypeNode*) Unexecuted instantiation: hermes::ESTree::TypeAliasNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeAliasNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeAliasNode*) Unexecuted instantiation: hermes::ESTree::DeclareInterfaceNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareInterfaceNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareInterfaceNode*) Unexecuted instantiation: hermes::ESTree::InterfaceDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::InterfaceDeclarationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::InterfaceDeclarationNode*) Unexecuted instantiation: hermes::ESTree::InterfaceExtendsNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::InterfaceExtendsNode, hermes::ESTree::GenericTypeAnnotationNode*, hermes::ESTree::GenericTypeAnnotationNode*>(hermes::ESTree::GenericTypeAnnotationNode*, hermes::ESTree::GenericTypeAnnotationNode*, hermes::ESTree::InterfaceExtendsNode*) Unexecuted instantiation: hermes::ESTree::FunctionTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::FunctionTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::FunctionTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::TypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::IdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IdentifierNode, llvh::SMLoc, hermes::ESTree::TypeAnnotationNode*>(llvh::SMLoc, hermes::ESTree::TypeAnnotationNode*, hermes::ESTree::IdentifierNode*) Unexecuted instantiation: hermes::ESTree::DeclareFunctionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareFunctionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareFunctionNode*) Unexecuted instantiation: hermes::ESTree::HookTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::HookTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::HookTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::DeclareHookNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareHookNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareHookNode*) Unexecuted instantiation: hermes::ESTree::DeclareModuleExportsNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareModuleExportsNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareModuleExportsNode*) Unexecuted instantiation: hermes::ESTree::DeclareModuleNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareModuleNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareModuleNode*) Unexecuted instantiation: hermes::ESTree::DeclareNamespaceNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareNamespaceNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareNamespaceNode*) Unexecuted instantiation: hermes::ESTree::DeclareClassNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareClassNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareClassNode*) Unexecuted instantiation: hermes::ESTree::DeclareExportDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareExportDeclarationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareExportDeclarationNode*) Unexecuted instantiation: hermes::ESTree::DeclareExportDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareExportDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareExportDeclarationNode*) Unexecuted instantiation: hermes::ESTree::DeclareExportAllDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareExportAllDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::DeclareExportAllDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TypePredicateNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypePredicateNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypePredicateNode*) Unexecuted instantiation: hermes::ESTree::GenericTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::GenericTypeAnnotationNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::GenericTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::ConditionalTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ConditionalTypeAnnotationNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::ConditionalTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::UnionTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::UnionTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::UnionTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::IntersectionTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IntersectionTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::IntersectionTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::FunctionTypeParamNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::FunctionTypeParamNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::FunctionTypeParamNode*) Unexecuted instantiation: hermes::ESTree::NullableTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NullableTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NullableTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::ArrayTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ArrayTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ArrayTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::OptionalIndexedAccessTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::OptionalIndexedAccessTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::OptionalIndexedAccessTypeNode*) Unexecuted instantiation: hermes::ESTree::IndexedAccessTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::IndexedAccessTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::IndexedAccessTypeNode*) Unexecuted instantiation: hermes::ESTree::ExistsTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ExistsTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ExistsTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::InterfaceTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::InterfaceTypeAnnotationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::InterfaceTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::AnyTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AnyTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AnyTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::MixedTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MixedTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MixedTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::EmptyTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EmptyTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EmptyTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::BooleanTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BooleanTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BooleanTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::NumberTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NumberTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NumberTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::SymbolTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::SymbolTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::SymbolTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::StringTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::StringTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::StringTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::BigIntTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BigIntTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BigIntTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::KeyofTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::KeyofTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::KeyofTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::TypeParameterNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeParameterNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeParameterNode*) Unexecuted instantiation: hermes::ESTree::InferTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::InferTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::InferTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::NullLiteralTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NullLiteralTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NullLiteralTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::VoidTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::VoidTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::VoidTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::StringLiteralTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::StringLiteralTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::StringLiteralTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::NumberLiteralTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NumberLiteralTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NumberLiteralTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::BigIntLiteralTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BigIntLiteralTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BigIntLiteralTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::BooleanLiteralTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BooleanLiteralTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BooleanLiteralTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::QualifiedTypeofIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::QualifiedTypeofIdentifierNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::QualifiedTypeofIdentifierNode*) Unexecuted instantiation: hermes::ESTree::TypeofTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeofTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeofTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::TupleTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TupleTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TupleTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::TupleTypeSpreadElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TupleTypeSpreadElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TupleTypeSpreadElementNode*) Unexecuted instantiation: hermes::ESTree::TupleTypeLabeledElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TupleTypeLabeledElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TupleTypeLabeledElementNode*) Unexecuted instantiation: hermes::ESTree::FunctionTypeParamNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::FunctionTypeParamNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::FunctionTypeParamNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeSpreadPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeSpreadPropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeSpreadPropertyNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeInternalSlotNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeInternalSlotNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeInternalSlotNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypePropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypePropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypePropertyNode*) Unexecuted instantiation: hermes::ESTree::TypeParameterNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeParameterNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::TypeParameterNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeMappedTypePropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeMappedTypePropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeMappedTypePropertyNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeIndexerNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeIndexerNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeIndexerNode*) Unexecuted instantiation: hermes::ESTree::ObjectTypeCallPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ObjectTypeCallPropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ObjectTypeCallPropertyNode*) Unexecuted instantiation: hermes::ESTree::TypeParameterDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeParameterDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeParameterDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TypeParameterInstantiationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TypeParameterInstantiationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TypeParameterInstantiationNode*) Unexecuted instantiation: hermes::ESTree::QualifiedTypeIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::QualifiedTypeIdentifierNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::QualifiedTypeIdentifierNode*) Unexecuted instantiation: hermes::ESTree::GenericTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::GenericTypeAnnotationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::GenericTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::ClassImplementsNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::ClassImplementsNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::ClassImplementsNode*) Unexecuted instantiation: hermes::ESTree::DeclaredPredicateNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclaredPredicateNode, llvh::SMRange, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, hermes::ESTree::DeclaredPredicateNode*) Unexecuted instantiation: hermes::ESTree::InferredPredicateNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::InferredPredicateNode, llvh::SMRange, llvh::SMRange>(llvh::SMRange, llvh::SMRange, hermes::ESTree::InferredPredicateNode*) Unexecuted instantiation: hermes::ESTree::DeclareEnumNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::DeclareEnumNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::DeclareEnumNode*) Unexecuted instantiation: hermes::ESTree::EnumDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumDeclarationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::EnumDeclarationNode*) Unexecuted instantiation: hermes::ESTree::EnumStringBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumStringBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EnumStringBodyNode*) Unexecuted instantiation: hermes::ESTree::EnumNumberBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumNumberBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EnumNumberBodyNode*) Unexecuted instantiation: hermes::ESTree::EnumBigIntBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumBigIntBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EnumBigIntBodyNode*) Unexecuted instantiation: hermes::ESTree::EnumBooleanBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumBooleanBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EnumBooleanBodyNode*) Unexecuted instantiation: hermes::ESTree::EnumSymbolBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumSymbolBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::EnumSymbolBodyNode*) Unexecuted instantiation: hermes::ESTree::EnumBooleanMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumBooleanMemberNode, hermes::ESTree::Node*, hermes::parser::Token const*>(hermes::ESTree::Node*, hermes::parser::Token const*, hermes::ESTree::EnumBooleanMemberNode*) Unexecuted instantiation: hermes::ESTree::EnumStringMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumStringMemberNode, hermes::ESTree::Node*, hermes::parser::Token const*>(hermes::ESTree::Node*, hermes::parser::Token const*, hermes::ESTree::EnumStringMemberNode*) Unexecuted instantiation: hermes::ESTree::NumericLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NumericLiteralNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::NumericLiteralNode*) Unexecuted instantiation: hermes::ESTree::EnumNumberMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumNumberMemberNode, hermes::ESTree::Node*, hermes::parser::Token const*>(hermes::ESTree::Node*, hermes::parser::Token const*, hermes::ESTree::EnumNumberMemberNode*) Unexecuted instantiation: hermes::ESTree::EnumBigIntMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumBigIntMemberNode, hermes::ESTree::Node*, hermes::parser::Token const*>(hermes::ESTree::Node*, hermes::parser::Token const*, hermes::ESTree::EnumBigIntMemberNode*) Unexecuted instantiation: hermes::ESTree::EnumDefaultedMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::EnumDefaultedMemberNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::EnumDefaultedMemberNode*) Unexecuted instantiation: hermes::ESTree::JSXElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXElementNode, llvh::SMLoc, hermes::ESTree::JSXOpeningElementNode*>(llvh::SMLoc, hermes::ESTree::JSXOpeningElementNode*, hermes::ESTree::JSXElementNode*) Unexecuted instantiation: hermes::ESTree::JSXElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXElementNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::JSXElementNode*) Unexecuted instantiation: hermes::ESTree::JSXOpeningElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXOpeningElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXOpeningElementNode*) Unexecuted instantiation: hermes::ESTree::JSXOpeningFragmentNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXOpeningFragmentNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::JSXOpeningFragmentNode*) Unexecuted instantiation: hermes::ESTree::JSXFragmentNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXFragmentNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::JSXFragmentNode*) Unexecuted instantiation: hermes::ESTree::JSXEmptyExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXEmptyExpressionNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXEmptyExpressionNode*) Unexecuted instantiation: hermes::ESTree::JSXExpressionContainerNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXExpressionContainerNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXExpressionContainerNode*) Unexecuted instantiation: hermes::ESTree::JSXTextNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXTextNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::JSXTextNode*) Unexecuted instantiation: hermes::ESTree::JSXSpreadChildNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXSpreadChildNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::JSXSpreadChildNode*) Unexecuted instantiation: hermes::ESTree::JSXExpressionContainerNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXExpressionContainerNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::JSXExpressionContainerNode*) Unexecuted instantiation: hermes::ESTree::JSXSpreadAttributeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXSpreadAttributeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXSpreadAttributeNode*) Unexecuted instantiation: hermes::ESTree::JSXAttributeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXAttributeNode, hermes::ESTree::Node*, hermes::ESTree::Node*>(hermes::ESTree::Node*, hermes::ESTree::Node*, hermes::ESTree::JSXAttributeNode*) Unexecuted instantiation: hermes::ESTree::JSXStringLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXStringLiteralNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::JSXStringLiteralNode*) Unexecuted instantiation: hermes::ESTree::JSXAttributeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXAttributeNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::JSXAttributeNode*) Unexecuted instantiation: hermes::ESTree::JSXClosingFragmentNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXClosingFragmentNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXClosingFragmentNode*) Unexecuted instantiation: hermes::ESTree::JSXClosingElementNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXClosingElementNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::JSXClosingElementNode*) Unexecuted instantiation: hermes::ESTree::JSXIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXIdentifierNode, llvh::SMLoc, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::ESTree::JSXIdentifierNode*) Unexecuted instantiation: hermes::ESTree::JSXIdentifierNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXIdentifierNode, hermes::parser::Token const*, hermes::parser::Token const*>(hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::JSXIdentifierNode*) Unexecuted instantiation: hermes::ESTree::JSXNamespacedNameNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXNamespacedNameNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::JSXNamespacedNameNode*) Unexecuted instantiation: hermes::ESTree::JSXMemberExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::JSXMemberExpressionNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::JSXMemberExpressionNode*) Unexecuted instantiation: hermes::ESTree::TSTypePredicateNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypePredicateNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypePredicateNode*) Unexecuted instantiation: hermes::ESTree::TSConditionalTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSConditionalTypeNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::TSConditionalTypeNode*) Unexecuted instantiation: hermes::ESTree::TSTypeAnnotationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeAnnotationNode, llvh::SMLoc, hermes::ESTree::Node*>(llvh::SMLoc, hermes::ESTree::Node*, hermes::ESTree::TSTypeAnnotationNode*) Unexecuted instantiation: hermes::ESTree::TSUnionTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSUnionTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSUnionTypeNode*) Unexecuted instantiation: hermes::ESTree::TSIntersectionTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSIntersectionTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSIntersectionTypeNode*) Unexecuted instantiation: hermes::ESTree::TSTupleTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTupleTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTupleTypeNode*) Unexecuted instantiation: hermes::ESTree::TSConstructorTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSConstructorTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSConstructorTypeNode*) Unexecuted instantiation: hermes::ESTree::TSFunctionTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSFunctionTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSFunctionTypeNode*) Unexecuted instantiation: hermes::ESTree::TSParameterPropertyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSParameterPropertyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSParameterPropertyNode*) Unexecuted instantiation: hermes::ESTree::TSTypeAliasDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeAliasDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeAliasDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TSInterfaceHeritageNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSInterfaceHeritageNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSInterfaceHeritageNode*) Unexecuted instantiation: hermes::ESTree::TSInterfaceBodyNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSInterfaceBodyNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSInterfaceBodyNode*) Unexecuted instantiation: hermes::ESTree::TSInterfaceDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSInterfaceDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSInterfaceDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TSEnumDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSEnumDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSEnumDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TSEnumMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSEnumMemberNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSEnumMemberNode*) Unexecuted instantiation: hermes::ESTree::TSModuleBlockNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSModuleBlockNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSModuleBlockNode*) Unexecuted instantiation: hermes::ESTree::TSModuleMemberNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSModuleMemberNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSModuleMemberNode*) Unexecuted instantiation: hermes::ESTree::TSTypeParameterDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeParameterDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeParameterDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TSTypeParameterNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeParameterNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeParameterNode*) Unexecuted instantiation: hermes::ESTree::TSArrayTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSArrayTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSArrayTypeNode*) Unexecuted instantiation: hermes::ESTree::TSIndexedAccessTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSIndexedAccessTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSIndexedAccessTypeNode*) Unexecuted instantiation: hermes::ESTree::TSThisTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSThisTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSThisTypeNode*) Unexecuted instantiation: hermes::ESTree::TSAnyKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSAnyKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSAnyKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSBooleanKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSBooleanKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSBooleanKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSNumberKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSNumberKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSNumberKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSSymbolKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSSymbolKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSSymbolKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSStringKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSStringKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSStringKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSBigIntKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSBigIntKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSBigIntKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSNeverKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSNeverKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSNeverKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSUndefinedKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSUndefinedKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSUndefinedKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSUnknownKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSUnknownKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSUnknownKeywordNode*) Unexecuted instantiation: hermes::ESTree::NullLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NullLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NullLiteralNode*) Unexecuted instantiation: hermes::ESTree::TSLiteralTypeNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSLiteralTypeNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSLiteralTypeNode*) Unexecuted instantiation: hermes::ESTree::TSVoidKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSVoidKeywordNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSVoidKeywordNode*) Unexecuted instantiation: hermes::ESTree::StringLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::StringLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::StringLiteralNode*) Unexecuted instantiation: hermes::ESTree::NumericLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NumericLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NumericLiteralNode*) Unexecuted instantiation: hermes::ESTree::BigIntLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BigIntLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BigIntLiteralNode*) Unexecuted instantiation: hermes::ESTree::BooleanLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::BooleanLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::BooleanLiteralNode*) Unexecuted instantiation: hermes::ESTree::TSTypeReferenceNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeReferenceNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeReferenceNode*) Unexecuted instantiation: hermes::ESTree::TSQualifiedNameNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSQualifiedNameNode, hermes::ESTree::Node*, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::TSQualifiedNameNode*) Unexecuted instantiation: hermes::ESTree::TSTypeQueryNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeQueryNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeQueryNode*) Unexecuted instantiation: hermes::ESTree::TSTypeParameterInstantiationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeParameterInstantiationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeParameterInstantiationNode*) Unexecuted instantiation: hermes::ESTree::TSTypeLiteralNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeLiteralNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSTypeLiteralNode*) Unexecuted instantiation: hermes::ESTree::TSCallSignatureDeclarationNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSCallSignatureDeclarationNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSCallSignatureDeclarationNode*) Unexecuted instantiation: hermes::ESTree::TSPropertySignatureNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSPropertySignatureNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSPropertySignatureNode*) Unexecuted instantiation: hermes::ESTree::TSMethodSignatureNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSMethodSignatureNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSMethodSignatureNode*) Unexecuted instantiation: hermes::ESTree::TSIndexSignatureNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSIndexSignatureNode, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, hermes::ESTree::TSIndexSignatureNode*) Unexecuted instantiation: hermes::ESTree::TSAnyKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSAnyKeywordNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSAnyKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSBooleanKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSBooleanKeywordNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSBooleanKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSNumberKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSNumberKeywordNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSNumberKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSSymbolKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSSymbolKeywordNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSSymbolKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSStringKeywordNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSStringKeywordNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSStringKeywordNode*) Unexecuted instantiation: hermes::ESTree::TSTypeReferenceNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TSTypeReferenceNode, hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*>(hermes::ESTree::IdentifierNode*, hermes::ESTree::IdentifierNode*, hermes::ESTree::TSTypeReferenceNode*) |
346 | | |
347 | | /// Sets staart, end and debug lcoations of an ast node. |
348 | | template <class Node, class StartLoc, class EndLoc, class DebugLoc> |
349 | 90.8k | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { |
350 | 90.8k | node->setStartLoc(getStartLoc(start)); |
351 | 90.8k | node->setEndLoc(getEndLoc(end)); |
352 | 90.8k | node->setDebugLoc(getStartLoc(debugLoc)); |
353 | 90.8k | return node; |
354 | 90.8k | } hermes::ESTree::VariableDeclaratorNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::VariableDeclaratorNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::VariableDeclaratorNode*) Line | Count | Source | 349 | 7 | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 7 | node->setStartLoc(getStartLoc(start)); | 351 | 7 | node->setEndLoc(getEndLoc(end)); | 352 | 7 | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 7 | return node; | 354 | 7 | } |
Unexecuted instantiation: hermes::ESTree::AssignmentPatternNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AssignmentPatternNode, hermes::ESTree::Node*, llvh::SMLoc, llvh::SMLoc>(hermes::ESTree::Node*, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AssignmentPatternNode*) Unexecuted instantiation: hermes::ESTree::OptionalMemberExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::OptionalMemberExpressionNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::OptionalMemberExpressionNode*) hermes::ESTree::MemberExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MemberExpressionNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::MemberExpressionNode*) Line | Count | Source | 349 | 226 | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 226 | node->setStartLoc(getStartLoc(start)); | 351 | 226 | node->setEndLoc(getEndLoc(end)); | 352 | 226 | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 226 | return node; | 354 | 226 | } |
hermes::ESTree::OptionalMemberExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::OptionalMemberExpressionNode, llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc>(llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::OptionalMemberExpressionNode*) Line | Count | Source | 349 | 17.9k | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 17.9k | node->setStartLoc(getStartLoc(start)); | 351 | 17.9k | node->setEndLoc(getEndLoc(end)); | 352 | 17.9k | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 17.9k | return node; | 354 | 17.9k | } |
hermes::ESTree::MemberExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::MemberExpressionNode, llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc>(llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::MemberExpressionNode*) Line | Count | Source | 349 | 12.6k | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 12.6k | node->setStartLoc(getStartLoc(start)); | 351 | 12.6k | node->setEndLoc(getEndLoc(end)); | 352 | 12.6k | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 12.6k | return node; | 354 | 12.6k | } |
hermes::ESTree::OptionalCallExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::OptionalCallExpressionNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::OptionalCallExpressionNode*) Line | Count | Source | 349 | 847 | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 847 | node->setStartLoc(getStartLoc(start)); | 351 | 847 | node->setEndLoc(getEndLoc(end)); | 352 | 847 | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 847 | return node; | 354 | 847 | } |
hermes::ESTree::CallExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::CallExpressionNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::CallExpressionNode*) Line | Count | Source | 349 | 2.25k | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 2.25k | node->setStartLoc(getStartLoc(start)); | 351 | 2.25k | node->setEndLoc(getEndLoc(end)); | 352 | 2.25k | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 2.25k | return node; | 354 | 2.25k | } |
Unexecuted instantiation: hermes::ESTree::TaggedTemplateExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::TaggedTemplateExpressionNode, llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc>(llvh::SMLoc, hermes::ESTree::Node*, llvh::SMLoc, hermes::ESTree::TaggedTemplateExpressionNode*) hermes::ESTree::NewExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::NewExpressionNode, llvh::SMRange, llvh::SMLoc, llvh::SMLoc>(llvh::SMRange, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::NewExpressionNode*) Line | Count | Source | 349 | 1 | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 1 | node->setStartLoc(getStartLoc(start)); | 351 | 1 | node->setEndLoc(getEndLoc(end)); | 352 | 1 | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 1 | return node; | 354 | 1 | } |
hermes::ESTree::UpdateExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::UpdateExpressionNode, llvh::SMLoc, hermes::parser::Token const*, hermes::parser::Token const*>(llvh::SMLoc, hermes::parser::Token const*, hermes::parser::Token const*, hermes::ESTree::UpdateExpressionNode*) Line | Count | Source | 349 | 14 | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 14 | node->setStartLoc(getStartLoc(start)); | 351 | 14 | node->setEndLoc(getEndLoc(end)); | 352 | 14 | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 14 | return node; | 354 | 14 | } |
hermes::ESTree::AssignmentExpressionNode* hermes::parser::detail::JSParserImpl::setLocation<hermes::ESTree::AssignmentExpressionNode, llvh::SMLoc, llvh::SMLoc, llvh::SMLoc>(llvh::SMLoc, llvh::SMLoc, llvh::SMLoc, hermes::ESTree::AssignmentExpressionNode*) Line | Count | Source | 349 | 56.9k | Node *setLocation(StartLoc start, EndLoc end, DebugLoc debugLoc, Node *node) { | 350 | 56.9k | node->setStartLoc(getStartLoc(start)); | 351 | 56.9k | node->setEndLoc(getEndLoc(end)); | 352 | 56.9k | node->setDebugLoc(getStartLoc(debugLoc)); | 353 | 56.9k | return node; | 354 | 56.9k | } |
|
355 | | |
356 | | // A group of overrides to extract the start and end location of various |
357 | | // objects. The purpose is to allow flexibility when passing the location |
358 | | // information to setLocation(). We could pass existing nodes, locations, |
359 | | // tokens, or a combination of them. |
360 | | |
361 | 11.2M | static SMLoc getStartLoc(const Token *tok) { |
362 | 11.2M | return tok->getStartLoc(); |
363 | 11.2M | } |
364 | 267k | static SMLoc getStartLoc(const ESTree::Node *from) { |
365 | 267k | return from->getStartLoc(); |
366 | 267k | } |
367 | 11.4M | static SMLoc getStartLoc(SMLoc loc) { |
368 | 11.4M | return loc; |
369 | 11.4M | } |
370 | 16.0k | static SMLoc getStartLoc(const SMRange &rng) { |
371 | 16.0k | return rng.Start; |
372 | 16.0k | } |
373 | | |
374 | 5.61M | static SMLoc getEndLoc(const Token *tok) { |
375 | 5.61M | return tok->getEndLoc(); |
376 | 5.61M | } |
377 | 177k | static SMLoc getEndLoc(const ESTree::Node *from) { |
378 | 177k | return from->getEndLoc(); |
379 | 177k | } |
380 | 5.70M | static SMLoc getEndLoc(SMLoc loc) { |
381 | 5.70M | return loc; |
382 | 5.70M | } |
383 | 2 | static SMLoc getEndLoc(const SMRange &rng) { |
384 | 2 | return rng.End; |
385 | 2 | } |
386 | | |
387 | 8.51M | SMLoc getPrevTokenEndLoc() const { |
388 | 8.51M | return lexer_.getPrevTokenEndLoc(); |
389 | 8.51M | } |
390 | | |
391 | | /// Obtain the next token from the lexer and store it in tok_. |
392 | | /// \param grammarContext enable recognizing either "/" and "/=", or a regexp. |
393 | | /// \return the source location of the just consumed (previous) token. |
394 | | SMRange advance( |
395 | 10.6M | JSLexer::GrammarContext grammarContext = JSLexer::AllowRegExp) { |
396 | 10.6M | SMRange loc = tok_->getSourceRange(); |
397 | 10.6M | tok_ = lexer_.advance(grammarContext); |
398 | 10.6M | return loc; |
399 | 10.6M | } |
400 | | |
401 | | /// Report an error that one of the specified tokens was expected at the |
402 | | /// location of the current token. |
403 | | /// \param where (optional) If non-null, it is appended to the error message, |
404 | | /// and is intended to explain the context in which these tokens |
405 | | /// were expected (e.g. "after 'if'") |
406 | | /// \param what (optional) If not null, showen as an additional hint about the |
407 | | /// error at the location specified by whatLoc. If whatLoc and the |
408 | | /// current token are on the same line, `what` is not displayed but |
409 | | /// the entire region between the location is emphasized. |
410 | | void errorExpected( |
411 | | ArrayRef<TokenKind> toks, |
412 | | const char *where, |
413 | | const char *what, |
414 | | SMLoc whatLoc); |
415 | | |
416 | | /// Convenience wrapper around errorExpected(). |
417 | | void errorExpected( |
418 | | TokenKind k1, |
419 | | const char *where, |
420 | | const char *what, |
421 | 8 | SMLoc whatLoc) { |
422 | 8 | errorExpected(ArrayRef<TokenKind>(k1), where, what, whatLoc); |
423 | 8 | } |
424 | | |
425 | | /// Convenience wrapper around errorExpected(). |
426 | | void errorExpected( |
427 | | TokenKind k1, |
428 | | TokenKind k2, |
429 | | const char *where, |
430 | | const char *what, |
431 | 0 | SMLoc whatLoc) { |
432 | 0 | TokenKind toks[] = {k1, k2}; |
433 | 0 | errorExpected(ArrayRef<TokenKind>(toks, 2), where, what, whatLoc); |
434 | 0 | }; |
435 | | |
436 | | /// Check whether the current token is the specified one and report an error |
437 | | /// if it isn't. \returns false if it reported an error. |
438 | | /// The extra params \p where, \p what and \p whatLoc are optional and are |
439 | | /// documented in errorExpected(). |
440 | | bool need(TokenKind kind, const char *where, const char *what, SMLoc whatLoc); |
441 | | |
442 | | /// Report an error to the SourceErrorManager. |
443 | 16 | void error(SMLoc loc, const llvh::Twine &message) { |
444 | 16 | sm_.error(loc, message, Subsystem::Parser); |
445 | 16 | } |
446 | | |
447 | | /// Report an error to the SourceErrorManager. |
448 | 0 | void error(SMRange range, const llvh::Twine &message) { |
449 | 0 | sm_.error(range, message, Subsystem::Parser); |
450 | 0 | } |
451 | | |
452 | | /// Report an error using the current token's location. |
453 | 0 | void error(const llvh::Twine &msg) { |
454 | 0 | error(tok_->getSourceRange(), msg); |
455 | 0 | } |
456 | | |
457 | | /// Emit an error at the specified source location and range. If the maximum |
458 | | /// number of errors has been reached, return false and move the scanning |
459 | | /// pointer to EOF. |
460 | | /// \return false if too many errors have been emitted and we need to abort. |
461 | | bool error(SMLoc loc, SMRange range, const llvh::Twine &msg); |
462 | | |
463 | | /// Check whether the current token is the specified one and if it is, consume |
464 | | /// it, otherwise an report an error. \returns false if it reported an error. |
465 | | /// \param grammarContext enable recognizing either "/" and "/=", or a regexp |
466 | | /// when consuming the next token. |
467 | | /// The extra params \p where, \p what and \p whatLoc are optional and are |
468 | | /// documented in errorExpected(). |
469 | | bool eat( |
470 | | TokenKind kind, |
471 | | JSLexer::GrammarContext grammarContext, |
472 | | const char *where, |
473 | | const char *what, |
474 | | SMLoc whatLoc); |
475 | | |
476 | | /// Check whether the current token is the specified one and consume it if so. |
477 | | /// \returns true if the token matched. |
478 | | bool checkAndEat( |
479 | | TokenKind kind, |
480 | | JSLexer::GrammarContext grammarContext = |
481 | | JSLexer::GrammarContext::AllowRegExp); |
482 | | /// Check whether the current token is the specified identifier and consume it |
483 | | /// if so. \returns true if the token matched. |
484 | | bool checkAndEat( |
485 | | UniqueString *ident, |
486 | | JSLexer::GrammarContext grammarContext = |
487 | | JSLexer::GrammarContext::AllowRegExp); |
488 | | /// Check whether the current token is the specified one. \returns true if it |
489 | | /// is. |
490 | 138M | bool check(TokenKind kind) const { |
491 | 138M | return tok_->getKind() == kind; |
492 | 138M | } |
493 | | /// \return true if the current token is the specified identifier. |
494 | 24.5M | bool check(UniqueString *ident) const { |
495 | 24.5M | return tok_->getKind() == TokenKind::identifier && |
496 | 17.3M | tok_->getIdentifier() == ident; |
497 | 24.5M | } |
498 | | /// Check whether the current token is one of the specified ones. \returns |
499 | | /// true if it is. |
500 | 11.4M | bool check(TokenKind kind1, TokenKind kind2) const { |
501 | 11.4M | return tok_->getKind() == kind1 || tok_->getKind() == kind2; |
502 | 11.4M | } |
503 | | |
504 | | template <typename T> |
505 | 21.1M | inline bool checkN(T t) const { |
506 | 21.1M | return check(t); |
507 | 21.1M | } bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind>(hermes::parser::TokenKind) const Line | Count | Source | 505 | 21.1M | inline bool checkN(T t) const { | 506 | 21.1M | return check(t); | 507 | 21.1M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::UniqueString*>(hermes::UniqueString*) const Line | Count | Source | 505 | 911 | inline bool checkN(T t) const { | 506 | 911 | return check(t); | 507 | 911 | } |
|
508 | | /// Convenience function to compare against more than 2 token kinds. We still |
509 | | /// use check() for 2 or 1 kinds because it is more typesafe. |
510 | | template <typename Head, typename... Tail> |
511 | 79.3M | inline bool checkN(Head h, Tail... tail) const { |
512 | 79.3M | return check(h) || checkN(tail...); |
513 | 79.3M | } bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 18.4M | inline bool checkN(Head h, Tail... tail) const { | 512 | 18.4M | return check(h) || checkN(tail...); | 513 | 18.4M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 18.4M | inline bool checkN(Head h, Tail... tail) const { | 512 | 18.4M | return check(h) || checkN(tail...); | 513 | 18.4M | } |
Unexecuted instantiation: bool hermes::parser::detail::JSParserImpl::checkN<hermes::UniqueString*, hermes::UniqueString*>(hermes::UniqueString*, hermes::UniqueString*) const Unexecuted instantiation: bool hermes::parser::detail::JSParserImpl::checkN<hermes::UniqueString*, hermes::UniqueString*, hermes::UniqueString*>(hermes::UniqueString*, hermes::UniqueString*, hermes::UniqueString*) const bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.24M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.24M | return check(h) || checkN(tail...); | 513 | 3.24M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::UniqueString*>(hermes::parser::TokenKind, hermes::UniqueString*) const Line | Count | Source | 511 | 932 | inline bool checkN(Head h, Tail... tail) const { | 512 | 932 | return check(h) || checkN(tail...); | 513 | 932 | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::UniqueString*>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::UniqueString*) const Line | Count | Source | 511 | 22 | inline bool checkN(Head h, Tail... tail) const { | 512 | 22 | return check(h) || checkN(tail...); | 513 | 22 | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
bool hermes::parser::detail::JSParserImpl::checkN<hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind>(hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind, hermes::parser::TokenKind) const Line | Count | Source | 511 | 3.29M | inline bool checkN(Head h, Tail... tail) const { | 512 | 3.29M | return check(h) || checkN(tail...); | 513 | 3.29M | } |
Unexecuted instantiation: bool hermes::parser::detail::JSParserImpl::checkN<hermes::UniqueString*, hermes::parser::TokenKind>(hermes::UniqueString*, hermes::parser::TokenKind) const Unexecuted instantiation: bool hermes::parser::detail::JSParserImpl::checkN<hermes::UniqueString*, hermes::UniqueString*, hermes::parser::TokenKind>(hermes::UniqueString*, hermes::UniqueString*, hermes::parser::TokenKind) const |
514 | | |
515 | | /// Check whether the current token is an assignment operator. |
516 | | bool checkAssign() const; |
517 | | |
518 | | /// Check whether the current token begins a Declaration. |
519 | 2.78M | bool checkDeclaration() { |
520 | 2.78M | if (checkN( |
521 | 2.78M | TokenKind::rw_function, TokenKind::rw_const, TokenKind::rw_class) || |
522 | 2.77M | (check(asyncIdent_) && checkAsyncFunction())) { |
523 | 7.81k | return true; |
524 | 7.81k | } |
525 | | |
526 | 2.77M | if (check(letIdent_)) { |
527 | 1.77k | if (isStrictMode()) { |
528 | 0 | return true; |
529 | 0 | } |
530 | | // In loose mode, 'let' requires more work to check. |
531 | | // let Identifier |
532 | | // let [ |
533 | | // let { |
534 | | // are all starts of 'let' declarations. |
535 | | // But 'let' can also be an Identifier in loose mode. |
536 | 1.77k | return lexer_.isLetFollowedByDeclStart(); |
537 | 1.77k | } |
538 | | |
539 | 2.77M | #if HERMES_PARSE_FLOW |
540 | 2.77M | if (context_.getParseFlow()) { |
541 | 0 | if (context_.getParseFlowComponentSyntax() && |
542 | 0 | checkComponentDeclarationFlow()) { |
543 | 0 | return true; |
544 | 0 | } |
545 | 0 | if (context_.getParseFlowComponentSyntax() && |
546 | 0 | checkHookDeclarationFlow()) { |
547 | 0 | return true; |
548 | 0 | } |
549 | 0 | if (check(opaqueIdent_)) { |
550 | 0 | auto optNext = lexer_.lookahead1(llvh::None); |
551 | 0 | return optNext.hasValue() && (*optNext == TokenKind::identifier); |
552 | 0 | } |
553 | 0 | if (checkN(typeIdent_, interfaceIdent_)) { |
554 | 0 | auto optNext = lexer_.lookahead1(llvh::None); |
555 | 0 | return optNext.hasValue() && *optNext == TokenKind::identifier; |
556 | 0 | } |
557 | 0 | if (check(TokenKind::rw_interface)) { |
558 | 0 | return true; |
559 | 0 | } |
560 | 0 | if (check(TokenKind::rw_enum)) { |
561 | 0 | return true; |
562 | 0 | } |
563 | 0 | } |
564 | 2.77M | #endif |
565 | | |
566 | 2.77M | #if HERMES_PARSE_TS |
567 | 2.77M | if (context_.getParseTS()) { |
568 | 0 | if (checkN(typeIdent_, interfaceIdent_, namespaceIdent_)) { |
569 | 0 | auto optNext = lexer_.lookahead1(llvh::None); |
570 | 0 | return optNext.hasValue() && *optNext == TokenKind::identifier; |
571 | 0 | } |
572 | 0 | if (check(TokenKind::rw_interface)) { |
573 | 0 | return true; |
574 | 0 | } |
575 | 0 | if (check(TokenKind::rw_enum)) { |
576 | 0 | return true; |
577 | 0 | } |
578 | 0 | } |
579 | 2.77M | #endif |
580 | | |
581 | 2.77M | return false; |
582 | 2.77M | } |
583 | | |
584 | 0 | bool checkDeclareType() { |
585 | 0 | #if HERMES_PARSE_FLOW |
586 | 0 | if (check(declareIdent_)) { |
587 | 0 | auto optNext = lexer_.lookahead1(llvh::None); |
588 | 0 | if (!optNext) |
589 | 0 | return false; |
590 | 0 | TokenKind next = *optNext; |
591 | 0 | return next == TokenKind::identifier || next == TokenKind::rw_interface || |
592 | 0 | next == TokenKind::rw_var || next == TokenKind::rw_const || |
593 | 0 | next == TokenKind::rw_function || next == TokenKind::rw_class || |
594 | 0 | next == TokenKind::rw_export || next == TokenKind::rw_enum; |
595 | 0 | } |
596 | 0 | #endif |
597 | 0 | return false; |
598 | 0 | } |
599 | | |
600 | | /// Check whether the current token begins a template literal. |
601 | 5.49M | bool checkTemplateLiteral() const { |
602 | 5.49M | return check(TokenKind::no_substitution_template, TokenKind::template_head); |
603 | 5.49M | } |
604 | | |
605 | | /// Whether to include the 'of' identifier when checking the end of an |
606 | | /// AssignmentExpression. |
607 | | enum class OfEndsAssignment { No, Yes }; |
608 | | |
609 | | /// Check whether the current token can be the token after the end of an |
610 | | /// AssignmentExpression. |
611 | | /// \param ofEndsAssignment needed because 'of' isn't reserved and can be used |
612 | | /// outside a for loop: |
613 | | /// yield of(); |
614 | | bool checkEndAssignmentExpression( |
615 | | OfEndsAssignment ofEndsAssignment = OfEndsAssignment::Yes) const; |
616 | | |
617 | | /// Check whether we match 'async [no LineTerminator here] function'. |
618 | | /// \pre the current token is 'async'. |
619 | | bool checkAsyncFunction(); |
620 | | |
621 | | /// Performs automatic semicolon insertion and optionally reports an error |
622 | | /// if a semicolon is missing and cannot be inserted. |
623 | | /// \param optional if set to true, an error will not be reported. |
624 | | /// \return false if a semi was not found and it could not be inserted. |
625 | | bool eatSemi(bool optional = false); |
626 | | |
627 | | /// Process a directive by updating internal flags appropriately. Currently |
628 | | /// we only care about "use strict". |
629 | | void processDirective(UniqueString *directive); |
630 | | |
631 | | /// Check whether the recursion depth has been exceeded, and if so generate |
632 | | /// and error and return true. |
633 | | /// If the depth has not been exceeded return false. |
634 | | /// NOTE: This is intended to stay inline to avoid a function call unless the |
635 | | /// depth was actually exceeded. |
636 | 9.08M | inline bool recursionDepthCheck() { |
637 | 9.08M | if (LLVM_LIKELY(recursionDepth_ < MAX_RECURSION_DEPTH)) { |
638 | 9.08M | return false; |
639 | 9.08M | } |
640 | 3 | return recursionDepthExceeded(); |
641 | 9.08M | } |
642 | | |
643 | | /// Generate an error and return true. |
644 | | bool recursionDepthExceeded(); |
645 | | |
646 | | // Parser functions. All of these correspond more or less directly to grammar |
647 | | // productions, except in cases where the grammar is ambiguous, but even then |
648 | | // the name should be self-explanatory. |
649 | | |
650 | | Optional<ESTree::ProgramNode *> parseProgram(); |
651 | | /// Parse a function declaration, and optionally force an eager parse. |
652 | | /// Otherwise, the function will be skipped in lazy mode and a dummy returned. |
653 | | /// \param param [Yield] |
654 | | Optional<ESTree::FunctionDeclarationNode *> parseFunctionDeclaration( |
655 | | Param param, |
656 | | bool forceEagerly = false); |
657 | | |
658 | | /// Parse a function declaration or expression, and optionally force an eager |
659 | | /// parse. Otherwise, the function will be skipped in lazy mode and a dummy |
660 | | /// returned. |
661 | | /// \param param [Yield, Default] |
662 | | Optional<ESTree::FunctionLikeNode *> parseFunctionHelper( |
663 | | Param param, |
664 | | bool isDeclaration, |
665 | | bool forceEagerly = false); |
666 | | |
667 | | /// Parse FormalParameters or UniqueFormalParameters with the leading '(' and |
668 | | /// the trailing ')'. |
669 | | /// \pre the current token must be '('. |
670 | | /// \param[out] paramList populated with the FormalParameters. |
671 | | /// \return true on success, false on failure. |
672 | | bool parseFormalParameters(Param param, ESTree::NodeList ¶mList); |
673 | | |
674 | | /// \param param [Yield, Return] |
675 | | Optional<ESTree::Node *> parseStatement(Param param); |
676 | | |
677 | | enum class AllowImportExport { |
678 | | No, |
679 | | Yes, |
680 | | }; |
681 | | |
682 | | /// Parse a statement list. |
683 | | /// \param param [Yield] |
684 | | /// \param until stop parsing when this token is enountered |
685 | | /// \param parseDirectives if true, recognize directives in the beginning of |
686 | | /// the block. Specifically, it will recognize "use strict" and enable |
687 | | /// strict mode. |
688 | | /// \return a dummy value for consistency. |
689 | | template <typename... Tail> |
690 | | Optional<bool> parseStatementList( |
691 | | Param param, |
692 | | TokenKind until, |
693 | | bool parseDirectives, |
694 | | AllowImportExport allowImportExport, |
695 | | ESTree::NodeList &stmtList, |
696 | | Tail... otherUntil); |
697 | | |
698 | | bool parseStatementListItem( |
699 | | Param param, |
700 | | AllowImportExport allowImportExport, |
701 | | ESTree::NodeList &stmtList); |
702 | | |
703 | | /// Parse a statement block. |
704 | | /// \param param [Yield, Return] |
705 | | /// \param grammarContext context to be used when consuming the closing brace. |
706 | | /// \param parseDirectives if true, recognize directives in the beginning of |
707 | | /// the block. Specifically, it will recognize "use strict" and enable |
708 | | /// strict mode. |
709 | | Optional<ESTree::BlockStatementNode *> parseBlock( |
710 | | Param param, |
711 | | JSLexer::GrammarContext grammarContext = JSLexer::AllowRegExp, |
712 | | bool parseDirectives = false); |
713 | | |
714 | | /// Parse a function body. This is a wrapper around parseBlock for the |
715 | | /// purposes of lazy parsing. |
716 | | /// \param paramYield the value of paramYield at the start of the function, |
717 | | /// used for lazy compilation. |
718 | | /// \param paramAwait the value of paramAwait at the start of the function, |
719 | | /// used for lazy compilation. |
720 | | /// \param param [Yield] |
721 | | Optional<ESTree::BlockStatementNode *> parseFunctionBody( |
722 | | Param param, |
723 | | bool eagerly, |
724 | | bool paramYield, |
725 | | bool paramAwait, |
726 | | JSLexer::GrammarContext grammarContext = JSLexer::AllowRegExp, |
727 | | bool parseDirectives = false); |
728 | | |
729 | | /// Parse a declaration. |
730 | | /// \param param [Yield] |
731 | | Optional<ESTree::Node *> parseDeclaration(Param param); |
732 | | |
733 | | /// Check if the provided string is a valid binding identifier. |
734 | | /// Can be used to validate identifiers after we've passed lexing them. |
735 | | /// The caller must report any errors if this function returns false. |
736 | | /// \param param [Yield] |
737 | | /// \param range the source range of the identifier to validate. |
738 | | /// \param id the string to be validated. |
739 | | /// \param kind the TokenKind provided when the string was lexed. |
740 | | /// \return true if \p id is a valid binding identifier. |
741 | | bool validateBindingIdentifier( |
742 | | Param param, |
743 | | SMRange range, |
744 | | UniqueString *id, |
745 | | TokenKind kind); |
746 | | |
747 | | /// ES 2015 12.1 |
748 | | /// Does not generate an error. It is expected that the caller will do it. |
749 | | /// \param param [Yield] |
750 | | Optional<ESTree::IdentifierNode *> parseBindingIdentifier(Param param); |
751 | | /// Parse a VariableStatement or LexicalDeclaration. |
752 | | /// \param param [In, Yield] |
753 | | Optional<ESTree::VariableDeclarationNode *> parseLexicalDeclaration( |
754 | | Param param); |
755 | | /// Parse a VariableStatement or LexicalDeclaration. |
756 | | /// \param param [Yield] |
757 | | Optional<ESTree::VariableDeclarationNode *> parseVariableStatement( |
758 | | Param param); |
759 | | |
760 | | /// Parse a PrivateName starting with the '#'. |
761 | | Optional<ESTree::PrivateNameNode *> parsePrivateName(); |
762 | | |
763 | | /// Parse a list of variable declarations. \returns a dummy value but the |
764 | | /// optionality still encodes the error condition. |
765 | | /// \param param [In, Yield] |
766 | | /// \param declLoc is the location of the `rw_var` token and is used for error |
767 | | /// display. |
768 | | Optional<const char *> parseVariableDeclarationList( |
769 | | Param param, |
770 | | ESTree::NodeList &declList, |
771 | | SMLoc declLoc); |
772 | | |
773 | | /// \param param [In, Yield] |
774 | | /// \param declLoc is the location of the let/var/const token and is used for |
775 | | /// error display. |
776 | | Optional<ESTree::VariableDeclaratorNode *> parseVariableDeclaration( |
777 | | Param param, |
778 | | SMLoc declLoc); |
779 | | |
780 | | /// Ensure that all destructuring declarations in the specified declaration |
781 | | /// node are initialized and report errors if they are not. |
782 | | void ensureDestructuringInitialized( |
783 | | ESTree::VariableDeclarationNode *declNode); |
784 | | |
785 | | Optional<ESTree::Node *> parseBindingPattern(Param param); |
786 | | Optional<ESTree::ArrayPatternNode *> parseArrayBindingPattern(Param param); |
787 | | Optional<ESTree::Node *> parseBindingElement(Param param); |
788 | | Optional<ESTree::Node *> parseBindingRestElement(Param param); |
789 | | /// Parse "'=' Initializer" in a binding pattern. |
790 | | Optional<ESTree::AssignmentPatternNode *> parseBindingInitializer( |
791 | | Param param, |
792 | | ESTree::Node *left); |
793 | | Optional<ESTree::ObjectPatternNode *> parseObjectBindingPattern(Param param); |
794 | | Optional<ESTree::PropertyNode *> parseBindingProperty(Param param); |
795 | | Optional<ESTree::Node *> parseBindingRestProperty(Param param); |
796 | | |
797 | | Optional<ESTree::EmptyStatementNode *> parseEmptyStatement(); |
798 | | /// \param param [Yield, Return] |
799 | | Optional<ESTree::Node *> parseExpressionOrLabelledStatement(Param param); |
800 | | /// \param param [Yield, Return] |
801 | | Optional<ESTree::IfStatementNode *> parseIfStatement(Param param); |
802 | | /// \param param [Yield, Return] |
803 | | Optional<ESTree::WhileStatementNode *> parseWhileStatement(Param param); |
804 | | /// \param param [Yield, Return] |
805 | | Optional<ESTree::DoWhileStatementNode *> parseDoWhileStatement(Param param); |
806 | | /// \param param [Yield, Return] |
807 | | Optional<ESTree::Node *> parseForStatement(Param param); |
808 | | Optional<ESTree::ContinueStatementNode *> parseContinueStatement(); |
809 | | Optional<ESTree::BreakStatementNode *> parseBreakStatement(); |
810 | | Optional<ESTree::ReturnStatementNode *> parseReturnStatement(); |
811 | | /// \param param [Yield, Return] |
812 | | Optional<ESTree::WithStatementNode *> parseWithStatement(Param param); |
813 | | /// \param param [Yield, Return] |
814 | | Optional<ESTree::SwitchStatementNode *> parseSwitchStatement(Param param); |
815 | | /// \param param [Yield] |
816 | | Optional<ESTree::ThrowStatementNode *> parseThrowStatement(Param param); |
817 | | /// \param param [Yield, Return] |
818 | | Optional<ESTree::TryStatementNode *> parseTryStatement(Param param); |
819 | | Optional<ESTree::DebuggerStatementNode *> parseDebuggerStatement(); |
820 | | |
821 | | Optional<ESTree::Node *> parsePrimaryExpression(); |
822 | | Optional<ESTree::ArrayExpressionNode *> parseArrayLiteral(); |
823 | | Optional<ESTree::ObjectExpressionNode *> parseObjectLiteral(); |
824 | | Optional<ESTree::Node *> parseSpreadElement(); |
825 | | Optional<ESTree::Node *> parsePropertyAssignment(bool eagerly); |
826 | | |
827 | | /// Parse a property key which is a string, number or identifier. If it is |
828 | | /// neither, reports an error. |
829 | | Optional<ESTree::Node *> parsePropertyName(); |
830 | | |
831 | | /// Parse a template literal starting at either TemplateHead or |
832 | | /// NoSubstitutionTemplate. |
833 | | /// \param param [Yield, Tagged] |
834 | | Optional<ESTree::Node *> parseTemplateLiteral(Param param); |
835 | | |
836 | | Optional<ESTree::FunctionExpressionNode *> parseFunctionExpression( |
837 | | bool forceEagerly = false); |
838 | | |
839 | | /// Indicates whether certain functions should recognize `?.` as a chaining |
840 | | /// operator. `?.` is not allowed in a NewExpression, for example. |
841 | | enum class IsConstructorCall { No, Yes }; |
842 | | |
843 | | /// Parse OptionalExpression except the MemberExpression production starting |
844 | | /// with "new". |
845 | | Optional<ESTree::Node *> parseOptionalExpressionExceptNew( |
846 | | IsConstructorCall isConstructorCall); |
847 | | |
848 | | /// The "tail" of \c parseOptionalExpressionExceptNew(). It parses the |
849 | | /// optional MemberExpression following the base PrimaryExpression. It is |
850 | | /// ordinarily called by \c parseOptionalExpressionExceptNew(), but we need |
851 | | /// to call it explicitly after parsing "new.target". |
852 | | Optional<ESTree::Node *> parseOptionalExpressionExceptNew_tail( |
853 | | IsConstructorCall isConstructorCall, |
854 | | SMLoc startLoc, |
855 | | ESTree::Node *expr); |
856 | | |
857 | | /// Returns a dummy Optional<> just to indicate success or failure like all |
858 | | /// other functions. |
859 | | Optional<const char *> parseArguments( |
860 | | ESTree::NodeList &argList, |
861 | | SMLoc &endLoc); |
862 | | |
863 | | /// \param startLoc the start location of the expression |
864 | | /// \param objectLoc the location of the object part of the expression and is |
865 | | /// used for error display. |
866 | | /// \param seenOptionalChain true if there was a ?. leading up to the |
867 | | /// member select (set by parseOptionalExpressionExceptNew) |
868 | | Optional<ESTree::Node *> parseMemberSelect( |
869 | | SMLoc startLoc, |
870 | | SMLoc objectLoc, |
871 | | ESTree::NodePtr expr, |
872 | | bool seenOptionalChain); |
873 | | |
874 | | /// \param startLoc the start location of the expression, used for error |
875 | | /// display. |
876 | | /// \param typeArgs the optional type arguments parsed before the '('. |
877 | | /// \param seenOptionalChain true when `?.` is used in the chain leading |
878 | | /// to this call expression |
879 | | /// \param optional true when `?.` is used immediately prior to the Arguments. |
880 | | Optional<ESTree::Node *> parseCallExpression( |
881 | | SMLoc startLoc, |
882 | | ESTree::NodePtr expr, |
883 | | ESTree::NodePtr typeArgs, |
884 | | bool seenOptionalChain, |
885 | | bool optional); |
886 | | |
887 | | /// Parse a \c NewExpression or a \c OptionalExpression. |
888 | | /// After we have recognized "new", there is an apparent ambiguity in the |
889 | | /// grammar between \c NewExpression and \c MemberExpression: |
890 | | /// |
891 | | /// \code |
892 | | /// NewExpression: |
893 | | /// MemberExpression |
894 | | /// new NewExpression |
895 | | /// |
896 | | /// MemberExpression: |
897 | | /// new MemberExpression Arguments |
898 | | /// \endcode |
899 | | /// |
900 | | /// The difference is that in the first case there are no arguments to the |
901 | | /// constructor. |
902 | | /// \param isConstructorCall is Yes when we have already recognized a "new". |
903 | | /// This is used because we must disallow the ?. token before the |
904 | | /// arguments to a constructor call only when "new" is used. For example, |
905 | | /// the code `new a?.b()` is not valid. |
906 | | Optional<ESTree::Node *> parseNewExpressionOrOptionalExpression( |
907 | | IsConstructorCall isConstructorCall); |
908 | | Optional<ESTree::Node *> parseLeftHandSideExpression(); |
909 | | /// Parse the remainder of a LHS expression after parsing a "new or optional |
910 | | /// expression". Includes parsing the type args and call args. |
911 | | Optional<ESTree::Node *> parseLeftHandSideExpressionTail( |
912 | | SMLoc startLoc, |
913 | | ESTree::Node *expr); |
914 | | Optional<ESTree::Node *> parsePostfixExpression(); |
915 | | Optional<ESTree::Node *> parseUnaryExpression(); |
916 | | |
917 | | /// Convert identifiers to the operator they represent. |
918 | | /// Called after each parseUnaryExpression to change identifiers that might be |
919 | | /// operators into their corresponding IDENT_OP tokens. |
920 | | inline void convertIdentOpIfPossible(); |
921 | | |
922 | | /// Parse a binary expression using a precedence table, in order to decrease |
923 | | /// recursion depth. |
924 | | Optional<ESTree::Node *> parseBinaryExpression(Param param); |
925 | | |
926 | | /// Whether to allow a typed arrow function in the assignment expression. |
927 | | enum class AllowTypedArrowFunction { No, Yes }; |
928 | | |
929 | | /// Whether to parse CoverTypedIdentifier nodes when seeing a `:`. |
930 | | /// These can only be used as typed parameters in certain contexts. |
931 | | enum class CoverTypedParameters { No, Yes }; |
932 | | |
933 | | Optional<ESTree::Node *> parseConditionalExpression( |
934 | | Param param = ParamIn, |
935 | | CoverTypedParameters coverTypedParameters = CoverTypedParameters::Yes); |
936 | | Optional<ESTree::YieldExpressionNode *> parseYieldExpression( |
937 | | Param param = ParamIn); |
938 | | |
939 | | Optional<ESTree::ClassDeclarationNode *> parseClassDeclaration(Param param); |
940 | | Optional<ESTree::ClassExpressionNode *> parseClassExpression(); |
941 | | |
942 | | enum class ClassParseKind { Declaration, Expression }; |
943 | | |
944 | | /// Parse the class starting after the name (which is optional). |
945 | | /// \param name the name if provided, nullptr if otherwise. |
946 | | /// \param if the name is provided, the type params if provided, nullptr |
947 | | /// otherwise. |
948 | | /// \param kind whether the class is a declaration or expression. |
949 | | Optional<ESTree::Node *> parseClassTail( |
950 | | SMLoc startLoc, |
951 | | ESTree::Node *name, |
952 | | ESTree::Node *typeParams, |
953 | | ClassParseKind kind); |
954 | | |
955 | | Optional<ESTree::ClassBodyNode *> parseClassBody(SMLoc startLoc); |
956 | | |
957 | | Optional<ESTree::Node *> parseClassElement( |
958 | | bool isStatic, |
959 | | SMRange startRange, |
960 | | bool declare, |
961 | | bool readonly, |
962 | | ESTree::NodeLabel accessibility, |
963 | | bool eagerly = false); |
964 | | |
965 | | /// Reparse the specified node as arrow function parameter list and store the |
966 | | /// parameter list in \p paramList. Print an error and return false on error, |
967 | | /// otherwise return true. |
968 | | /// \param hasNewLine whether the parameters had a newline before them. |
969 | | /// \param[in/out] isAsync the arrow function is async. The caller may already |
970 | | /// know this prior to calling this function, in which case `true` should be |
971 | | /// passed. Otherwise, this function will try to reparse a call expression |
972 | | /// into an async arrow function. |
973 | | bool reparseArrowParameters( |
974 | | ESTree::Node *node, |
975 | | bool hasNewLine, |
976 | | ESTree::NodeList ¶mList, |
977 | | bool &isAsync); |
978 | | |
979 | | /// \param hasNewLine whether the leftExpr to be reparsed |
980 | | /// has a newline immediately before it. |
981 | | /// \param forceAsync set to true when it is already known that the arrow |
982 | | /// function expression is 'async'. This occurs when there are no parens |
983 | | /// around the argument list. |
984 | | Optional<ESTree::Node *> parseArrowFunctionExpression( |
985 | | Param param, |
986 | | ESTree::Node *leftExpr, |
987 | | bool hasNewLine, |
988 | | ESTree::Node *typeParams, |
989 | | ESTree::Node *returnType, |
990 | | ESTree::Node *predicate, |
991 | | SMLoc startLoc, |
992 | | AllowTypedArrowFunction allowTypedArrowFunction, |
993 | | bool forceAsync); |
994 | | |
995 | | #if HERMES_PARSE_FLOW |
996 | | Optional<ESTree::Node *> tryParseTypedAsyncArrowFunction(Param param); |
997 | | |
998 | | /// Attempt to parse a CoverTypedIdentifierNode which consists of a |
999 | | /// node which may be an arrow parameter, a colon, and a type. |
1000 | | /// \param test the LHS of the potential CoverTypedIdentifierNode. |
1001 | | /// \param optional whether the potential CoverTypedIdentifierNode is |
1002 | | /// optional, meaning there was a question mark preceding the type annotation |
1003 | | /// \return nullptr if there was no error but attempting to parse the |
1004 | | /// node is not possible because \p test can't be a formal parameter, |
1005 | | /// or there wasn't a colon in the first place, None on error. |
1006 | | Optional<ESTree::Node *> tryParseCoverTypedIdentifierNode( |
1007 | | ESTree::Node *test, |
1008 | | bool optional); |
1009 | | #endif |
1010 | | |
1011 | | /// Reparse an ArrayExpression into an ArrayPattern. |
1012 | | /// \param inDecl whether this is a declaration context or assignment. |
1013 | | Optional<ESTree::Node *> reparseArrayAsignmentPattern( |
1014 | | ESTree::ArrayExpressionNode *AEN, |
1015 | | bool inDecl); |
1016 | | |
1017 | | /// Reparse an ObjectExpression into an ObjectPattern. |
1018 | | /// \param inDecl whether this is a declaration context or assignment. |
1019 | | Optional<ESTree::Node *> reparseObjectAssignmentPattern( |
1020 | | ESTree::ObjectExpressionNode *OEN, |
1021 | | bool inDecl); |
1022 | | |
1023 | | /// Reparse an ArrayExpression or ObjectExpression into ArrayPattern or |
1024 | | /// ObjectPattern. |
1025 | | /// \param inDecl whether this is a declaration context or assignment. |
1026 | | Optional<ESTree::Node *> reparseAssignmentPattern( |
1027 | | ESTree::Node *node, |
1028 | | bool inDecl); |
1029 | | |
1030 | | Optional<ESTree::Node *> parseAssignmentExpression( |
1031 | | Param param = ParamIn, |
1032 | | AllowTypedArrowFunction allowTypedArrowFunction = |
1033 | | AllowTypedArrowFunction::Yes, |
1034 | | CoverTypedParameters coverTypedParameters = CoverTypedParameters::Yes, |
1035 | | ESTree::Node *typeParams = nullptr); |
1036 | | |
1037 | | Optional<ESTree::Node *> parseExpression( |
1038 | | Param param = ParamIn, |
1039 | | CoverTypedParameters coverTypedParameters = CoverTypedParameters::Yes); |
1040 | | |
1041 | | /// Parse a FromClause and return the string literal representing the source. |
1042 | | Optional<ESTree::StringLiteralNode *> parseFromClause(); |
1043 | | |
1044 | | bool parseAssertClause(ESTree::NodeList &attributes); |
1045 | | |
1046 | | Optional<ESTree::ImportDeclarationNode *> parseImportDeclaration(); |
1047 | | |
1048 | | /// \return the kind of the import. |
1049 | | Optional<UniqueString *> parseImportClause(ESTree::NodeList &specifiers); |
1050 | | |
1051 | | Optional<ESTree::Node *> parseNameSpaceImport(); |
1052 | | bool parseNamedImports(ESTree::NodeList &specifiers); |
1053 | | Optional<ESTree::ImportSpecifierNode *> parseImportSpecifier(SMLoc importLoc); |
1054 | | |
1055 | | Optional<ESTree::Node *> parseExportDeclaration(); |
1056 | | |
1057 | | /// \param[out] specifiers the list of parsed specifiers. |
1058 | | /// \param[out] invalids ranges of potentially invalid exported symbols, |
1059 | | /// only if the clause is eventually followed by a FromClause. |
1060 | | bool parseExportClause( |
1061 | | ESTree::NodeList &specifiers, |
1062 | | llvh::SmallVectorImpl<SMRange> &invalids); |
1063 | | |
1064 | | /// \param[out] invalids ranges of potentially invalid exported symbols, |
1065 | | /// only if the clause is eventually followed by a FromClause. |
1066 | | /// Appended to if an exported name may be invalid. |
1067 | | Optional<ESTree::Node *> parseExportSpecifier( |
1068 | | SMLoc exportLoc, |
1069 | | llvh::SmallVectorImpl<SMRange> &invalids); |
1070 | | |
1071 | | /// If the current token can be recognised as a directive (ES5.1 14.1), |
1072 | | /// process the directive and return the allocated directive statement. |
1073 | | /// Note that this function never needs to returns an error. |
1074 | | /// \return the allocated directive statement if this is a directive, or |
1075 | | /// null if it isn't. |
1076 | | ESTree::ExpressionStatementNode *parseDirective(); |
1077 | | |
1078 | | #if HERMES_PARSE_JSX |
1079 | | Optional<ESTree::Node *> parseJSX(); |
1080 | | Optional<ESTree::Node *> parseJSXElement(SMLoc start); |
1081 | | Optional<ESTree::Node *> parseJSXFragment(SMLoc start); |
1082 | | |
1083 | | Optional<ESTree::JSXOpeningElementNode *> parseJSXOpeningElement(SMLoc start); |
1084 | | Optional<ESTree::Node *> parseJSXSpreadAttribute(); |
1085 | | Optional<ESTree::Node *> parseJSXAttribute(); |
1086 | | |
1087 | | /// \param children populated with the JSX children. |
1088 | | /// \return the JSXClosingElement or JSXClosingFragment. |
1089 | | Optional<ESTree::Node *> parseJSXChildren(ESTree::NodeList &children); |
1090 | | Optional<ESTree::Node *> parseJSXChildExpression(SMLoc start); |
1091 | | |
1092 | | /// Parse JSXClosingElement or JSXClosingFragment. |
1093 | | Optional<ESTree::Node *> parseJSXClosing(SMLoc start); |
1094 | | |
1095 | | enum class AllowJSXMemberExpression { No, Yes }; |
1096 | | |
1097 | | /// \param allowMemberExpression whether JSXMemberExpression (foo.bar) is a |
1098 | | /// valid parse of the JSXElementName. |
1099 | | Optional<ESTree::Node *> parseJSXElementName( |
1100 | | AllowJSXMemberExpression allowJSXMemberExpression); |
1101 | | #endif |
1102 | | |
1103 | | #if HERMES_PARSE_FLOW || HERMES_PARSE_TS |
1104 | | enum class AllowAnonFunctionType { No, Yes }; |
1105 | | |
1106 | | Optional<ESTree::Node *> parseTypeAnnotation( |
1107 | | Optional<SMLoc> wrappedStart = None, |
1108 | | AllowAnonFunctionType allowAnonFunctionType = |
1109 | 0 | AllowAnonFunctionType::Yes) { |
1110 | 0 | assert(context_.getParseFlow() || context_.getParseTS()); |
1111 | 0 | #if HERMES_PARSE_FLOW |
1112 | 0 | if (context_.getParseFlow()) |
1113 | 0 | return parseTypeAnnotationFlow(wrappedStart, allowAnonFunctionType); |
1114 | 0 | #endif |
1115 | 0 | #if HERMES_PARSE_TS |
1116 | 0 | return parseTypeAnnotationTS(wrappedStart); |
1117 | 0 | #endif |
1118 | 0 | llvm_unreachable("Must be parsing types"); |
1119 | 0 | } |
1120 | | |
1121 | | Optional<ESTree::Node *> parseReturnTypeAnnotation( |
1122 | | Optional<SMLoc> wrappedStart = None, |
1123 | | AllowAnonFunctionType allowAnonFunctionType = |
1124 | 0 | AllowAnonFunctionType::Yes) { |
1125 | 0 | assert(context_.getParseFlow() || context_.getParseTS()); |
1126 | 0 | #if HERMES_PARSE_FLOW |
1127 | 0 | if (context_.getParseFlow()) |
1128 | 0 | return parseReturnTypeAnnotationFlow(wrappedStart, allowAnonFunctionType); |
1129 | 0 | #endif |
1130 | 0 | #if HERMES_PARSE_TS |
1131 | 0 | return parseTypeAnnotationTS(wrappedStart); |
1132 | 0 | #endif |
1133 | 0 | llvm_unreachable("Must be parsing types"); |
1134 | 0 | } |
1135 | | |
1136 | 0 | Optional<ESTree::Node *> parseTypeArguments() { |
1137 | 0 | assert(context_.getParseFlow() || context_.getParseTS()); |
1138 | 0 | #if HERMES_PARSE_FLOW |
1139 | 0 | if (context_.getParseFlow()) |
1140 | 0 | return parseTypeArgsFlow(); |
1141 | 0 | #endif |
1142 | 0 | #if HERMES_PARSE_TS |
1143 | 0 | return parseTSTypeArguments(); |
1144 | 0 | #endif |
1145 | 0 | llvm_unreachable("Must be parsing types"); |
1146 | 0 | } |
1147 | | #endif |
1148 | | |
1149 | | #if HERMES_PARSE_FLOW |
1150 | | /// Allow parsing the initial part of an identifier + type annotation pair. |
1151 | | /// Used for the following syntax structure: |
1152 | | /// IdentifierName: TypeAnnotation |
1153 | | /// IdentifierName?: TypeAnnotation |
1154 | | /// TypeAnnotation |
1155 | | /// ^ |
1156 | | /// This will try parsing as a TypeAnnotation unless a known type ident is |
1157 | | /// found. In this case it will lookahead to see if a colon is present to |
1158 | | /// ensure the type annotation does not fail to parse. e.g. |
1159 | | /// type T = (component()) => void; |
1160 | | /// ^ |
1161 | | /// type T = (component: component()) => void; |
1162 | | /// ^ |
1163 | | /// In the above example the second case would fail when calling |
1164 | | /// `parseTypeAnnotationFlow` as it is not a valid Flow type annotation, |
1165 | | /// whereas `parseTypeAnnotationBeforeColonFlow` would lookahead for a colon |
1166 | | /// to know if a `GenericTypeAnnotation` is valid in this position instead. |
1167 | | /// \return A type annotation, if its known a colon is the preceding token a |
1168 | | /// GenericTypeAnnotation will be returned for unwrapping by |
1169 | | /// reparseTypeAnnotationAsIdentifierFlow. |
1170 | | Optional<ESTree::Node *> parseTypeAnnotationBeforeColonFlow(); |
1171 | | /// \param wrappedStart if set, the type annotation should be wrapped in a |
1172 | | /// TypeAnnotationNode starting at this location. If not set, the type |
1173 | | /// annotation should not be wrapped in a TypeAnnotationNode. |
1174 | | Optional<ESTree::Node *> parseTypeAnnotationFlow( |
1175 | | Optional<SMLoc> wrappedStart = None, |
1176 | | AllowAnonFunctionType allowAnonFunctionType = AllowAnonFunctionType::Yes); |
1177 | | /// \param wrappedStart if set, the type annotation should be wrapped in a |
1178 | | /// TypeAnnotationNode starting at this location. If not set, the type |
1179 | | /// annotation should not be wrapped in a TypeAnnotationNode. |
1180 | | Optional<ESTree::Node *> parseReturnTypeAnnotationFlow( |
1181 | | Optional<SMLoc> wrappedStart = None, |
1182 | | AllowAnonFunctionType allowAnonFunctionType = AllowAnonFunctionType::Yes); |
1183 | | |
1184 | | Optional<ESTree::Node *> parseFlowDeclaration(); |
1185 | | Optional<ESTree::Node *> parseDeclareFLow(SMLoc start); |
1186 | | bool checkComponentDeclarationFlow(); |
1187 | | Optional<ESTree::Node *> parseComponentDeclarationFlow( |
1188 | | SMLoc start, |
1189 | | bool declare); |
1190 | | bool checkHookDeclarationFlow(); |
1191 | | Optional<ESTree::Node *> parseHookDeclarationFlow(SMLoc start); |
1192 | | |
1193 | | /// This is for parsing the `renders` clause that comes after component |
1194 | | /// declarations, declared components, and component types, but not for |
1195 | | /// standalone render types. It assumes that you've already checked that there |
1196 | | /// is a `renders` clause. |
1197 | | Optional<ESTree::Node *> parseComponentRenderTypeFlow(bool componentType); |
1198 | | |
1199 | | /// Parse ComponentParameters with the leading '(' and the trailing ')'. |
1200 | | /// \pre the current token must be '('. \param[out] paramList populated |
1201 | | /// with the ComponentParameters. \return true on success, false on failure. |
1202 | | bool parseComponentParametersFlow(Param param, ESTree::NodeList ¶mList); |
1203 | | Optional<ESTree::Node *> parseComponentParameterFlow(Param param); |
1204 | | |
1205 | | Optional<ESTree::Node *> parseComponentTypeAnnotationFlow(); |
1206 | | /// Parse ComponentTypeParameters with the leading '(' and the trailing ')'. |
1207 | | /// \pre the current token must be '('. \param[out] paramList populated |
1208 | | /// with the ComponentTypeParameters. |
1209 | | /// \return the rest parameter if it exists, nullptr otherwise. None still |
1210 | | /// indicates an error. |
1211 | | Optional<ESTree::Node *> parseComponentTypeParametersFlow( |
1212 | | Param param, |
1213 | | ESTree::NodeList ¶mList); |
1214 | | Optional<ESTree::Node *> parseComponentTypeRestParameterFlow(Param param); |
1215 | | Optional<ESTree::Node *> parseComponentTypeParameterFlow(Param param); |
1216 | | |
1217 | | /// Checks if we are *maybe* at the start of a Flow match expression or |
1218 | | /// statement: `match` [no LineTerminator here] `(` |
1219 | 0 | bool checkMaybeFlowMatch() { |
1220 | 0 | if (!check(matchIdent_)) |
1221 | 0 | return false; |
1222 | 0 | return checkMaybeFlowMatchSlowPath(); |
1223 | 0 | } |
1224 | | bool checkMaybeFlowMatchSlowPath(); |
1225 | | /// Validate and process an argument list into a sequence expression for |
1226 | | /// use as the argument to a match statement or expression. |
1227 | | ESTree::Node *reparseArgumentsAsMatchArgumentFlow( |
1228 | | SMRange range, |
1229 | | ESTree::NodeList &&argList); |
1230 | | /// Attempt to parse a 'match' statement. Rollback if not successful. |
1231 | | /// \pre `checkMaybeFlowMatch()` is true, meaning the current token and |
1232 | | /// following token are: `match` [no LineTerminator here] `(` |
1233 | | /// \return nullptr if there was no error but attempting to parse the match |
1234 | | /// statement is not possible as `match` followed by Arguments, `match (...)`, |
1235 | | /// was not followed by a curly brace: [no LineTerminator here] `{`. |
1236 | | /// None on error. |
1237 | | Optional<ESTree::Node *> tryParseMatchStatementFlow(Param param); |
1238 | | /// Parse either a 'match' expression, or a call to an identifier |
1239 | | /// of the name 'match'. |
1240 | | Optional<ESTree::Node *> parseMatchCallOrMatchExpressionFlow(); |
1241 | | Optional<ESTree::Node *> parseMatchExpressionFlow( |
1242 | | SMLoc start, |
1243 | | ESTree::Node *argument); |
1244 | | Optional<ESTree::Node *> parseMatchPatternFlow(); |
1245 | | Optional<ESTree::Node *> parseMatchSubpatternFlow(); |
1246 | | Optional<ESTree::IdentifierNode *> parseMatchBindingIdentifierFlow(); |
1247 | | Optional<ESTree::MatchBindingPatternNode *> parseMatchBindingPatternFlow(); |
1248 | | Optional<ESTree::Node *> parseMatchRestPatternFlow(); |
1249 | | Optional<ESTree::Node *> parseMatchObjectPatternFlow(); |
1250 | | Optional<ESTree::Node *> parseMatchArrayPatternFlow(); |
1251 | | |
1252 | | enum class TypeAliasKind { None, Declare, Opaque, DeclareOpaque }; |
1253 | | Optional<ESTree::Node *> parseTypeAliasFlow(SMLoc start, TypeAliasKind kind); |
1254 | | |
1255 | | /// \param declareStart if set, parse a DeclareInterfaceNode starting at |
1256 | | /// this location. If not set, parse an InterfaceDeclarationNode. |
1257 | | Optional<ESTree::Node *> parseInterfaceDeclarationFlow( |
1258 | | Optional<SMLoc> declareStart = None); |
1259 | | |
1260 | | /// \pre current token is 'extends' or '{'. |
1261 | | /// \param[out] extends the super-interfaces for the parsed interface. |
1262 | | /// \return the body of the interface |
1263 | | Optional<ESTree::Node *> parseInterfaceTailFlow( |
1264 | | SMLoc start, |
1265 | | ESTree::NodeList &extends); |
1266 | | bool parseInterfaceExtends(SMLoc start, ESTree::NodeList &extends); |
1267 | | |
1268 | | Optional<ESTree::Node *> parseDeclareFunctionFlow(SMLoc start); |
1269 | | Optional<ESTree::Node *> parseDeclareHookFlow(SMLoc start); |
1270 | | Optional<ESTree::Node *> parseDeclareFunctionOrHookFlow( |
1271 | | SMLoc start, |
1272 | | bool hook); |
1273 | | Optional<ESTree::Node *> parseDeclareClassFlow(SMLoc start); |
1274 | | Optional<ESTree::Node *> parseDeclareExportFlow(SMLoc start); |
1275 | | Optional<ESTree::Node *> parseDeclareModuleFlow(SMLoc start); |
1276 | | Optional<ESTree::Node *> parseDeclareNamespaceFlow(SMLoc start); |
1277 | | |
1278 | | Optional<ESTree::Node *> parseExportTypeDeclarationFlow(SMLoc start); |
1279 | | |
1280 | | Optional<ESTree::Node *> parseConditionalTypeAnnotationFlow(); |
1281 | | Optional<ESTree::Node *> parseUnionTypeAnnotationFlow(); |
1282 | | Optional<ESTree::Node *> parseIntersectionTypeAnnotationFlow(); |
1283 | | Optional<ESTree::Node *> parseAnonFunctionWithoutParensTypeAnnotationFlow(); |
1284 | | Optional<ESTree::Node *> parsePrefixTypeAnnotationFlow(); |
1285 | | Optional<ESTree::Node *> parsePostfixTypeAnnotationFlow(); |
1286 | | Optional<ESTree::Node *> parsePrimaryTypeAnnotationFlow(); |
1287 | | Optional<ESTree::Node *> parseTypeofTypeAnnotationFlow(); |
1288 | | Optional<ESTree::Node *> parseTupleTypeAnnotationFlow(); |
1289 | | // \param startsWithDotDotDot whether the element started with '...' |
1290 | | Optional<ESTree::Node *> parseTupleElementFlow( |
1291 | | SMLoc startLoc, |
1292 | | bool startsWithDotDotDot); |
1293 | | Optional<ESTree::Node *> parseFunctionTypeAnnotationFlow(); |
1294 | | Optional<ESTree::Node *> parseHookTypeAnnotationFlow(); |
1295 | | Optional<ESTree::Node *> parseFunctionOrHookTypeAnnotationFlow(bool hook); |
1296 | | Optional<ESTree::Node *> parseFunctionTypeAnnotationWithParamsFlow( |
1297 | | SMLoc start, |
1298 | | ESTree::NodeList &¶ms, |
1299 | | ESTree::Node *thisConstraint, |
1300 | | ESTree::Node *rest, |
1301 | | ESTree::Node *typeParams, |
1302 | | bool hook); |
1303 | | Optional<ESTree::Node *> parseFunctionOrGroupTypeAnnotationFlow(); |
1304 | | |
1305 | | /// Whether to allow 'proto' properties in an object type annotation. |
1306 | | enum class AllowProtoProperty { No, Yes }; |
1307 | | |
1308 | | /// Whether to allow 'static' properties in an object type annotation. |
1309 | | enum class AllowStaticProperty { No, Yes }; |
1310 | | |
1311 | | /// Whether to allow spread properties in an object type annotation. |
1312 | | enum class AllowSpreadProperty { No, Yes }; |
1313 | | |
1314 | | Optional<ESTree::Node *> parseObjectTypeAnnotationFlow( |
1315 | | AllowProtoProperty allowProtoProperty, |
1316 | | AllowStaticProperty allowStaticProperty, |
1317 | | AllowSpreadProperty allowSpreadProperty); |
1318 | | bool parseObjectTypePropertiesFlow( |
1319 | | AllowProtoProperty allowProtoProperty, |
1320 | | AllowStaticProperty allowStaticProperty, |
1321 | | AllowSpreadProperty allowSpreadProperty, |
1322 | | ESTree::NodeList &properties, |
1323 | | ESTree::NodeList &indexers, |
1324 | | ESTree::NodeList &callProperties, |
1325 | | ESTree::NodeList &internalSlots, |
1326 | | bool &inexact); |
1327 | | bool parsePropertyTypeAnnotationFlow( |
1328 | | AllowProtoProperty allowProtoProperty, |
1329 | | AllowStaticProperty allowStaticProperty, |
1330 | | ESTree::NodeList &properties, |
1331 | | ESTree::NodeList &indexers, |
1332 | | ESTree::NodeList &callProperties, |
1333 | | ESTree::NodeList &internalSlots); |
1334 | | |
1335 | | /// Current token must be immediately after the left token e.g. '[T' |
1336 | | Optional<ESTree::Node *> parseTypeMappedTypePropertyFlow( |
1337 | | SMLoc start, |
1338 | | ESTree::Node *left, |
1339 | | ESTree::Node *variance); |
1340 | | /// Current token must be immediately after the left token e.g. '[T' |
1341 | | Optional<ESTree::Node *> parseTypeIndexerPropertyFlow( |
1342 | | SMLoc start, |
1343 | | ESTree::Node *left, |
1344 | | ESTree::Node *variance, |
1345 | | bool isStatic); |
1346 | | |
1347 | | Optional<ESTree::Node *> parseTypePropertyFlow( |
1348 | | SMLoc start, |
1349 | | ESTree::Node *variance, |
1350 | | bool isStatic, |
1351 | | bool proto, |
1352 | | ESTree::Node *key); |
1353 | | Optional<ESTree::Node *> |
1354 | | parseMethodTypePropertyFlow(SMLoc start, bool isStatic, ESTree::Node *key); |
1355 | | Optional<ESTree::Node *> parseGetOrSetTypePropertyFlow( |
1356 | | SMLoc start, |
1357 | | bool isStatic, |
1358 | | bool isGetter, |
1359 | | ESTree::Node *key); |
1360 | | |
1361 | | Optional<ESTree::Node *> parseTypeParamsFlow(); |
1362 | | Optional<ESTree::Node *> parseTypeParamFlow(); |
1363 | | Optional<ESTree::Node *> parseTypeArgsFlow(); |
1364 | | |
1365 | | /// \param[out] params the parameters, populated by reference. |
1366 | | /// \param[out] thisConstraint the type annotation for 'this'. |
1367 | | /// \return the rest parameter if it exists, nullptr otherwise. None still |
1368 | | /// indicates an error. |
1369 | | Optional<ESTree::FunctionTypeParamNode *> |
1370 | | parseFunctionTypeAnnotationParamsFlow( |
1371 | | ESTree::NodeList ¶ms, |
1372 | | ESTree::NodePtr &thisConstraint, |
1373 | | bool hook); |
1374 | | Optional<ESTree::FunctionTypeParamNode *> parseHookTypeAnnotationParamFlow(); |
1375 | | Optional<ESTree::FunctionTypeParamNode *> |
1376 | | parseFunctionTypeAnnotationParamFlow(); |
1377 | | |
1378 | | Optional<ESTree::Node *> parseTypeCallPropertyFlow( |
1379 | | SMLoc start, |
1380 | | bool isStatic); |
1381 | | |
1382 | | Optional<ESTree::GenericTypeAnnotationNode *> parseGenericTypeFlow(); |
1383 | | |
1384 | | Optional<ESTree::ClassImplementsNode *> parseClassImplementsFlow(); |
1385 | | |
1386 | | /// Parse a property which looks like a method, starting at the opening '('. |
1387 | | /// \param typeParams (optional) type params between '<' and '>' before '('. |
1388 | | Optional<ESTree::FunctionTypeAnnotationNode *> |
1389 | | parseMethodishTypeAnnotationFlow(SMLoc start, ESTree::Node *typeParams); |
1390 | | |
1391 | | Optional<ESTree::Node *> parsePredicateFlow(); |
1392 | | |
1393 | | /// Process a TypeAnnotation node and validate it matches the parsing rules |
1394 | | /// for an identifier. |
1395 | | /// \return identifier name equivalent of the passed TypeAnnotation node. None |
1396 | | /// indicates an error. |
1397 | | Optional<UniqueString *> reparseTypeAnnotationAsIdFlow( |
1398 | | ESTree::Node *typeAnnotation); |
1399 | | /// Process a TypeAnnotation node into a valid Identifier node. |
1400 | | /// \return identifier name equivalent of the passed TypeAnnotation node. None |
1401 | | /// indicates an error. |
1402 | | Optional<ESTree::IdentifierNode *> reparseTypeAnnotationAsIdentifierFlow( |
1403 | | ESTree::Node *typeAnnotation); |
1404 | | |
1405 | | enum class EnumKind { |
1406 | | String, |
1407 | | Number, |
1408 | | BigInt, |
1409 | | Boolean, |
1410 | | Symbol, |
1411 | | }; |
1412 | | |
1413 | 0 | static llvh::StringRef enumKindStrFlow(EnumKind kind) { |
1414 | 0 | switch (kind) { |
1415 | 0 | case EnumKind::String: |
1416 | 0 | return "string"; |
1417 | 0 | case EnumKind::Number: |
1418 | 0 | return "number"; |
1419 | 0 | case EnumKind::BigInt: |
1420 | 0 | return "bigint"; |
1421 | 0 | case EnumKind::Boolean: |
1422 | 0 | return "boolean"; |
1423 | 0 | case EnumKind::Symbol: |
1424 | 0 | return "symbol"; |
1425 | 0 | } |
1426 | 0 | llvm_unreachable("No other kind of enum"); |
1427 | 0 | } |
1428 | | |
1429 | 0 | static OptValue<EnumKind> getMemberEnumKindFlow(ESTree::Node *member) { |
1430 | 0 | switch (member->getKind()) { |
1431 | 0 | case ESTree::NodeKind::EnumStringMember: |
1432 | 0 | return EnumKind::String; |
1433 | 0 | case ESTree::NodeKind::EnumNumberMember: |
1434 | 0 | return EnumKind::Number; |
1435 | 0 | case ESTree::NodeKind::EnumBigIntMember: |
1436 | 0 | return EnumKind::BigInt; |
1437 | 0 | case ESTree::NodeKind::EnumBooleanMember: |
1438 | 0 | return EnumKind::Boolean; |
1439 | 0 | default: |
1440 | 0 | return None; |
1441 | 0 | } |
1442 | 0 | } |
1443 | | |
1444 | | /// \param declare whether this is 'declare enum' |
1445 | | Optional<ESTree::Node *> parseEnumDeclarationFlow(SMLoc start, bool declare); |
1446 | | Optional<ESTree::Node *> parseEnumBodyFlow( |
1447 | | OptValue<EnumKind> optKind, |
1448 | | Optional<SMLoc> explicitTypeStart); |
1449 | | Optional<ESTree::Node *> parseEnumMemberFlow(); |
1450 | | #endif |
1451 | | |
1452 | | #if HERMES_PARSE_TS |
1453 | | /// Whether a TS function type is a constructor. |
1454 | | enum class IsConstructorType { No, Yes }; |
1455 | | |
1456 | | Optional<ESTree::Node *> parseTypeAnnotationTS( |
1457 | | Optional<SMLoc> wrappedStart = None); |
1458 | | |
1459 | | Optional<ESTree::Node *> parseTSDeclaration(); |
1460 | | Optional<ESTree::Node *> parseTSTypeAliasDeclaration(SMLoc start); |
1461 | | Optional<ESTree::Node *> parseTSInterfaceDeclaration(); |
1462 | | Optional<ESTree::Node *> parseTSEnumDeclaration(); |
1463 | | Optional<ESTree::Node *> parseTSEnumMember(); |
1464 | | Optional<ESTree::Node *> parseTSNamespaceDeclaration(); |
1465 | | |
1466 | | Optional<ESTree::Node *> parseTSTypeParameters(); |
1467 | | Optional<ESTree::Node *> parseTSTypeParameter(); |
1468 | | |
1469 | | Optional<ESTree::Node *> parseTSUnionType(); |
1470 | | Optional<ESTree::Node *> parseTSIntersectionType(); |
1471 | | Optional<ESTree::Node *> parseTSTupleType(); |
1472 | | Optional<ESTree::Node *> parseTSFunctionOrParenthesizedType( |
1473 | | SMLoc start, |
1474 | | ESTree::Node *typeParams, |
1475 | | IsConstructorType isConstructorType); |
1476 | | bool parseTSFunctionTypeParams(SMLoc start, ESTree::NodeList ¶ms); |
1477 | | Optional<ESTree::Node *> parseTSFunctionTypeParam(); |
1478 | | |
1479 | | Optional<ESTree::Node *> parseTSObjectType(); |
1480 | | Optional<ESTree::Node *> parseTSObjectTypeMember(); |
1481 | | Optional<ESTree::Node *> parseTSIndexSignature(SMLoc start); |
1482 | | |
1483 | | Optional<ESTree::Node *> parseTSPostfixType(); |
1484 | | Optional<ESTree::Node *> parseTSPrimaryType(); |
1485 | | Optional<ESTree::TSTypeReferenceNode *> parseTSTypeReference(); |
1486 | | Optional<ESTree::Node *> parseTSQualifiedName(); |
1487 | | Optional<ESTree::Node *> parseTSTypeQuery(); |
1488 | | Optional<ESTree::Node *> parseTSTypeArguments(); |
1489 | | |
1490 | | ESTree::Node *reparseIdentifierAsTSTypeAnnotation( |
1491 | | ESTree::IdentifierNode *ident); |
1492 | | |
1493 | | /// Check if the given token kind may come right after a modifier. |
1494 | | /// It is often called with a lookahead token to decide whether the current |
1495 | | /// token is a modifier or not based on the context. |
1496 | | /// |
1497 | | /// \param optTokenKind an optional TokenKind value. |
1498 | | /// \return true if the given token kind is one of the modifier or identifier |
1499 | | /// kinds. false otherwise. |
1500 | 0 | static bool canFollowModifierTS(OptValue<TokenKind> optTokenKind) { |
1501 | 0 | if (!optTokenKind.hasValue()) { |
1502 | 0 | return false; |
1503 | 0 | } |
1504 | 0 | switch (*optTokenKind) { |
1505 | 0 | case TokenKind::identifier: |
1506 | 0 | case TokenKind::private_identifier: |
1507 | 0 | case TokenKind::rw_private: |
1508 | 0 | case TokenKind::rw_protected: |
1509 | 0 | case TokenKind::rw_public: |
1510 | 0 | case TokenKind::rw_static: |
1511 | 0 | return true; |
1512 | 0 | default: |
1513 | 0 | return false; |
1514 | 0 | } |
1515 | 0 | } |
1516 | | #endif |
1517 | | |
1518 | | /// RAII to save and restore the current setting of "strict mode" and |
1519 | | /// "seen directives". |
1520 | | class SaveStrictModeAndSeenDirectives { |
1521 | | JSParserImpl *const parser_; |
1522 | | const bool oldStrictMode_; |
1523 | | const unsigned oldSeenDirectiveSize_; |
1524 | | |
1525 | | public: |
1526 | | explicit SaveStrictModeAndSeenDirectives(JSParserImpl *parser) |
1527 | 99.7k | : parser_(parser), |
1528 | 99.7k | oldStrictMode_(parser->isStrictMode()), |
1529 | 99.7k | oldSeenDirectiveSize_(parser->getSeenDirectives().size()) {} |
1530 | 99.7k | ~SaveStrictModeAndSeenDirectives() { |
1531 | 99.7k | parser_->setStrictMode(oldStrictMode_); |
1532 | 99.7k | parser_->getSeenDirectives().resize(oldSeenDirectiveSize_); |
1533 | 99.7k | } |
1534 | | }; |
1535 | | |
1536 | | /// RAII to track the recursion depth. |
1537 | | class TrackRecursion { |
1538 | | JSParserImpl *const parser_; |
1539 | | |
1540 | | public: |
1541 | 9.04M | TrackRecursion(JSParserImpl *parser) : parser_(parser) { |
1542 | 9.04M | ++parser_->recursionDepth_; |
1543 | 9.04M | } |
1544 | 9.04M | ~TrackRecursion() { |
1545 | 9.04M | --parser_->recursionDepth_; |
1546 | 9.04M | } |
1547 | | }; |
1548 | | |
1549 | | /// Declare a RAII recursion tracker. Check whether the recursion limit has |
1550 | | /// been exceeded, and if so generate an error and return an empty |
1551 | | /// llvh::Optional<>. |
1552 | | /// The macro only works from inside JSParserImpl methods. |
1553 | | #define CHECK_RECURSION \ |
1554 | 9.04M | TrackRecursion trackRecursion{this}; \ |
1555 | 9.04M | if (recursionDepthCheck()) \ |
1556 | 9.04M | return llvh::None; |
1557 | | }; |
1558 | | |
1559 | | } // namespace detail |
1560 | | } // namespace parser |
1561 | | } // namespace hermes |
1562 | | |
1563 | | #endif // HERMES_PARSER_JSPARSERIMPL_H |