forked from extern/nushell
Light fixes (#2455)
* Add optional commas for items in lists and tables * A couple last fixes
This commit is contained in:
@ -610,6 +610,22 @@ impl SpannedExpression {
|
||||
}
|
||||
false
|
||||
}
|
||||
Expression::Table(headers, cells) => {
|
||||
for l in headers {
|
||||
if l.has_shallow_it_usage() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for row in cells {
|
||||
for cell in row {
|
||||
if cell.has_shallow_it_usage() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
Expression::Invocation(block) => {
|
||||
for commands in block.block.iter() {
|
||||
for command in commands.list.iter() {
|
||||
@ -646,6 +662,20 @@ impl SpannedExpression {
|
||||
item.expand_it_usage();
|
||||
}
|
||||
}
|
||||
SpannedExpression {
|
||||
expr: Expression::Table(headers, cells),
|
||||
..
|
||||
} => {
|
||||
for header in headers.iter_mut() {
|
||||
header.expand_it_usage();
|
||||
}
|
||||
|
||||
for row in cells.iter_mut() {
|
||||
for cell in row {
|
||||
cell.expand_it_usage()
|
||||
}
|
||||
}
|
||||
}
|
||||
SpannedExpression {
|
||||
expr: Expression::Path(path),
|
||||
..
|
||||
|
Reference in New Issue
Block a user