sv_parser_syntaxtree/declarations/
let_declarations.rs1use crate::*;
2
3#[derive(Clone, Debug, PartialEq, Node)]
6pub struct LetDeclaration {
7 pub nodes: (
8 Keyword,
9 LetIdentifier,
10 Option<Paren<Option<LetPortList>>>,
11 Symbol,
12 Expression,
13 Symbol,
14 ),
15}
16
17#[derive(Clone, Debug, PartialEq, Node)]
18pub struct LetIdentifier {
19 pub nodes: (Identifier,),
20}
21
22#[derive(Clone, Debug, PartialEq, Node)]
23pub struct LetPortList {
24 pub nodes: (List<Symbol, LetPortItem>,),
25}
26
27#[derive(Clone, Debug, PartialEq, Node)]
28pub struct LetPortItem {
29 pub nodes: (
30 Vec<AttributeInstance>,
31 LetFormalType,
32 FormalPortIdentifier,
33 Vec<VariableDimension>,
34 Option<(Symbol, Expression)>,
35 ),
36}
37
38#[derive(Clone, Debug, PartialEq, Node)]
39pub enum LetFormalType {
40 DataTypeOrImplicit(Box<DataTypeOrImplicit>),
41 Untyped(Box<Keyword>),
42}
43
44#[derive(Clone, Debug, PartialEq, Node)]
45pub struct LetExpression {
46 pub nodes: (
47 Option<PackageScope>,
48 LetIdentifier,
49 Option<Paren<Option<LetListOfArguments>>>,
50 ),
51}
52
53#[derive(Clone, Debug, PartialEq, Node)]
54pub enum LetListOfArguments {
55 Ordered(Box<LetListOfArgumentsOrdered>),
56 Named(Box<LetListOfArgumentsNamed>),
57}
58
59#[derive(Clone, Debug, PartialEq, Node)]
60pub struct LetListOfArgumentsOrdered {
61 pub nodes: (
62 List<Symbol, Option<LetActualArg>>,
63 Vec<(Symbol, Symbol, Identifier, Paren<Option<LetActualArg>>)>,
64 ),
65}
66
67#[derive(Clone, Debug, PartialEq, Node)]
68pub struct LetListOfArgumentsNamed {
69 pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<LetActualArg>>)>,),
70}
71
72#[derive(Clone, Debug, PartialEq, Node)]
73pub struct LetActualArg {
74 pub nodes: (Expression,),
75}