Sha256: fa2c697258ab92df4e75d9a9b715c9a6523c4259a0831bcf664f8196ce415146

Contents?: true

Size: 651 Bytes

Versions: 9

Compression:

Stored size: 651 Bytes

Contents

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

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

        if metadef.d.any?
          p metadef.d unless metadef.d.respond_to? :build
          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

9 entries across 9 versions & 1 rubygems

Version Path
webidl-0.2.2 lib/webidl/parse_tree/definitions.rb
webidl-0.2.1 lib/webidl/parse_tree/definitions.rb
webidl-0.1.10 lib/webidl/parse_tree/definitions.rb
webidl-0.2.0 lib/webidl/parse_tree/definitions.rb
webidl-0.1.9 lib/webidl/parse_tree/definitions.rb
webidl-0.1.8 lib/webidl/parse_tree/definitions.rb
webidl-0.1.7 lib/webidl/parse_tree/definitions.rb
webidl-0.1.6 lib/webidl/parse_tree/definitions.rb
webidl-0.1.5 lib/webidl/parse_tree/definitions.rb