SyntaxShape checking in Alias (#2377)

* initial, working for shallow internals

* add recurion on Block

* clean up/abstract, Invocations

* use Result

* inspection of Binary, tests

* improve code structure

* move arg shape inspection to Alias command

* add spanned errors, tests, cleanup for PR

* fix test, clippy
This commit is contained in:
Bailey Layzer
2020-08-19 20:18:55 -07:00
committed by GitHub
parent 6126209f57
commit ad395944ef
5 changed files with 268 additions and 8 deletions

View File

@ -2,7 +2,7 @@ use nu_source::{b, DebugDocBuilder, PrettyDebug};
use serde::{Deserialize, Serialize};
/// The syntactic shapes that values must match to be passed into a command. You can think of this as the type-checking that occurs when you call a function.
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq)]
pub enum SyntaxShape {
/// Any syntactic form is allowed
Any,