diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-08-16 14:23:13 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-08-16 14:38:30 +0200 |
| commit | 9f6137d8a829fe8f34554623495fa620252a0184 (patch) | |
| tree | da62c40caa247ac1825d335fde9350150c6604db /src/func.rs | |
| parent | 84f30fb73518ca23cbc728b1bf414e80b344412a (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/func.rs')
| -rw-r--r-- | src/func.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/func.rs b/src/func.rs index bd273b4a..bff4fdab 100644 --- a/src/func.rs +++ b/src/func.rs @@ -8,8 +8,8 @@ pub mod prelude { pub use crate::layout::Command::{self, *}; pub use crate::style::*; pub use crate::syntax::expr::*; - pub use crate::syntax::parsing::{parse, FuncArgs, FuncCall, ParseState}; - pub use crate::syntax::span::{Span, SpanVec, Spanned}; + pub use crate::syntax::parsing::{parse, FuncCall, ParseState}; + pub use crate::syntax::span::{Pos, Span, SpanVec, Spanned}; pub use crate::syntax::tree::{DynamicNode, SyntaxNode, SyntaxTree}; pub use crate::{Pass, Feedback}; pub use super::*; @@ -41,14 +41,3 @@ impl<T> OptionExt<T> for Option<T> { self } } - -/// Generate `unexpected argument` errors for all remaining arguments. -pub fn drain_args(args: FuncArgs, f: &mut Feedback) { - for arg in args.pos.0 { - error!(@f, arg.span, "unexpected argument"); - } - - for arg in args.key.0 { - error!(@f, arg.span, "unexpected argument"); - } -} |
