nixd
Loading...
Searching...
No Matches
include/nixf/Parse/Parser.h
Go to the documentation of this file.
1/// \file
2/// \brief Parser interface.
3///
4/// libnixf parser. This is a recursive descent parser, focusing on error
5/// recovery.
6#pragma once
7
8#include <memory>
9#include <string_view>
10#include <vector>
11
12namespace nixf {
13
14class Node;
15class Diagnostic;
16
17/// \brief Parse a string.
18/// \param Src The string to parse.
19/// \param Diags Diagnostics will be appended to this vector.
20std::shared_ptr<Node> parse(std::string_view Src,
21 std::vector<Diagnostic> &Diags);
22
23} // namespace nixf
std::shared_ptr< Node > parse(std::string_view Src, std::vector< Diagnostic > &Diags)
Parse a string.