Class: WebIDL::ParseTree::TypeSuffix

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/webidl/parse_tree/type_suffix.rb

Instance Method Summary collapse

Instance Method Details

#apply(type) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/webidl/parse_tree/type_suffix.rb', line 5

def apply(type)
  if respond_to?(:array) && array.any?
    type.array = true
  end

  if respond_to?(:null) && null.any?
    type.nullable = true
  end

  if suffix.any?
    suffix.apply(type)
  end
end