Skip to content

Commit

Permalink
parser: import parser::{Expr, Node}
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski authored and djc committed Aug 1, 2023
1 parent c8399c7 commit 04e585b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions askama_derive/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ use crate::heritage::{Context, Heritage};
use crate::input::{Print, Source, TemplateInput};
use crate::CompileError;

use parser::expr::Expr;
use parser::node::{
Call, Comment, CondTest, If, Include, Let, Lit, Loop, Match, Node, Target, Whitespace, Ws,
Call, Comment, CondTest, If, Include, Let, Lit, Loop, Match, Target, Whitespace, Ws,
};
use parser::Parsed;
use parser::{Expr, Node, Parsed};
use proc_macro::TokenStream;
use quote::{quote, ToTokens};
use syn::punctuated::Punctuated;
Expand Down
3 changes: 2 additions & 1 deletion askama_derive/src/heritage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use std::path::{Path, PathBuf};
use crate::config::Config;
use crate::CompileError;

use parser::node::{BlockDef, Macro, Match, Node};
use parser::node::{BlockDef, Macro, Match};
use parser::Node;

pub(crate) struct Heritage<'a> {
pub(crate) root: &'a Context<'a>,
Expand Down
4 changes: 2 additions & 2 deletions askama_parser/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use nom::multi::{fold_many0, many0, many1, separated_list0, separated_list1};
use nom::sequence::{delimited, pair, preceded, terminated, tuple};
use nom::{error_position, IResult};

use super::expr::Expr;
use super::{
bool_lit, char_lit, identifier, is_ws, keyword, num_lit, path, skip_till, str_lit, ws, State,
bool_lit, char_lit, identifier, is_ws, keyword, num_lit, path, skip_till, str_lit, ws, Expr,
State,
};

#[derive(Debug, PartialEq)]
Expand Down
5 changes: 2 additions & 3 deletions askama_parser/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::expr::Expr;
use super::node::{Lit, Node, Whitespace, Ws};
use super::{Ast, Syntax};
use super::node::{Lit, Whitespace, Ws};
use super::{Ast, Expr, Node, Syntax};

fn check_ws_split(s: &str, res: &(&str, &str, &str)) {
let Lit { lws, val, rws } = Lit::split_ws_parts(s);
Expand Down

0 comments on commit 04e585b

Please sign in to comment.