Sha256: 77655ee50bff3840ce333ad10121ece810782e38f35eca6272dc6f87486f69c2

Contents?: true

Size: 599 Bytes

Versions: 13

Compression:

Stored size: 599 Bytes

Contents

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

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

        unless metadef.d.empty?
          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

13 entries across 13 versions & 1 rubygems

Version Path
webidl-0.1.3 lib/webidl/parse_tree/definitions.rb
webidl-0.1.2 lib/webidl/parse_tree/definitions.rb
webidl-0.1.1 lib/webidl/parse_tree/definitions.rb
webidl-0.1.0 lib/webidl/parse_tree/definitions.rb
webidl-0.0.9 lib/webidl/parse_tree/definitions.rb
webidl-0.0.8 lib/webidl/parse_tree/definitions.rb
webidl-0.0.7 lib/webidl/parse_tree/definitions.rb
webidl-0.0.6 lib/webidl/parse_tree/definitions.rb
webidl-0.0.5 lib/webidl/parse_tree/definitions.rb
webidl-0.0.4 lib/webidl/parse_tree/definitions.rb
webidl-0.0.3 lib/webidl/parse_tree/definitions.rb
webidl-0.0.2 lib/webidl/parse_tree/definitions.rb
webidl-0.0.1 lib/webidl/parse_tree/definitions.rb