grass/src/atrule/mixin.rs

40 lines
740 B
Rust
Raw Normal View History

2020-06-16 20:00:11 -04:00
use crate::{args::FuncArgs, scope::Scope, Token};
2020-01-12 20:15:40 -05:00
#[derive(Debug, Clone)]
pub(crate) struct Mixin {
2020-06-16 19:38:30 -04:00
pub scope: Scope,
pub args: FuncArgs,
2020-06-30 06:53:17 -04:00
pub body: Vec<Token>,
2020-06-16 19:38:30 -04:00
pub accepts_content_block: bool,
2020-01-12 20:15:40 -05:00
}
impl Mixin {
2020-06-16 19:38:30 -04:00
pub fn new(
scope: Scope,
args: FuncArgs,
body: Vec<Token>,
accepts_content_block: bool,
) -> Self {
Mixin {
scope,
args,
body,
accepts_content_block,
2020-01-12 20:15:40 -05:00
}
}
}
2020-07-02 10:31:32 -04:00
pub(crate) struct Content {
pub content: Option<Vec<Token>>,
pub content_args: Option<FuncArgs>,
}
impl Content {
pub const fn new() -> Self {
Self {
content: None,
content_args: None,
}
}
}