Determines if the given expression is the compile time constant 1u128.
(&self)
| 302 | |
| 303 | /// Determines if the given expression is the compile time constant 1u128. |
| 304 | pub fn is_one(&self) -> bool { |
| 305 | if let Expression::CompileTimeConstant(ConstantValue::Int(val)) = self { |
| 306 | return *val == 1; |
| 307 | } |
| 308 | false |
| 309 | } |
| 310 | |
| 311 | /// Determines if the given expression is the compile time constant 0u128. |
| 312 | pub fn is_zero(&self) -> bool { |