rustfmt
This commit is contained in:
parent
598f79ab50
commit
bf8cb594da
@ -7,15 +7,15 @@ use crate::common::{Brackets, ListSeparator, Op, QuoteKind};
|
|||||||
use crate::error::SassResult;
|
use crate::error::SassResult;
|
||||||
use crate::unit::{Unit, UNIT_CONVERSION_TABLE};
|
use crate::unit::{Unit, UNIT_CONVERSION_TABLE};
|
||||||
|
|
||||||
pub(crate) use sass_function::SassFunction;
|
|
||||||
pub(crate) use map::SassMap;
|
pub(crate) use map::SassMap;
|
||||||
pub(crate) use number::Number;
|
pub(crate) use number::Number;
|
||||||
|
pub(crate) use sass_function::SassFunction;
|
||||||
|
|
||||||
mod sass_function;
|
|
||||||
mod map;
|
mod map;
|
||||||
mod number;
|
mod number;
|
||||||
mod ops;
|
mod ops;
|
||||||
mod parse;
|
mod parse;
|
||||||
|
mod sass_function;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub(crate) enum Value {
|
pub(crate) enum Value {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
//! SASS functions are those that are evaluated and return a value
|
//! SASS functions are those that are evaluated and return a value
|
||||||
//!
|
//!
|
||||||
//! SASS functions can be either user-defined or builtin.
|
//! SASS functions can be either user-defined or builtin.
|
||||||
//!
|
//!
|
||||||
//! User-defined functions are those that have been implemented in SASS
|
//! User-defined functions are those that have been implemented in SASS
|
||||||
//! using the @function rule. See the documentation of `crate::atrule::Function`
|
//! using the @function rule. See the documentation of `crate::atrule::Function`
|
||||||
//! for more information.
|
//! for more information.
|
||||||
//!
|
//!
|
||||||
//! Builtin functions are those that have been implemented in rust and are
|
//! Builtin functions are those that have been implemented in rust and are
|
||||||
//! in the global scope.
|
//! in the global scope.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ use crate::value::Value;
|
|||||||
|
|
||||||
/// A SASS function
|
/// A SASS function
|
||||||
/// See toplevel documentation for more information
|
/// See toplevel documentation for more information
|
||||||
///
|
///
|
||||||
/// The function name is stored in addition to the body
|
/// The function name is stored in addition to the body
|
||||||
/// for use in the builtin function `inspect()`
|
/// for use in the builtin function `inspect()`
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@ -32,7 +32,7 @@ pub(crate) enum SassFunction {
|
|||||||
|
|
||||||
impl SassFunction {
|
impl SassFunction {
|
||||||
/// Get the name of the function referenced
|
/// Get the name of the function referenced
|
||||||
///
|
///
|
||||||
/// Used mainly in debugging and `inspect()`
|
/// Used mainly in debugging and `inspect()`
|
||||||
pub fn name(&self) -> &str {
|
pub fn name(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
@ -42,8 +42,8 @@ impl SassFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the function is builtin or user-defined
|
/// Whether the function is builtin or user-defined
|
||||||
///
|
///
|
||||||
/// Used only in `std::fmt::Debug` for `SassFunction`
|
/// Used only in `std::fmt::Debug` for `SassFunction`
|
||||||
fn kind(&self) -> &'static str {
|
fn kind(&self) -> &'static str {
|
||||||
match &self {
|
match &self {
|
||||||
Self::Builtin(..) => "Builtin",
|
Self::Builtin(..) => "Builtin",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user