1 // Copyright 2020 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_PARSING_IMPORT_ASSERTIONS_H_ 6 #define V8_PARSING_IMPORT_ASSERTIONS_H_ 7 8 #include "src/parsing/scanner.h" // Only for Scanner::Location. 9 #include "src/zone/zone-containers.h" 10 11 namespace v8 { 12 namespace internal { 13 14 struct V8_EXPORT_PRIVATE ImportAssertionsKeyComparer { 15 bool operator()(const AstRawString* lhs, const AstRawString* rhs) const; 16 }; 17 18 class ImportAssertions 19 : public ZoneMap<const AstRawString*, 20 std::pair<const AstRawString*, Scanner::Location>, 21 ImportAssertionsKeyComparer> { 22 public: ImportAssertions(Zone * zone)23 explicit ImportAssertions(Zone* zone) 24 : ZoneMap<const AstRawString*, 25 std::pair<const AstRawString*, Scanner::Location>, 26 ImportAssertionsKeyComparer>(zone) {} 27 }; 28 29 } // namespace internal 30 } // namespace v8 31 32 #endif // V8_PARSING_IMPORT_ASSERTIONS_H_ 33