aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context/parsed_command_node.rs
blob: 8dbadb497e579792e545a965f0116d7b33863f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::sync::Arc;

use parking_lot::RwLock;

use super::string_range::StringRange;
use crate::tree::CommandNode;

#[derive(Debug)]
pub struct ParsedCommandNode<S, R> {
    pub node: Arc<RwLock<CommandNode<S, R>>>,
    pub range: StringRange,
}

impl<S, R> Clone for ParsedCommandNode<S, R> {
    fn clone(&self) -> Self {
        Self {
            node: self.node.clone(),
            range: self.range,
        }
    }
}