@@ -4,7 +4,9 @@ use rusty_pc::*;
44use crate :: core:: var_name;
55use crate :: input:: StringView ;
66use crate :: pc_specific:: * ;
7- use crate :: { ParserError , * } ;
7+ use crate :: {
8+ ArrayDimensions , BareName , BuiltInStyle , DimList , DimType , Name , ParserError , ToBareName , TypeQualifier , TypedName
9+ } ;
810
911pub type DimVar = TypedName < DimType > ;
1012pub type DimVarPos = Positioned < DimVar > ;
@@ -122,10 +124,10 @@ where
122124mod array_dimensions {
123125 use rusty_pc:: * ;
124126
125- use crate :: expr:: { expression_pos_p , opt_second_expression_after_keyword } ;
127+ use crate :: expr:: expr_keyword_opt_expr ;
126128 use crate :: input:: StringView ;
127129 use crate :: pc_specific:: * ;
128- use crate :: { ParserError , * } ;
130+ use crate :: { ArrayDimension , ArrayDimensions , Keyword , ParserError } ;
129131
130132 pub fn array_dimensions_p ( )
131133 -> impl Parser < StringView , Output = ArrayDimensions , Error = ParserError > {
@@ -137,12 +139,7 @@ mod array_dimensions {
137139 // paren_expr ws* TO ws* paren_expr
138140 fn array_dimension_p ( ) -> impl Parser < StringView , Output = ArrayDimension , Error = ParserError >
139141 {
140- opt_second_expression_after_keyword (
141- expression_pos_p ( ) ,
142- Keyword :: To ,
143- ExpressionTrait :: is_parenthesis,
144- )
145- . map ( |( l, opt_r) | match opt_r {
142+ expr_keyword_opt_expr ( Keyword :: To ) . map ( |( l, opt_r) | match opt_r {
146143 Some ( r) => ArrayDimension {
147144 lbound : Some ( l) ,
148145 ubound : r,
@@ -158,12 +155,12 @@ mod array_dimensions {
158155mod type_definition {
159156 use rusty_pc:: * ;
160157
161- use crate :: core:: VarNameCtx ;
158+ use crate :: core:: { VarNameCtx , user_defined_type } ;
162159 use crate :: expr:: expression_pos_p;
163160 use crate :: input:: StringView ;
164161 use crate :: pc_specific:: * ;
165162 use crate :: tokens:: star_ws;
166- use crate :: { ParserError , * } ;
163+ use crate :: { BuiltInStyle , DimType , ExpressionPos , Keyword , ParserError , TypeQualifier } ;
167164
168165 pub fn extended_type ( )
169166 -> impl Parser < StringView , VarNameCtx , Output = DimType , Error = ParserError > {
0 commit comments