mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Move from using a Block to an Arc'd Block (#3289)
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
use nu_protocol::hir::Block;
|
||||
use nu_source::Spanned;
|
||||
use std::fmt::Debug;
|
||||
use std::{fmt::Debug, sync::Arc};
|
||||
|
||||
pub trait ParserScope: Debug {
|
||||
fn get_signature(&self, name: &str) -> Option<nu_protocol::Signature>;
|
||||
|
||||
fn has_signature(&self, name: &str) -> bool;
|
||||
|
||||
fn add_definition(&self, block: Block);
|
||||
fn add_definition(&self, block: Arc<Block>);
|
||||
|
||||
fn get_definitions(&self) -> Vec<Block>;
|
||||
fn get_definitions(&self) -> Vec<Arc<Block>>;
|
||||
|
||||
fn get_alias(&self, name: &str) -> Option<Vec<Spanned<String>>>;
|
||||
|
||||
|
Reference in New Issue
Block a user