1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use super::delimiters::Delimiters;

/// Lexer options.
#[derive(Copy, Clone)]
pub struct LexerOptions {
    pub tag_comment: Delimiters,
    pub tag_block: Delimiters,
    pub tag_variable: Delimiters,
    pub whitespace_trim: &'static str,
    pub interpolation: Delimiters,
}

impl LexerOptions {
    pub fn default() -> LexerOptions {
        LexerOptions {
            tag_comment: Delimiters::new("{#", "#}"),
            tag_block: Delimiters::new("{%", "%}"),
            tag_variable: Delimiters::new("{{", "}}"),
            whitespace_trim: "-",
            interpolation: Delimiters::new("#{", "}"),
        }
    }
}