chromium/components/subresource_filter/tools/rule_parser/rule_parser.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULE_PARSER_RULE_PARSER_H_
#define COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULE_PARSER_RULE_PARSER_H_

#include <stddef.h>
#include <ostream>
#include <string>
#include <string_view>

#include "components/subresource_filter/tools/rule_parser/rule.h"

namespace subresource_filter {

// A parser of EasyList rules. It is intended to be (re-)used for parsing
// multiple rules.
// TODO(pkalinnikov): Support 'sitekey', 'collapse', and 'donottrack' options.
class RuleParser {};

// Pretty-prints the parsing |error| to |out|, e.g. like this:
//   (error:22) Unknown URL rule option:
//   @@example.org$script,unknown_option
//                        ^
std::ostream& operator<<(std::ostream& out,
                         const RuleParser::ParseError& error);

}  // namespace subresource_filter

#endif  // COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULE_PARSER_RULE_PARSER_H_