diff options
Diffstat (limited to 'src/library/val.rs')
| -rw-r--r-- | src/library/val.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/library/val.rs b/src/library/val.rs deleted file mode 100644 index 9df55401..00000000 --- a/src/library/val.rs +++ /dev/null @@ -1,28 +0,0 @@ -use super::*; - -/// `val`: Ignores all arguments and layouts its body flatly. -/// -/// This is also the fallback function, which is used when a function name -/// cannot be resolved. -pub fn val(call: FuncCall, _: &ParseState) -> Pass<SyntaxNode> { - let mut args = call.args; - let node = ValNode { - content: args.take::<SyntaxTree>(), - }; - Pass::node(node, Feedback::new()) -} - -#[derive(Debug, Clone, PartialEq)] -struct ValNode { - content: Option<SyntaxTree>, -} - -#[async_trait(?Send)] -impl Layout for ValNode { - async fn layout<'a>(&'a self, _: LayoutContext<'_>) -> Pass<Commands<'a>> { - Pass::okay(match &self.content { - Some(tree) => vec![LayoutSyntaxTree(tree)], - None => vec![], - }) - } -} |
