Sha256: 915dd722b861acf45d62e7bd99c5bfe36c9b5a02f6747023a43580c7a416c3c9

Contents?: true

Size: 1021 Bytes

Versions: 17

Compression:

Stored size: 1021 Bytes

Contents

module WebIDL
  module ParseTree

    class ExtendedAttributeList < Treetop::Runtime::SyntaxNode
      def build(parent)
        list = [attribute.build(parent)]
        list += attributes.build(parent) unless attributes.empty?

        list
      end
    end

    class ExtendedAttributeArgList < Treetop::Runtime::SyntaxNode
      def build(parent)
        unless args.empty?
          arguments = args.build(parent)
        end
        Ast::ExtendedAttribute.new(name.text_value, arguments)
      end
    end

    class ExtendedAttributeIdent < Treetop::Runtime::SyntaxNode
      def build(parent)
        [key, value].map { |e| e.text_value }
      end
    end

    class ExtendedAttributeNamedArgList < Treetop::Runtime::SyntaxNode
      def build(parent)
        [key.text_value, value.build(parent)]
      end
    end

    class ExtendedAttributeScopedName < Treetop::Runtime::SyntaxNode
      def build(parent)
        [key.text_value, scoped_name.build(parent)]
      end
    end

  end # ParseTree
end # WebIDL

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
webidl-0.1.7 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.6 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.5 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.4 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.3 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.2 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.1 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.1.0 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.9 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.8 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.7 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.6 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.5 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.4 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.3 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.2 lib/webidl/parse_tree/extended_attributes.rb
webidl-0.0.1 lib/webidl/parse_tree/extended_attributes.rb