       @pattern = getPattern pattern
     toString: =>
       "#{@name} = #{@pattern}"
+    require: (node) =>
+      return @pattern.require(node)
     _check: (node, descend) =>
       @pattern.check(node, descend)
     attrCheck: (node) =>

    _check: (node, descend) =>
      return @require(node)
    require: (node) =>
      return new EmptyNode("#{this}", this)
    attrCheck: (node) =>
      error = []
      for attr in h.getNodeAttributes(node)

      @dereference()
    toString: =>
      @refname
    require: (node) =>
      @dereference()
      if @pattern?
        return @pattern.require(node)
      return new NotAllowed("cannot find reference '#{@refname}'", this, node)
    _check: (node, descend) =>
      @dereference()
      if @pattern?
