1 // Copyright 2017 The Fuchsia 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 ZIRCON_SYSTEM_HOST_BANJO_INCLUDE_BANJO_IDENTIFIER_TABLE_H_ 6 #define ZIRCON_SYSTEM_HOST_BANJO_INCLUDE_BANJO_IDENTIFIER_TABLE_H_ 7 8 #include <stdint.h> 9 10 #include <map> 11 12 #include "banjo/source_file.h" 13 #include "string_view.h" 14 #include "token.h" 15 #include "types.h" 16 17 namespace banjo { 18 19 class IdentifierTable { 20 public: 21 IdentifierTable(); 22 23 Token MakeIdentifier(SourceLocation previous_end, 24 StringView source_data, const SourceFile& source_file, 25 bool escaped_identifier) const; 26 27 private: 28 std::map<StringView, Token::Subkind> keyword_table_; 29 }; 30 31 } // namespace banjo 32 33 #endif // ZIRCON_SYSTEM_HOST_BANJO_INCLUDE_BANJO_IDENTIFIER_TABLE_H_ 34