#[derive(Clone, Debug, Default)]
pub struct AnalysisPluginOptions {
pub ssr: bool,
}
#[derive(Clone, Debug, Default)]
pub struct ScriptAttributes<'a> {
pub setup: bool,
pub lang: Option<&'a str>,
}
pub struct AnalysisPluginContext<'a> {
pub input: &'a str,
pub bytes: &'a [u8],
pub options: &'a AnalysisPluginOptions,
}
impl<'a> AnalysisPluginContext<'a> {
pub fn new(input: &'a str, bytes: &'a [u8], options: &'a AnalysisPluginOptions) -> Self {
Self {
input,
bytes,
options,
}
}
pub fn slice(&self, start: u32, end: u32) -> &'a str {
&self.input[start as usize..end as usize]
}
}