adjust assert_ir_call() comments to be more specific
This commit is contained in:
parent
9e86e04af0
commit
43779e0d89
|
@ -46,7 +46,9 @@ impl Command for Const {
|
|||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; //FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let var_id = if let Some(id) = call.positional_nth(0).and_then(|pos| pos.as_var()) {
|
||||
id
|
||||
} else {
|
||||
|
|
|
@ -48,7 +48,9 @@ impl Command for For {
|
|||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let head = call.head;
|
||||
let var_id = call
|
||||
.positional_nth(0)
|
||||
|
|
|
@ -60,7 +60,9 @@ impl Command for If {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let cond = call.positional_nth(0).expect("checked through parser");
|
||||
let then_block = call
|
||||
.positional_nth(1)
|
||||
|
@ -100,7 +102,9 @@ impl Command for If {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let cond = call.positional_nth(0).expect("checked through parser");
|
||||
let then_block = call
|
||||
.positional_nth(1)
|
||||
|
|
|
@ -46,7 +46,9 @@ impl Command for Let {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let var_id = call
|
||||
.positional_nth(0)
|
||||
.expect("checked through parser")
|
||||
|
|
|
@ -37,7 +37,9 @@ impl Command for Loop {
|
|||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let head = call.head;
|
||||
let block_id = call
|
||||
.positional_nth(0)
|
||||
|
|
|
@ -43,7 +43,9 @@ impl Command for Match {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let value: Value = call.req(engine_state, stack, 0)?;
|
||||
let matches = call
|
||||
.positional_nth(1)
|
||||
|
|
|
@ -46,7 +46,9 @@ impl Command for Mut {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let var_id = call
|
||||
.positional_nth(0)
|
||||
.expect("checked through parser")
|
||||
|
|
|
@ -47,7 +47,9 @@ impl Command for Try {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let try_block = call
|
||||
.positional_nth(0)
|
||||
.expect("checked through parser")
|
||||
|
|
|
@ -46,7 +46,9 @@ impl Command for While {
|
|||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let call = call.assert_ast_call()?; // FIXME
|
||||
// This is compiled specially by the IR compiler. The code here is never used in when
|
||||
// running in IR mode.
|
||||
let call = call.assert_ast_call()?;
|
||||
let head = call.head;
|
||||
let cond = call.positional_nth(0).expect("checked through parser");
|
||||
let block_id = call
|
||||
|
|
Loading…
Reference in New Issue
Block a user