1// Copyright 2013 The Flutter 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 LIB_TONIC_PARSERS_PACKAGES_MAP_H_
6#define LIB_TONIC_PARSERS_PACKAGES_MAP_H_
7
8#include <string>
9#include <unordered_map>
10
11namespace tonic {
12
13class PackagesMap {
14 public:
15 PackagesMap();
16 ~PackagesMap();
17
18 bool Parse(const std::string& source, std::string* error);
19 std::string Resolve(const std::string& package_name);
20
21 private:
22 std::unordered_map<std::string, std::string> map_;
23};
24
25} // namespace tonic
26
27#endif // LIB_TONIC_PARSERS_PACKAGES_MAP_H_
28