ast.rb: reduce nesting

This commit is contained in:
Nobuyoshi Nakada 2021-06-06 23:02:06 +09:00
parent c9af563e10
commit cf92b3cc97
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

39
ast.rb
View File

@ -1,25 +1,23 @@
# for ast.c # for ast.c
class RubyVM # AbstractSyntaxTree provides methods to parse Ruby code into
# abstract syntax trees. The nodes in the tree
# AbstractSyntaxTree provides methods to parse Ruby code into # are instances of RubyVM::AbstractSyntaxTree::Node.
# abstract syntax trees. The nodes in the tree #
# are instances of RubyVM::AbstractSyntaxTree::Node. # This module is MRI specific as it exposes implementation details
# # of the MRI abstract syntax tree.
# This module is MRI specific as it exposes implementation details #
# of the MRI abstract syntax tree. # This module is experimental and its API is not stable, therefore it might
# # change without notice. As examples, the order of children nodes is not
# This module is experimental and its API is not stable, therefore it might # guaranteed, the number of children nodes might change, there is no way to
# change without notice. As examples, the order of children nodes is not # access children nodes by name, etc.
# guaranteed, the number of children nodes might change, there is no way to #
# access children nodes by name, etc. # If you are looking for a stable API or an API working under multiple Ruby
# # implementations, consider using the _parser_ gem or Ripper. If you would
# If you are looking for a stable API or an API working under multiple Ruby # like to make RubyVM::AbstractSyntaxTree stable, please join the discussion
# implementations, consider using the _parser_ gem or Ripper. If you would # at https://bugs.ruby-lang.org/issues/14844.
# like to make RubyVM::AbstractSyntaxTree stable, please join the discussion #
# at https://bugs.ruby-lang.org/issues/14844. module RubyVM::AbstractSyntaxTree
#
module AbstractSyntaxTree
# call-seq: # call-seq:
# RubyVM::AbstractSyntaxTree.parse(string) -> RubyVM::AbstractSyntaxTree::Node # RubyVM::AbstractSyntaxTree.parse(string) -> RubyVM::AbstractSyntaxTree::Node
@ -142,5 +140,4 @@ class RubyVM
Primitive.ast_node_inspect Primitive.ast_node_inspect
end end
end end
end
end end