debian/rust-vendor/fluent-bundle/src/builtins.rs
raw| 1 | use crate::{FluentArgs, FluentValue}; |
| 2 | |
| 3 | #[allow(non_snake_case)] |
| 4 | pub fn NUMBER<'a>(positional: &[FluentValue<'a>], named: &FluentArgs) -> FluentValue<'a> { |
| 5 | let Some(FluentValue::Number(n)) = positional.first() else { |
| 6 | return FluentValue::Error; |
| 7 | }; |
| 8 | |
| 9 | let mut n = n.clone(); |
| 10 | n.options.merge(named); |
| 11 | |
| 12 | FluentValue::Number(n) |
| 13 | } |