Formats the given argument `i` in `scope` as a string depending on its `etype`.
(scope: &Scope<'_>, i: u8, etype: ExprType)
| 98 | |
| 99 | /// Formats the given argument `i` in `scope` as a string depending on its `etype`. |
| 100 | fn format_arg(scope: &Scope<'_>, i: u8, etype: ExprType) -> String { |
| 101 | match etype { |
| 102 | ExprType::Boolean => format!("{}", scope.get_boolean(i)), |
| 103 | ExprType::Double => format!("{}", scope.get_double(i)), |
| 104 | ExprType::Integer => format!("{}", scope.get_integer(i)), |
| 105 | ExprType::Text => scope.get_string(i).to_string(), |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /// Formats variable argument `i` in `Scope` and returns the formatted argument, whether the |
| 110 | /// argument was present, and the separator that was found. |
no test coverage detected