mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 15:13:01 +01:00
Update todo
This commit is contained in:
parent
bb9e6731ea
commit
24cd1b591c
4
TODO.md
4
TODO.md
@ -11,12 +11,16 @@
|
|||||||
- [x] refactor into subcrates
|
- [x] refactor into subcrates
|
||||||
- [x] subcommand alias
|
- [x] subcommand alias
|
||||||
- [x] type inference from successful parse (eg not `List<unknown>` but `List<int>`)
|
- [x] type inference from successful parse (eg not `List<unknown>` but `List<int>`)
|
||||||
|
- [ ] parsing tables
|
||||||
|
- [ ] ...rest without calling it rest
|
||||||
|
- [ ] operator overflow
|
||||||
- [ ] finish operator type-checking
|
- [ ] finish operator type-checking
|
||||||
- [ ] Column path
|
- [ ] Column path
|
||||||
- [ ] Ranges
|
- [ ] Ranges
|
||||||
- [ ] Source
|
- [ ] Source
|
||||||
- [ ] Autoenv
|
- [ ] Autoenv
|
||||||
- [ ] Block params
|
- [ ] Block params
|
||||||
|
- [ ] let [first, rest] = [1, 2, 3]
|
||||||
|
|
||||||
## Maybe:
|
## Maybe:
|
||||||
- [ ] default param values?
|
- [ ] default param values?
|
||||||
|
@ -34,11 +34,12 @@ fn eval_call(state: &State, call: &Call) -> Result<Value, ShellError> {
|
|||||||
let decl = parser_state.get_decl(call.decl_id);
|
let decl = parser_state.get_decl(call.decl_id);
|
||||||
if let Some(block_id) = decl.body {
|
if let Some(block_id) = decl.body {
|
||||||
let state = state.enter_scope();
|
let state = state.enter_scope();
|
||||||
for (arg, param) in call
|
for (arg, param) in call.positional.iter().zip(
|
||||||
.positional
|
decl.signature
|
||||||
.iter()
|
.required_positional
|
||||||
.zip(decl.signature.required_positional.iter())
|
.iter()
|
||||||
{
|
.chain(decl.signature.optional_positional.iter()),
|
||||||
|
) {
|
||||||
let result = eval_expression(&state, arg)?;
|
let result = eval_expression(&state, arg)?;
|
||||||
let var_id = param
|
let var_id = param
|
||||||
.var_id
|
.var_id
|
||||||
|
@ -89,7 +89,16 @@ impl Display for Value {
|
|||||||
write!(f, "{}", val)
|
write!(f, "{}", val)
|
||||||
}
|
}
|
||||||
Value::String { val, .. } => write!(f, "{}", val),
|
Value::String { val, .. } => write!(f, "{}", val),
|
||||||
Value::List { .. } => write!(f, "<list>"),
|
Value::List { val, .. } => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"[{}]",
|
||||||
|
val.iter()
|
||||||
|
.map(|x| x.to_string())
|
||||||
|
.collect::<Vec<String>>()
|
||||||
|
.join(", ".into())
|
||||||
|
)
|
||||||
|
}
|
||||||
Value::Block { .. } => write!(f, "<block>"),
|
Value::Block { .. } => write!(f, "<block>"),
|
||||||
Value::Nothing { .. } => write!(f, ""),
|
Value::Nothing { .. } => write!(f, ""),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user