Skip to main content

webui_parser/plugin/fast/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3
4//! FAST parser plugins and shared implementation.
5
6mod convert;
7pub(crate) mod diagnostic;
8mod shared;
9pub mod v2;
10pub mod v3;
11
12#[deprecated(
13    since = "0.0.11",
14    note = "use FastV2ParserPlugin from plugin::fast_v2 or FastV3ParserPlugin from plugin::fast_v3"
15)]
16pub type FastParserPlugin = v2::FastV2ParserPlugin;
17
18#[deprecated(
19    since = "0.0.11",
20    note = "use generate_f_template from plugin::fast_v2 or plugin::fast_v3"
21)]
22pub use v2::generate_f_template;
23
24#[cfg(test)]
25mod tests {
26    use super::*;
27    use crate::plugin::ParserPlugin;
28
29    #[test]
30    #[allow(deprecated)]
31    fn fast_parser_alias_uses_fast_v2_parser() {
32        let mut plugin = FastParserPlugin::new();
33        assert_eq!(
34            plugin.process_attribute(crate::plugin::AttributeContext { name: "@click" }),
35            crate::plugin::AttributeAction::SkipAndCountBinding
36        );
37    }
38}