@@ -45,11 +45,10 @@ impl Operator for CompoundLiteralOperator {
4545
4646#[ derive( Debug , PartialEq ) ]
4747pub struct FunctionCall {
48- args : Vec < Ast > ,
49- full : bool ,
50- name : VariableName ,
51- op : FunctionOperator ,
52- return_attrs : Vec < AttributeKeyword > ,
48+ pub args : Vec < Ast > ,
49+ pub full : bool ,
50+ pub op : FunctionOperator ,
51+ pub variable : Variable ,
5352}
5453
5554#[ expect( clippy:: min_ident_chars) ]
@@ -58,7 +57,7 @@ impl fmt::Display for FunctionCall {
5857 write ! (
5958 f,
6059 "({}\u{b0} ({}{}))" ,
61- self . name ,
60+ self . variable ,
6261 repr_vec_node( & self . args) ,
6362 if self . full { "" } else { ".." } ,
6463 )
@@ -80,8 +79,8 @@ impl Operator for FunctionOperator {
8079
8180#[ derive( Debug , PartialEq , Default ) ]
8281pub struct ListInitialiser {
83- elts : Vec < Ast > ,
84- full : bool ,
82+ pub elts : Vec < Ast > ,
83+ pub full : bool ,
8584}
8685
8786#[ expect( clippy:: min_ident_chars) ]
@@ -127,10 +126,10 @@ impl fmt::Display for Literal {
127126
128127#[ derive( Debug , PartialEq , Default ) ]
129128pub struct Ternary {
130- pub ( super ) condition : Box < Ast > ,
131- pub ( super ) failure : Option < Box < Ast > > ,
132- pub ( super ) op : TernaryOperator ,
133- pub ( super ) success : Box < Ast > ,
129+ pub condition : Box < Ast > ,
130+ pub failure : Option < Box < Ast > > ,
131+ pub op : TernaryOperator ,
132+ pub success : Box < Ast > ,
134133}
135134
136135#[ expect( clippy:: min_ident_chars) ]
@@ -166,7 +165,7 @@ impl fmt::Display for TernaryOperator {
166165 }
167166}
168167
169- #[ derive( Debug , PartialEq , Eq ) ]
168+ #[ derive( Debug , PartialEq , Default , Eq ) ]
170169pub struct Variable {
171170 attrs : Vec < AttributeKeyword > ,
172171 name : VariableName ,
@@ -179,6 +178,10 @@ impl Variable {
179178 attrs : vec ! [ ] ,
180179 }
181180 }
181+
182+ pub fn push_attr ( & mut self , attr : AttributeKeyword ) {
183+ self . attrs . push ( attr) ;
184+ }
182185}
183186
184187impl From < String > for Variable {
@@ -190,6 +193,15 @@ impl From<String> for Variable {
190193 }
191194}
192195
196+ impl From < AttributeKeyword > for Variable {
197+ fn from ( attr : AttributeKeyword ) -> Self {
198+ Self {
199+ name : VariableName :: Empty ,
200+ attrs : vec ! [ attr] ,
201+ }
202+ }
203+ }
204+
193205#[ expect( clippy:: min_ident_chars) ]
194206impl fmt:: Display for Variable {
195207 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
@@ -211,7 +223,7 @@ impl fmt::Display for Variable {
211223}
212224
213225#[ derive( Debug , PartialEq , Eq , Default ) ]
214- enum VariableName {
226+ pub enum VariableName {
215227 #[ default]
216228 Empty ,
217229 Keyword ( FunctionKeyword ) ,
0 commit comments