Add in parameter inference for blocks (#2706)

This commit is contained in:
Jonathan Turner
2020-10-27 20:37:35 +13:00
committed by GitHub
parent c283db373b
commit ee76523507
9 changed files with 150 additions and 69 deletions

View File

@ -11,7 +11,6 @@ use nu_source::{Span, Tag};
use nu_value_ext::ValueExt;
use num_bigint::BigInt;
use num_traits::Zero;
use query_interface::{interfaces, vtable_for, ObjectHash};
use serde::{Deserialize, Serialize};
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Clone, new, Serialize)]
@ -21,14 +20,6 @@ pub struct Operation {
pub(crate) right: Value,
}
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Clone, Hash, Serialize, Deserialize, new)]
pub struct Block {
pub(crate) commands: hir::Commands,
pub(crate) tag: Tag,
}
interfaces!(Block: dyn ObjectHash);
#[derive(Serialize, Deserialize)]
pub enum Switch {
Present,