@@ -10,6 +10,7 @@ use anathema_store::storage::Storage;
1010use crate :: Lexer ;
1111use crate :: blueprints:: Blueprint ;
1212use crate :: error:: { Error , ErrorKind , Result } ;
13+ use crate :: expressions:: Expressions ;
1314use crate :: statements:: eval:: Scope ;
1415use crate :: statements:: parser:: Parser ;
1516use crate :: statements:: { Context , Statements } ;
@@ -223,6 +224,7 @@ impl ComponentTemplates {
223224 variables : & mut Variables ,
224225 slots : SmallMap < StringId , Vec < Blueprint > > ,
225226 strings : & mut Strings ,
227+ expressions : & mut Expressions ,
226228 ) -> Result < Vec < Blueprint > > {
227229 let ticket = self . components . checkout ( component_id) ;
228230 let ( _, component_src) = & * ticket;
@@ -238,7 +240,7 @@ impl ComponentTemplates {
238240 // NOTE
239241 // The ticket has to be restored to the component store,
240242 // this is why the error is returned rather than using `?` on `self.compile`.
241- let ret = self . compile ( component_src, variables, slots, strings, component_id) ;
243+ let ret = self . compile ( component_src, variables, slots, strings, expressions , component_id) ;
242244 self . components . restore ( ticket) ;
243245 self . dependencies . pop ( ) ;
244246 ret
@@ -250,6 +252,7 @@ impl ComponentTemplates {
250252 variables : & mut Variables ,
251253 slots : SmallMap < StringId , Vec < Blueprint > > ,
252254 strings : & mut Strings ,
255+ expressions : & mut Expressions ,
253256 parent : ComponentBlueprintId ,
254257 ) -> Result < Vec < Blueprint > > {
255258 let tokens = Lexer :: new ( template, strings) . collect :: < Result < Vec < _ > > > ( ) ?;
@@ -258,7 +261,7 @@ impl ComponentTemplates {
258261
259262 let statements = parser. collect :: < Result < Statements > > ( ) ?;
260263
261- let mut context = Context :: new ( template, variables, self , strings, slots, Some ( parent) ) ;
264+ let mut context = Context :: new ( template, variables, self , strings, expressions , slots, Some ( parent) ) ;
262265
263266 Scope :: new ( statements) . eval ( & mut context)
264267 }
0 commit comments