swc_css_ast

Macro matches_eq

Source
macro_rules! matches_eq {
    ($value:expr, $($pat:expr),*) => { ... };
}
Expand description

Returns true if the given value matches one of the given patterns.

The type of value and patterns should be identical.

ยงExamples

use swc_atoms::Atom;
use swc_atoms::js_word;
use swc_css_ast::*;

assert!(matches_eq!(Atom::from("a"), "a"));
assert!(matches_eq!("a", "a"));