mirror of
https://github.com/nushell/nushell
synced 2025-01-09 11:49:00 +00:00
28 lines
533 B
Rust
28 lines
533 B
Rust
|
use crate::{DeclId, Expression, Span};
|
||
|
|
||
|
#[derive(Debug, Clone)]
|
||
|
pub struct Call {
|
||
|
/// identifier of the declaration to call
|
||
|
pub decl_id: DeclId,
|
||
|
pub head: Span,
|
||
|
pub positional: Vec<Expression>,
|
||
|
pub named: Vec<(String, Option<Expression>)>,
|
||
|
}
|
||
|
|
||
|
impl Default for Call {
|
||
|
fn default() -> Self {
|
||
|
Self::new()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl Call {
|
||
|
pub fn new() -> Call {
|
||
|
Self {
|
||
|
decl_id: 0,
|
||
|
head: Span::unknown(),
|
||
|
positional: vec![],
|
||
|
named: vec![],
|
||
|
}
|
||
|
}
|
||
|
}
|