summaryrefslogtreecommitdiff
path: root/src/library/boxed.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-08-16 14:23:13 +0200
committerLaurenz <laurmaedje@gmail.com>2020-08-16 14:38:30 +0200
commit9f6137d8a829fe8f34554623495fa620252a0184 (patch)
treeda62c40caa247ac1825d335fde9350150c6604db /src/library/boxed.rs
parent84f30fb73518ca23cbc728b1bf414e80b344412a (diff)
Remove tuples and objects in favor of tables 🛢
This refactores the parser tests to make them more concise and flexible with regards to spans.
Diffstat (limited to 'src/library/boxed.rs')
-rw-r--r--src/library/boxed.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/boxed.rs b/src/library/boxed.rs
index 3ca3ae44..3637f072 100644
--- a/src/library/boxed.rs
+++ b/src/library/boxed.rs
@@ -10,11 +10,11 @@ pub fn boxed(call: FuncCall, _: &ParseState) -> Pass<SyntaxNode> {
let mut f = Feedback::new();
let mut args = call.args;
let node = BoxNode {
- content: args.pos.get::<SyntaxTree>().unwrap_or(SyntaxTree::new()),
- width: args.key.get::<ScaleLength>("width", &mut f),
- height: args.key.get::<ScaleLength>("height", &mut f),
+ content: args.take::<SyntaxTree>().unwrap_or(SyntaxTree::new()),
+ width: args.take_with_key::<_, ScaleLength>("width", &mut f),
+ height: args.take_with_key::<_, ScaleLength>("height", &mut f),
};
- drain_args(args, &mut f);
+ args.unexpected(&mut f);
Pass::node(node, f)
}