lib-ruby-parser (C++ bindings)
4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
|
Represents method definition using def
keyword (not on a singleton, see Defs
node).
More...
#include <nodes.hpp>
Public Attributes | |
String | name |
Name of the method, String("foo") for def foo; end More... | |
Node * | args |
Node * | body |
Body of a method, None if there's no body. More... | |
Loc | keyword_l |
Loc | name_l |
MaybeLoc | end_l |
MaybeLoc | assignment_l |
Loc | expression_l |
Represents method definition using def
keyword (not on a singleton, see Defs
node).
Node* lib_ruby_parser::Def::args |
Arguments of a method, None
if there's no arguments.
All information about parentheses around arguments is stored in this node.
MaybeLoc lib_ruby_parser::Def::assignment_l |
Location of the =
operator for endless method definition
None
for regular method definition
Node* lib_ruby_parser::Def::body |
Body of a method, None
if there's no body.
MaybeLoc lib_ruby_parser::Def::end_l |
Location of the end
keyword.
None
for endless method definition
Loc lib_ruby_parser::Def::expression_l |
Location of the full expression
Loc lib_ruby_parser::Def::keyword_l |
Location of the def
keyword.
Loc lib_ruby_parser::Def::name_l |
Location of the method name.