From 1d7d08262e07b7d0d11ec2d4efa29ad2b52c565a Mon Sep 17 00:00:00 2001 From: yui-knk Date: Fri, 9 Nov 2018 01:37:41 +0000 Subject: Rename `AST` module to `AbstractSyntaxTree` Follow the same naming convention of `InstructionSequence` class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ast.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ast.c') diff --git a/ast.c b/ast.c index babfc1fbf6..a64278f8c7 100644 --- a/ast.c +++ b/ast.c @@ -54,15 +54,15 @@ ast_new_internal(rb_ast_t *ast, NODE *node) /* * call-seq: - * RubyVM::AST.parse(string) -> RubyVM::AST::Node + * RubyVM::AbstractSyntaxTree.parse(string) -> RubyVM::AbstractSyntaxTree::Node * * Parses the given string into an abstract syntax tree, * returning the root node of that tree. * * SyntaxError is raised if the given string is invalid syntax. * - * RubyVM::AST.parse("x = 1 + 2") - * # => # + * RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") + * # => # */ static VALUE rb_ast_s_parse(VALUE module, VALUE str) @@ -88,7 +88,7 @@ rb_ast_s_parse(VALUE module, VALUE str) /* * call-seq: - * RubyVM::AST.parse_file(pathname) -> RubyVM::AST::Node + * RubyVM::AbstractSyntaxTree.parse_file(pathname) -> RubyVM::AbstractSyntaxTree::Node * * Reads the file from pathname, then parses it like ::parse, * returning the root node of the abstract syntax tree. @@ -96,8 +96,8 @@ rb_ast_s_parse(VALUE module, VALUE str) * SyntaxError is raised if pathname's contents are not * valid Ruby syntax. * - * RubyVM::AST.parse_file("my-app/app.rb") - * # => # + * RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb") + * # => # */ static VALUE rb_ast_s_parse_file(VALUE module, VALUE path) @@ -200,7 +200,7 @@ node_type_to_str(NODE *node) * * Returns the type of this node as a string. * - * root = RubyVM::AST.parse("x = 1 + 2") + * root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") * root.type # => "NODE_SCOPE" * call = root.children[2] * call.type # => "NODE_OPCALL" @@ -659,14 +659,14 @@ void Init_ast(void) { /* - * AST provides methods to parse Ruby code into + * AbstractSyntaxTree provides methods to parse Ruby code into * abstract syntax trees. The nodes in the tree - * are instances of RubyVM::AST::Node. + * are instances of RubyVM::AbstractSyntaxTree::Node. */ - rb_mAST = rb_define_module_under(rb_cRubyVM, "AST"); + rb_mAST = rb_define_module_under(rb_cRubyVM, "AbstractSyntaxTree"); /* - * RubyVM::AST::Node instances are created by parse methods in - * RubyVM::AST. + * RubyVM::AbstractSyntaxTree::Node instances are created by parse methods in + * RubyVM::AbstractSyntaxTree. */ rb_cNode = rb_define_class_under(rb_mAST, "Node", rb_cObject); -- cgit v1.2.3