You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: svelte.rs
    path of file: ./repos/oxc/crates/oxc_linter/src/partial_loader
    
    the code of the file until where you have to start completion: use memchr::memmem::Finder;

use oxc_span::SourceType;

use super::{JavaScriptSource, SCRIPT_END, SCRIPT_START};

pub struct SveltePartialLoader<'a> {
    source_text: &'a str,
}

impl<'a> SveltePartialLoader<'
    
    fn parse_script(&self) -> Option<JavaScriptSource<'a>> {
        let script_start_finder = Finder::new(SCRIPT_START);
        let script_end_finder = Finder::new(SCRIPT_END);

        let mut pointer = 0;

        // find opening "<script"
        let offset = script_start_finder.find(self.source_text[pointer..].as_bytes())?;
        pointer += offset + SCRIPT_START.len();

        // find closing ">"
        let offset = self.source_text[pointer..].find('>')?;

        // get lang="ts" attribute
        let content = &self.source_text[pointer..pointer + offset];
        let is_ts = content.contains("ts");

        pointer += offset + 1;
        let js_start = pointer;

        // find "</script>"
        let offset = script_end_finder.find(self.source_text[pointer..].as_bytes())?;
        let js_end = pointer + offset;

        let source_text = &self.source_text[js_start..js_end];
        let source_type = SourceType::default().with_module(true).with_typescript(is_ts);
        Some(JavaScriptSource::new(source_text, source_type, js_start))
    }