pipeline_script/plugin/
format_string.rs

1use crate::core::builtin::append;
2use crate::core::engine::Engine;
3use crate::plugin::Plugin;
4use crate::preprocessor::FormatStringPreprocessor;
5use std::ffi::c_void;
6
7pub struct FormatStringPlugin;
8
9impl Plugin for FormatStringPlugin {
10    fn apply(self, e: &mut Engine) {
11        e.register_precluded_scripts(&["extern fn string(obj:..Any)->String"]);
12        e.register_external_function("string", append as *mut c_void);
13        e.register_preprocessor(FormatStringPreprocessor)
14    }
15}