   class Node extends Module
     @include Events
 
+    matchConstraint = /\${(.+)}/
     constructor: (el, attributes = {}) ->
       @subnodes = []
       # Install types

      # console.log 'matched constraint', name, @, expression
      return

    matchConstraint = /\${(.+)}/
    setAttribute: (name, value) ->
      if @[name] != value
        constraint = value.match?(matchConstraint)
        if constraint
          @applyConstraint(name, constraint[1])
          return
          
        # coerce value to type
        if name of @types
          type = @types[name]
          if type of typemappings
            value = typemappings[type](value)
          # console.log 'type', name, type, value

        # console.log 'setAttribute', name, value
        setter = 'set_' + name
        if setter of @


      # Bind to event expressions and set attributes
      for name, value of attributes
        constraint = value.match?(matchConstraint)
        if constraint
          @applyConstraint(name, constraint[1])
        else if name.indexOf('on') == 0
          name = name.substr(2)
          # console.log('binding to event expression', name, value, @)
          @bind(name, @eventCallback(name, value, @))
