Add discrete list/table

This commit is contained in:
JT
2021-09-04 18:52:28 +12:00
parent 74bb2af3e1
commit 5e33b8536b
7 changed files with 142 additions and 12 deletions

View File

@ -1688,7 +1688,14 @@ pub fn parse_value(
} else if bytes.starts_with(b"(") {
return parse_full_column_path(working_set, span);
} else if bytes.starts_with(b"{") {
return parse_block_expression(working_set, span);
if matches!(shape, SyntaxShape::Block) || matches!(shape, SyntaxShape::Any) {
return parse_block_expression(working_set, span);
} else {
return (
Expression::garbage(span),
Some(ParseError::Expected("non-block value".into(), span)),
);
}
} else if bytes.starts_with(b"[") {
match shape {
SyntaxShape::Any