aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/parse_results.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-17 14:02:13 -0500
committermat <github@matdoes.dev>2022-04-17 14:02:13 -0500
commita72a47ced76065caf739898954cd18edbc39174b (patch)
tree5526c7663f253bbd7c8318b9d98413f1f2074852 /azalea-brigadier/src/parse_results.rs
parent4ff67d4917ce333232189e86aee09f2d82451fc6 (diff)
downloadazalea-drasl-a72a47ced76065caf739898954cd18edbc39174b.tar.xz
Rewrite brigadier
Diffstat (limited to 'azalea-brigadier/src/parse_results.rs')
-rw-r--r--azalea-brigadier/src/parse_results.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/azalea-brigadier/src/parse_results.rs b/azalea-brigadier/src/parse_results.rs
index 8b137891..fb862dec 100644
--- a/azalea-brigadier/src/parse_results.rs
+++ b/azalea-brigadier/src/parse_results.rs
@@ -1 +1,21 @@
+use crate::{
+ context::CommandContextBuilder, exceptions::command_syntax_exception::CommandSyntaxException,
+ string_reader::StringReader, tree::CommandNode,
+};
+use std::{any::Any, collections::HashMap, fmt::Debug, rc::Rc};
+pub struct ParseResults<S: Any + Clone> {
+ pub context: CommandContextBuilder<S>,
+ pub reader: StringReader,
+ pub exceptions: HashMap<Rc<CommandNode<S>>, CommandSyntaxException>,
+}
+
+impl<S: Any + Clone> Debug for ParseResults<S> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("ParseResults")
+ .field("context", &self.context)
+ // .field("reader", &self.reader)
+ .field("exceptions", &self.exceptions)
+ .finish()
+ }
+}