Merge pull request #172 from androbtech/prevent-crash-flags-passed

Informs passing flags is unimplemented instead of quitting.
This commit is contained in:
Jonathan Turner 2019-07-14 17:01:49 +12:00 committed by GitHub
commit 6f21cbe7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,7 +161,7 @@ pub fn baseline_parse_semantic_token(
TokenNode::Delimited(delimited) => baseline_parse_delimited(delimited, registry, source),
TokenNode::Pipeline(_pipeline) => unimplemented!(),
TokenNode::Operator(_op) => unreachable!(),
TokenNode::Flag(_flag) => unimplemented!(),
TokenNode::Flag(_flag) => Err(ShellError::unimplemented("passing flags is not supported yet.")),
TokenNode::Identifier(_span) => unreachable!(),
TokenNode::Whitespace(_span) => unreachable!(),
TokenNode::Error(error) => Err(*error.item.clone()),