diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-08-14 20:43:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-08-14 20:43:03 +0200 |
| commit | c8f6b5bd5c55845562571c196a0b2c1a7ca20f71 (patch) | |
| tree | 0e5066064f1bf81f847cb1cfe23578e2f42fe1e8 /src/func.rs | |
| parent | 650c712eabc6f665a0a0cc2a47fb5b90cf715d87 (diff) | |
Desugar body into last argument 🍩
Diffstat (limited to 'src/func.rs')
| -rw-r--r-- | src/func.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/func.rs b/src/func.rs index 016770cb..abff559f 100644 --- a/src/func.rs +++ b/src/func.rs @@ -8,9 +8,7 @@ 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, FuncBody, FuncCall, FuncHeader, ParseState, - }; + pub use crate::syntax::parsing::{parse, FuncArgs, FuncCall, ParseState}; pub use crate::syntax::span::{Span, SpanVec, Spanned}; pub use crate::syntax::tree::{DynamicNode, SyntaxNode, SyntaxTree}; pub use crate::syntax::value::*; @@ -55,10 +53,3 @@ pub fn drain_args(args: FuncArgs, f: &mut Feedback) { error!(@f, arg.span, "unexpected argument"); } } - -/// Generate an error if there is function body even though none was expected. -pub fn expect_no_body(body: FuncBody, f: &mut Feedback) { - if let Some(body) = body { - error!(@f, body.span, "unexpected body"); - } -} |
