sv_parser_syntaxtree/source_text/
library_source_text.rs1use crate::*;
2
3#[derive(Clone, Debug, PartialEq, Node)]
6pub struct LibraryText {
7 pub nodes: (Vec<WhiteSpace>, Vec<LibraryDescription>),
8}
9
10#[derive(Clone, Debug, PartialEq, Node)]
11pub enum LibraryDescription {
12 LibraryDeclaration(Box<LibraryDeclaration>),
13 IncludeStatement(Box<IncludeStatement>),
14 ConfigDeclaration(Box<ConfigDeclaration>),
15 Null(Box<Symbol>),
16}
17
18#[derive(Clone, Debug, PartialEq, Node)]
19pub struct LibraryDeclaration {
20 pub nodes: (
21 Keyword,
22 LibraryIdentifier,
23 List<Symbol, FilePathSpec>,
24 Option<(Keyword, List<Symbol, FilePathSpec>)>,
25 Symbol,
26 ),
27}
28
29#[derive(Clone, Debug, PartialEq, Node)]
30pub struct IncludeStatement {
31 pub nodes: (Keyword, FilePathSpec, Symbol),
32}
33
34#[derive(Clone, Debug, PartialEq, Node)]
35pub enum FilePathSpec {
36 Literal(StringLiteral),
37 NonLiteral(FilePathSpecNonLiteral),
38}
39
40#[derive(Clone, Debug, PartialEq, Node)]
41pub struct FilePathSpecNonLiteral {
42 pub nodes: (Locate, Vec<WhiteSpace>),
43}