azalea_brigadier/
parse_results.rs

1use std::{
2    collections::HashMap,
3    fmt::{self, Debug},
4    rc::Rc,
5};
6
7use crate::{
8    context::CommandContextBuilder, errors::CommandSyntaxError, string_reader::StringReader,
9    tree::CommandNode,
10};
11
12pub struct ParseResults<'a, S> {
13    pub context: CommandContextBuilder<'a, S>,
14    pub reader: StringReader,
15    pub exceptions: HashMap<Rc<CommandNode<S>>, CommandSyntaxError>,
16}
17
18impl<S> Debug for ParseResults<'_, S> {
19    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20        f.debug_struct("ParseResults")
21            .field("context", &self.context)
22            // .field("reader", &self.reader)
23            .field("exceptions", &self.exceptions)
24            .finish()
25    }
26}