fluent_bundle/
builtins.rs

1use crate::{FluentArgs, FluentValue};
2
3#[allow(non_snake_case)]
4pub 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}