1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use swc_common::{ast_node, Span};

use crate::{Ident, SimpleBlock};

#[ast_node("LayerName")]
pub struct LayerName {
    pub span: Span,
    pub name: Vec<Ident>,
}

#[ast_node("LayerNameList")]
pub struct LayerNameList {
    pub span: Span,
    pub name_list: Vec<LayerName>,
}

#[ast_node]
pub enum LayerPrelude {
    #[tag("LayerName")]
    Name(LayerName),
    #[tag("LayerNameList")]
    NameList(LayerNameList),
}

#[ast_node("LayerRule")]
pub struct LayerRule {
    pub span: Span,
    pub prelude: Option<LayerPrelude>,
    pub block: Option<SimpleBlock>,
}