Home | History | Annotate | Download | only in parsing
      1 // Copyright 2011 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_DUPLICATE_FINDER_H_
      6 #define V8_PARSING_DUPLICATE_FINDER_H_
      7 
      8 #include <set>
      9 
     10 namespace v8 {
     11 namespace internal {
     12 
     13 class Scanner;
     14 
     15 // DuplicateFinder : Helper class to discover duplicate symbols.
     16 //
     17 // Allocate a DuplicateFinder for each set of symbols you want to check
     18 // for duplicates and then pass this instance into
     19 // Scanner::IsDuplicateSymbol(..).
     20 //
     21 // This class only holds the data; all actual logic is in
     22 // Scanner::IsDuplicateSymbol.
     23 class DuplicateFinder {
     24  public:
     25   DuplicateFinder() {}
     26 
     27  private:
     28   friend class Scanner;
     29 
     30   std::set<const void*> known_symbols_;
     31 };
     32 
     33 }  // namespace internal
     34 }  // namespace v8
     35 
     36 #endif  // V8_PARSING_DUPLICATE_FINDER_H_
     37