Class: WebIDL::ParseTree::Argument
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- WebIDL::ParseTree::Argument
- Defined in:
- lib/webidl/parse_tree/argument.rb
Instance Method Summary collapse
Instance Method Details
#build(parent) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/webidl/parse_tree/argument.rb', line 5 def build(parent) xattrs = eal.build(parent) unless eal.empty? = {:extended_attributes => xattrs} if arg.respond_to?(:optional) && arg.optional.any? [:optional] = true [:default] = arg.default.build if arg.default.any? else [:variadic] = arg.variadic.any? end Ast::Argument.new( arg.name.build, arg.type.build(parent), ) end |