Skip to main content

webui_parser/plugin/
fast.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3
4//! Deprecated FAST parser plugin compatibility shim.
5//!
6//! FAST parser implementations live in `fast_v2` and `fast_v3`. This module
7//! keeps the original `plugin::fast` public path available without containing
8//! parser implementation logic.
9
10#[deprecated(
11    since = "0.0.11",
12    note = "use FastV2ParserPlugin from plugin::fast_v2 or FastV3ParserPlugin from plugin::fast_v3"
13)]
14pub type FastParserPlugin = super::fast_v2::FastV2ParserPlugin;
15
16#[deprecated(
17    since = "0.0.11",
18    note = "use generate_f_template from plugin::fast_v2 or plugin::fast_v3"
19)]
20pub use super::fast_v2::generate_f_template;
21
22#[cfg(test)]
23mod tests {
24    use super::*;
25    use crate::plugin::ParserPlugin;
26
27    #[test]
28    #[allow(deprecated)]
29    fn fast_parser_alias_uses_fast_v2_parser() {
30        let mut plugin = FastParserPlugin::new();
31        assert_eq!(
32            plugin.classify_attribute("@click"),
33            crate::plugin::AttributeAction::SkipAndCountBinding
34        );
35    }
36}