Sha256: 35ed87e8f1d60fdf76bb0c09656dbe08e91103d58b6af51a45be7dd16d37cfe7

Contents?: true

Size: 471 Bytes

Versions: 10

Compression:

Stored size: 471 Bytes

Contents

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

      def build(parent)
        dict = Ast::Dictionary.new(parent, name.text_value)

        if members.any?
          members.build(dict)
        end

        add_inheritance(dict)

        dict
      end

      def add_inheritance(dict)
        if inherits.any?
          dict.inherits = inherits.build(dict)
        end
      end

    end # Dictionary
  end # ParseTree
end # WebIDL

Version data entries

10 entries across 10 versions & 1 rubygems

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