   gt: (e1,e2,s,w) =>    
     return new c.Inequality e1, c.GEQ, e2, @strength(s), w
 
-onmessage = (constraints) ->
+onmessage = (ast) ->
   # TODO: Include Cassowary, solve
-  if c.Equation isnt null
+  if ast.constraints.length isnt null
+    #if c.Equation isnt null
     postMessage(
       a: 7
       b: 5

cachedVars = {}

astFunctions =
  
  var: (id, prop, context) ->
    if cachedVars[id]

  get: (id) ->
    if cachedVars[id]
      return cachedVars[id]
    throw new Error("AST method 'get' couldn't find var with id: #{id}")
      
  plus: (e1,e2) ->
    return c.plus e2, e2 
  
