Module: YARD::Parser::Ruby
- Included in:
- Handlers::Ruby::Base, Handlers::Ruby::Base
- Defined in:
- lib/yard/autoload.rb,
lib/yard/parser/ruby/ast_node.rb,
lib/yard/parser/ruby/ruby_parser.rb,
lib/yard/parser/ruby/legacy/ruby_parser.rb
Overview
Ruby parsing components.
Defined Under Namespace
Modules: Legacy Classes: AstNode, ConditionalNode, KeywordNode, LiteralNode, MethodCallNode, ParameterNode, ReferenceNode, RipperParser, RubyParser
Instance Method Summary collapse
-
#s(*args) ⇒ Object
Builds and s-expression by creating AstNode objects with the type provided by the first argument.
Instance Method Details
#s(*nodes, opts = {}) ⇒ AstNode #s(type, *children, opts = {}) ⇒ AstNode
Builds and s-expression by creating AstNode objects with the type provided by the first argument.
24 25 26 27 28 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 24 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 |