module YARD::Parser::Ruby
def s(*args)
- See: AstNode#initialize -
Returns:
-
(AstNode)
- a node of type +type+. -
(AstNode)
- an implicit node where node.type == +:list+
Parameters:
-
opts
(Hash
) -- any extra options to set on the object -
children
(Array
) -- any child nodes inside this one -
type
(Symbol
) -- the node type -
opts
(Hash
) -- any extra options (docstring, file, source) to -
nodes
(Array
) -- a list of nodes.
Overloads:
-
s(type, *children, opts = {})
-
s(*nodes, opts = {})
Other tags:
- Example: A method call -
Example: An implicit list of keywords -
def s(*args) type = Symbol === args.first ? args.shift : :list opts = Hash === args.last ? args.pop : {} AstNode.node_class_for(type).new(type, args, opts) end