call and response serializers

This commit is contained in:
Fernando Herrera
2021-10-31 08:17:01 +00:00
parent 37f7a36123
commit a390f66dbf
18 changed files with 680 additions and 274 deletions

View File

@ -15,7 +15,8 @@ use nu_protocol::{
};
use crate::parse_keywords::{
parse_alias, parse_def, parse_def_predecl, parse_hide, parse_let, parse_module, parse_use,
parse_alias, parse_def, parse_def_predecl, parse_hide, parse_let, parse_module, parse_plugin,
parse_use,
};
#[derive(Debug, Clone)]
@ -2987,6 +2988,7 @@ pub fn parse_statement(
Some(ParseError::UnexpectedKeyword("export".into(), spans[0])),
),
b"hide" => parse_hide(working_set, spans),
b"register" => parse_plugin(working_set, spans),
_ => {
let (expr, err) = parse_expression(working_set, spans, true);
(Statement::Pipeline(Pipeline::from_vec(vec![expr])), err)