   constructor: (shape) ->
     super shape
     @codes = {}
+    @errors = false
 
   addCodes: (codes, pos) ->
     for symbol, code of codes

      @nodes.push(newval)

    @codes[symbol] = newval
    # TODO: needs to check for errors, I think this should be done
    # here even if it is less efficient just to be safe

  arrangeCodes: (start_x, start_y) ->
    y = start_y
    for symbol, codeobj of @nodes
      codeobj.x = start_x
      codeobj.y = y
      y += node_text_spacing


  render: (ctx) ->
    ctx.save()
    if @error?
      setStyle(ctx, node_text_error_style)
    else
      setStyle(ctx, node_text_style)
    ctx.textAlign = 'left'
    ctx.textBaseline = 'top'
    msg = "#{@symbol} = #{@code}"
