aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context/parsed_command_node.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-04-20 01:34:12 +0000
committerGitHub <noreply@github.com>2022-04-20 01:34:12 +0000
commit5fd87615cf1514c7f9a0358988964768ded3f06e (patch)
tree001c3c760fdae8fe7b72cacb1f87d3703cc4e82c /azalea-brigadier/src/context/parsed_command_node.rs
parentd09762f5d38ab1200fb08ca3b1178813b4e47081 (diff)
parentbe194c1ca136100fd8f53ed068d82c9f7ae32870 (diff)
downloadazalea-drasl-5fd87615cf1514c7f9a0358988964768ded3f06e.tar.xz
Merge pull request #1 from mat-1/brigadier
azalea-brigadier
Diffstat (limited to 'azalea-brigadier/src/context/parsed_command_node.rs')
-rw-r--r--azalea-brigadier/src/context/parsed_command_node.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/azalea-brigadier/src/context/parsed_command_node.rs b/azalea-brigadier/src/context/parsed_command_node.rs
new file mode 100644
index 00000000..ed49928d
--- /dev/null
+++ b/azalea-brigadier/src/context/parsed_command_node.rs
@@ -0,0 +1,18 @@
+use super::string_range::StringRange;
+use crate::tree::CommandNode;
+use std::{cell::RefCell, rc::Rc};
+
+#[derive(Debug)]
+pub struct ParsedCommandNode<S> {
+ pub node: Rc<RefCell<CommandNode<S>>>,
+ pub range: StringRange,
+}
+
+impl<S> Clone for ParsedCommandNode<S> {
+ fn clone(&self) -> Self {
+ Self {
+ node: self.node.clone(),
+ range: self.range.clone(),
+ }
+ }
+}