Sha256: 856ebb78aefa3ae2d71078f6de4e97a1f6a0886de1bdff4722276a32ce9c4ae1

Contents?: true

Size: 593 Bytes

Versions: 1

Compression:

Stored size: 593 Bytes

Contents

module WebIDL
  module ParseTree
    class Definitions < Treetop::Runtime::SyntaxNode

      def build(parent = nil)
        return [] if metadef.empty?

        if metadef.d.any?
          definition = metadef.d.build(parent)
          definition.extended_attributes = metadef.eal.build(parent) unless metadef.eal.empty?
        end

        result = [definition]
        result += metadef.defs.build(parent) unless metadef.defs.empty?

        if parent
          parent.definitions = result
        end

        result.compact
      end

    end # Definitions
  end # ParseTree
end # WebIDL

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webidl-0.1.4 lib/webidl/parse_tree/definitions.rb