     @expression = build(json.expression)
 
   exec: (ctx) ->
-    @expression.exec(ctx)
+    value = @expression.exec(ctx)
+    ctx.rootContext().set @name,value
+    value
 
 class ExpressionRef extends Expression
   constructor: (json) ->

    @name = json.name

  exec: (ctx) ->
    ctx.get(@name)?.exec(ctx)

# Parameters


  withCodeService: (cs) ->
    @codeService = cs
    @

  rootContext:  -> 
    if (@parent instanceof Library) then @ else @parent?.rootContext()

  childContext: (context_values = {}) ->
    ctx = new Context(@)
