Skip to main content

oak_liquid/builder/
mod.rs

1/// Liquid Builder module
2///
3/// This module defines the builder for Liquid templates, used to construct the AST.
4use oak_core::{
5    builder::{BuildOutput, Builder, BuilderCache},
6    source::{Source, TextEdit},
7};
8
9use crate::language::LiquidLanguage;
10
11/// Builder for Liquid templates
12#[derive(Debug, Clone)]
13pub struct LiquidBuilder<'a> {
14    /// The language instance
15    language: &'a LiquidLanguage,
16}
17
18impl<'a> LiquidBuilder<'a> {
19    /// Create a new Liquid builder
20    pub fn new(language: &'a LiquidLanguage) -> Self {
21        Self { language }
22    }
23}
24
25impl<'a> Builder<LiquidLanguage> for LiquidBuilder<'a> {
26    fn build<'b, S: Source + ?Sized>(&self, _text: &S, _edits: &[TextEdit], _cache: &'b mut impl BuilderCache<LiquidLanguage>) -> BuildOutput<LiquidLanguage> {
27        // TODO: Implement actual building logic
28        unimplemented!()
29    }
30}