pub fn evaluate(
        &self,
        scope: ScopeRef,
        arithmetic: bool,
    ) -> Result<css::CallArgs, Error> {
        Ok(css::CallArgs(self.0.iter().fold(
            Ok(vec![]),
            |acc, (name, value)| {
                let mut acc = acc?;
                if let (None, Value::List(list, _, false)) = (name, value) {
                    if list.len() == 2 && is_mark(&list[1]) {
                        let splat =
                            list[0].do_evaluate(scope.clone(), arithmetic)?;
                        match splat {
                            css::Value::Map(map) => {
                                for (k, v) in map {
                                    let k = match k {
                                        css::Value::Null => None,
                                        css::Value::Literal(s, _) => Some(s),
                                        x => {
                                            return Err(Error::bad_value(
                                                "string", &x,
                                            ))
                                        }
                                    };
                                    acc.push((k, v));
                                }
                                return Ok(acc);
                            }
                            css::Value::Null => (),
                            css::Value::List(items, ..) => {
                                for item in items {
                                    acc.push((None, item));
                                }
                            }
                            item => {
                                acc.push((None, item));
                            }
                        }
                        return Ok(acc);
                    }
                }
                acc.push((
                    name.clone(),
                    value.do_evaluate(scope.clone(), arithmetic)?,
                ));
                Ok(acc)
            },
        )?))
    }
/// Evaluate these sass CallArgs to css CallArgs.
Evaluate these sass CallArgs to css CallArgs.
Evaluate these sass CallArgs to css CallArgs .
pub fn evaluate(
        &self,
        scope: ScopeRef,
        arithmetic: bool,
    ) -> Result<css::CallArgs, Error> {
        Ok(css::CallArgs(self.0.iter().fold(
            Ok(vec![]),
            |acc, (name, value)| {
                let mut acc = acc?;
                if let (None, Value::List(list, _, false)) = (name, value) {
                    if list.len() == 2 && is_mark(&list[1]) {
                        let splat =
                            list[0].do_evaluate(scope.clone(), arithmetic)?;
                        match splat {
                            css::Value::Map(map) => {
                                for (k, v) in map {
                                    let k = match k {
                                        css::Value::Null => None,
                                        css::Value::Literal(s, _) => Some(s),
                                        x => {
                                            return Err(Error::bad_value(
                                                "string", &x,
                                            ))
                                        }
                                    };
                                    acc.push((k, v));
                                }
                                return Ok(acc);
                            }
                            css::Value::Null => (),
                            css::Value::List(items, ..) => {
                                for item in items {
                                    acc.push((None, item));
                                }
                            }
                            item => {
                                acc.push((None, item));
                            }
                        }
                        return Ok(acc);
                    }
                }
                acc.push((
                    name.clone(),
                    value.do_evaluate(scope.clone(), arithmetic)?,
                ));
                Ok(acc)
            },
        )?))
    }
pub fn evaluate ( & self , scope : ScopeRef , arithmetic : bool , ) -> Result < css :: CallArgs , Error > { Ok ( css :: CallArgs ( self . 0 . iter ( ) . fold ( Ok ( vec ! [ ] ) , | acc , ( name , value ) | { let mut acc = acc ? ; if let ( None , Value :: List ( list , _ , false ) ) = ( name , value ) { if list . len ( ) == 2 && is_mark ( & list [ 1 ] ) { let splat = list [ 0 ] . do_evaluate ( scope . clone ( ) , arithmetic ) ? ; match splat { css :: Value :: Map ( map ) => { for ( k , v ) in map { let k = match k { css :: Value :: Null => None , css :: Value :: Literal ( s , _ ) => Some ( s ) , x => { return Err ( Error :: bad_value ( " " , & x , ) ) } } ; acc . push ( ( k , v ) ) ; } return Ok ( acc ) ; } css :: Value :: Null => ( ) , css :: Value :: List ( items , .. ) => { for item in items { acc . push ( ( None , item ) ) ; } } item => { acc . push ( ( None , item ) ) ; } } return Ok ( acc ) ; } } acc . push ( ( name . clone ( ) , value . do_evaluate ( scope . clone ( ) , arithmetic ) ? , ) ) ; Ok ( acc ) } , ) ? ) ) }
Evaluate these sass CallArgs to css CallArgs.
Evaluate these sass CallArgs to css CallArgs .
&self
scope
ScopeRef
arithmetic
bool