Lines Matching refs:Expr
6 use crate::expr::Expr;
93 pub(crate) fn of(e: &Expr) -> Self { in of()
106 Expr::Closure(e) => match e.output { in of()
112 Expr::Break(ExprBreak { expr, .. }) in of()
113 | Expr::Return(ExprReturn { expr, .. }) in of()
114 | Expr::Yield(ExprYield { expr, .. }) => match expr { in of()
119 Expr::Assign(_) => Precedence::Assign, in of()
120 Expr::Range(_) => Precedence::Range, in of()
121 Expr::Binary(e) => Precedence::of_binop(&e.op), in of()
122 Expr::Let(_) => Precedence::Let, in of()
123 Expr::Cast(_) => Precedence::Cast, in of()
124 Expr::RawAddr(_) | Expr::Reference(_) | Expr::Unary(_) => Precedence::Prefix, in of()
127 Expr::Array(ExprArray { attrs, .. }) in of()
128 | Expr::Async(ExprAsync { attrs, .. }) in of()
129 | Expr::Await(ExprAwait { attrs, .. }) in of()
130 | Expr::Block(ExprBlock { attrs, .. }) in of()
131 | Expr::Call(ExprCall { attrs, .. }) in of()
132 | Expr::Const(ExprConst { attrs, .. }) in of()
133 | Expr::Continue(ExprContinue { attrs, .. }) in of()
134 | Expr::Field(ExprField { attrs, .. }) in of()
135 | Expr::ForLoop(ExprForLoop { attrs, .. }) in of()
136 | Expr::Group(ExprGroup { attrs, .. }) in of()
137 | Expr::If(ExprIf { attrs, .. }) in of()
138 | Expr::Index(ExprIndex { attrs, .. }) in of()
139 | Expr::Infer(ExprInfer { attrs, .. }) in of()
140 | Expr::Lit(ExprLit { attrs, .. }) in of()
141 | Expr::Loop(ExprLoop { attrs, .. }) in of()
142 | Expr::Macro(ExprMacro { attrs, .. }) in of()
143 | Expr::Match(ExprMatch { attrs, .. }) in of()
144 | Expr::MethodCall(ExprMethodCall { attrs, .. }) in of()
145 | Expr::Paren(ExprParen { attrs, .. }) in of()
146 | Expr::Path(ExprPath { attrs, .. }) in of()
147 | Expr::Repeat(ExprRepeat { attrs, .. }) in of()
148 | Expr::Struct(ExprStruct { attrs, .. }) in of()
149 | Expr::Try(ExprTry { attrs, .. }) in of()
150 | Expr::TryBlock(ExprTryBlock { attrs, .. }) in of()
151 | Expr::Tuple(ExprTuple { attrs, .. }) in of()
152 | Expr::Unsafe(ExprUnsafe { attrs, .. }) in of()
153 | Expr::While(ExprWhile { attrs, .. }) => prefix_attrs(attrs), in of()
156 Expr::Array(_) in of()
157 | Expr::Async(_) in of()
158 | Expr::Await(_) in of()
159 | Expr::Block(_) in of()
160 | Expr::Call(_) in of()
161 | Expr::Const(_) in of()
162 | Expr::Continue(_) in of()
163 | Expr::Field(_) in of()
164 | Expr::ForLoop(_) in of()
165 | Expr::Group(_) in of()
166 | Expr::If(_) in of()
167 | Expr::Index(_) in of()
168 | Expr::Infer(_) in of()
169 | Expr::Lit(_) in of()
170 | Expr::Loop(_) in of()
171 | Expr::Macro(_) in of()
172 | Expr::Match(_) in of()
173 | Expr::MethodCall(_) in of()
174 | Expr::Paren(_) in of()
175 | Expr::Path(_) in of()
176 | Expr::Repeat(_) in of()
177 | Expr::Struct(_) in of()
178 | Expr::Try(_) in of()
179 | Expr::TryBlock(_) in of()
180 | Expr::Tuple(_) in of()
181 | Expr::Unsafe(_) in of()
182 | Expr::While(_) => Precedence::Unambiguous, in of()
184 Expr::Verbatim(_) => Precedence::Unambiguous, in of()
187 Expr::Break(_) | Expr::Closure(_) | Expr::Return(_) | Expr::Yield(_) => unreachable!(), in of()